zeek/testing/btest/signatures/id-lookup.zeek
Robin Sommer 789cb376fd GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev.
This also installs symlinks from "zeek" and "bro-config" to a wrapper
script that prints a deprecation warning.

The btests pass, but this is still WIP. broctl renaming is still
missing.

#239
2019-05-01 21:43:45 +00:00

27 lines
527 B
Text

# @TEST-EXEC: zeek -b -s id -r $TRACES/chksums/ip4-udp-good-chksum.pcap %INPUT >id.out
# @TEST-EXEC: btest-diff id.out
@TEST-START-FILE id.sig
signature id {
ip-proto == udp_proto_number
event "id"
}
signature idtable {
dst-ip == mynets
event "idtable"
}
@TEST-END-FILE
const udp_proto_number = 17;
const mynets: set[subnet] = {
192.168.1.0/24,
10.0.0.0/8,
127.0.0.0/24
};
event signature_match(state: signature_state, msg: string, data: string)
{
print fmt("signature_match %s - %s", state$conn$id, msg);
}