mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Add unit tests for new MOUNT events -- mount_proc_mnt, mount_proc_umnt,
mount_proc_umnt_all, mount_proc_not_implemented.
This commit is contained in:
parent
99e411f621
commit
f6cf4a41ff
3 changed files with 33 additions and 0 deletions
31
testing/btest/scripts/base/protocols/mount/basic.test
Normal file
31
testing/btest/scripts/base/protocols/mount/basic.test
Normal file
|
@ -0,0 +1,31 @@
|
|||
# @TEST-EXEC: bro -b -r $TRACES/mount/mount_base.pcap %INPUT
|
||||
# @TEST-EXEC: btest-diff .stdout
|
||||
|
||||
global mount_ports: set[port] = { 635/tcp, 635/udp, 20048/tcp, 20048/udp } &redef;
|
||||
redef ignore_checksums = T;
|
||||
|
||||
event bro_init()
|
||||
{
|
||||
Analyzer::register_for_ports(Analyzer::ANALYZER_MOUNT, mount_ports);
|
||||
Analyzer::enable_analyzer(Analyzer::ANALYZER_MOUNT);
|
||||
}
|
||||
|
||||
event mount_proc_mnt(c: connection, info: MOUNT3::info_t, req: MOUNT3::dirmntargs_t, rep: MOUNT3::mnt_reply_t)
|
||||
{
|
||||
print(fmt("mount_proc_mnt: %s\n\t%s\n\t%s\n\t%s\n", c, info, req, rep));
|
||||
}
|
||||
|
||||
event mount_proc_umnt(c: connection, info: MOUNT3::info_t, req: MOUNT3::dirmntargs_t)
|
||||
{
|
||||
print(fmt("mount_proc_umnt: %s\n\t%s\n\t%s\n", c, info, req));
|
||||
}
|
||||
|
||||
event mount_proc_umnt_all(c: connection, info: MOUNT3::info_t, req: MOUNT3::dirmntargs_t)
|
||||
{
|
||||
print(fmt("mount_proc_umnt_all: %s\n\t%s\n\t%s\n", c, info, req));
|
||||
}
|
||||
|
||||
event mount_proc_not_implemented(c: connection, info: MOUNT3::info_t, proc: MOUNT3::proc_t)
|
||||
{
|
||||
print(fmt("mount_proc_not_implemented: %s\n\t%s\n\t%s\n", c, info, proc));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue