zeek/doc/scripting/conn_id_ctx_my_endpoint.zeek
Tim Wojtulewicz adce4e604a Copy docs into Zeek repo directly
This is based on commit 99e6942efec5feff50523f6b2a1f5868f19ab638 from the
zeek-docs repo.
2025-10-13 11:06:48 -07:00

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, ", ");
}