zeek/doc/scripting/conn_id_ctx_my_endpoint.zeek
Tim Wojtulewicz ded98cd373 Copy docs into Zeek repo directly
This is based on commit 2731def9159247e6da8a3191783c89683363689c from the
zeek-docs repo.
2025-09-26 02:58:29 +00: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, ", ");
}