mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00

This is based on commit 99e6942efec5feff50523f6b2a1f5868f19ab638 from the zeek-docs repo.
21 lines
412 B
Text
21 lines
412 B
Text
type MyEndpoint: record {
|
|
ctx: conn_id_ctx;
|
|
a: addr;
|
|
};
|
|
|
|
global talks_with_service: table[MyEndpoint] of set[string] &default_insert=set();
|
|
|
|
event connection_state_remove(c: connection)
|
|
{
|
|
local endp = MyEndpoint($ctx=c$id$ctx, $a=c$id$orig_h);
|
|
|
|
for ( s in c$service )
|
|
add talks_with_service[endp][s];
|
|
}
|
|
|
|
event zeek_done()
|
|
{
|
|
for ( e, es in talks_with_service )
|
|
print e, join_string_set(es, ", ");
|
|
}
|
|
|