mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48: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
|
@ -0,0 +1,2 @@
|
||||||
|
mount_proc_mnt: [id=[orig_h=10.111.131.18, orig_p=765/udp, resp_h=10.111.131.132, resp_p=20048/udp], orig=[size=144, state=1, num_pkts=2, num_bytes_ip=200, flow_label=0, l2_addr=00:50:56:b2:4e:d3], resp=[size=84, state=1, num_pkts=1, num_bytes_ip=52, flow_label=0, l2_addr=00:50:56:b2:78:69], start_time=1514568131.621984, duration=0.000553, service={\x0a\x0a}, history=Dd, uid=CHhAvVGS1DHFjwGM9, tunnel=<uninitialized>, vlan=<uninitialized>, inner_vlan=<uninitialized>]\x0a\x09[rpc_stat=RPC_SUCCESS, mnt_stat=MOUNT3::MNT3_OK, req_start=1514568131.62212, req_dur=0.0, req_len=96, rep_start=1514568131.622537, rep_dur=0.0, rep_len=52, rpc_uid=0, rpc_gid=0, rpc_stamp=19078341, rpc_machine_name=pddevbal802, rpc_auxgids=[0, 5, 10, 24]]\x0a\x09[dirname=/pddevbal801]\x0a\x09[dirfh=\x01\x00\x06\x00\xea,\xbbJ\x9e\xf7I\x95\xa56V(\xce\xda`\xa2, auth_flavors=[MOUNT3::AUTH_UNIX]]\x0a
|
||||||
|
mount_proc_umnt: [id=[orig_h=10.111.131.18, orig_p=1016/udp, resp_h=10.111.131.132, resp_p=20048/udp], orig=[size=92, state=1, num_pkts=1, num_bytes_ip=120, flow_label=0, l2_addr=00:50:56:b2:4e:d3], resp=[size=24, state=1, num_pkts=0, num_bytes_ip=0, flow_label=0, l2_addr=00:50:56:b2:78:69], start_time=1514568131.665918, duration=0.000266, service={\x0a\x0a}, history=Dd, uid=ClEkJM2Vm5giqnMf4h, tunnel=<uninitialized>, vlan=<uninitialized>, inner_vlan=<uninitialized>]\x0a\x09[rpc_stat=RPC_SUCCESS, mnt_stat=MOUNT3::MNT3_OK, req_start=1514568131.665918, req_dur=0.0, req_len=84, rep_start=1514568131.666184, rep_dur=0.0, rep_len=16, rpc_uid=0, rpc_gid=0, rpc_stamp=1514568131, rpc_machine_name=pddevbal802, rpc_auxgids=[0]]\x0a\x09[dirname=/pddevbal801]\x0a
|
BIN
testing/btest/Traces/mount/mount_base.pcap
Normal file
BIN
testing/btest/Traces/mount/mount_base.pcap
Normal file
Binary file not shown.
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