macro_rules! l7_requires {
($($feat:literal),* $(,)?) => {
$(
#[cfg(all(feature = "l7", not(feature = $feat)))]
compile_error!(concat!("`l7` umbrella must enable `", $feat, "`"));
)*
};
}
l7_requires!(
"http",
"tls",
"tls-fingerprints",
"dns",
"icmp",
"arp",
"ndp",
"dhcp",
"lldp",
"cdp",
"ssh",
"ntp",
"ssdp",
"tftp",
"mdns",
"netbios-ns",
"ftp",
"smtp",
"wireguard",
"modbus",
"stun",
"rdp",
"snmp",
"radius",
"quic",
"smb",
"ldap",
"kerberos",
"dnp3",
);
#[cfg(all(feature = "full", not(feature = "l7")))]
compile_error!("`full` umbrella must be a superset of `l7` (enable `l7`)");
macro_rules! full_requires {
($($feat:literal),* $(,)?) => {
$(
#[cfg(all(feature = "full", not(feature = $feat)))]
compile_error!(concat!("`full` umbrella must enable `", $feat, "`"));
)*
};
}
full_requires!(
"tcp_fingerprint",
"asset",
"analysis",
"ml-features",
"ml-features-nprint",
"ipfix",
"ipfix-export",
"pcap",
"metrics",
"tracing",
"serde",
"emit",
"emit-ndjson",
"emit-eve",
"aggregate",
"chrono",
"file-hash",
"fingerprint",
"community-id",
);
macro_rules! tier_requires {
($tier:literal => $($feat:literal),* $(,)?) => {
$(
#[cfg(all(feature = $tier, not(feature = $feat)))]
compile_error!(concat!("`", $tier, "` tier must enable `", $feat, "`"));
)*
};
}
tier_requires!("parsers-core" => "http", "tls", "dns", "icmp");
tier_requires!("parsers-l2l3" => "arp", "ndp", "lldp", "cdp", "dhcp");
tier_requires!("parsers-tier2" =>
"ssh", "ntp", "ssdp", "tftp", "mdns", "netbios-ns", "ftp", "smtp",
"wireguard", "modbus", "stun", "rdp", "snmp", "radius", "quic",
"smb", "ldap", "kerberos", "dnp3",
);
tier_requires!("ml" => "ml-features", "ml-features-nprint");
tier_requires!("export" =>
"ipfix", "ipfix-export", "emit", "emit-ndjson", "emit-eve");
tier_requires!("nsm" => "fingerprint", "tls-fingerprints", "analysis");