Implement the zeek_init handler.

Implements the change and a test.
This commit is contained in:
Seth Hall 2019-04-12 22:29:40 +02:00
parent f96bc81f85
commit 8cefb9be42
118 changed files with 229 additions and 165 deletions

View file

@ -1171,6 +1171,12 @@ func_hdr:
}
| TOK_EVENT event_id func_params opt_attr
{
// Gracefully handle the deprecation of bro_init and bro_done
if ( strncmp("bro_init", $2->Name(), 8) == 0 )
$2 = lookup_ID("zeek_init", "GLOBAL");
if ( strncmp("bro_done", $2->Name(), 8) == 0 )
$2 = lookup_ID("zeek_done", "GLOBAL");
begin_func($2, current_module.c_str(),
FUNC_FLAVOR_EVENT, 0, $3, $4);
$$ = $3;