mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 03:58:20 +00:00

This is based on commit 2731def9159247e6da8a3191783c89683363689c 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, ", ");
|
|
}
|
|
|