mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08:20 +00:00
Merge remote-tracking branch 'origin/topic/johanna/netcontrol'
BIT-1550 #merged * origin/topic/johanna/netcontrol: (72 commits) Update baselines and news Move prefixtable back to all IPv6 internal handling. NetControl: Add functions to search for rules affecting IPs/subnets Add check_subnet bif that allows exact membership test for subnet tables. Rewrite internal handling of rules. Add bif that allows searching for all matching subnets in table. Add signaling of succesful initialization of plugins to NetControl. Add rule hooks to the acld plugin. Add new logfiles for shunting and drops to netcontrol Extend NetControl logging and fix bugs. Update OpenFlow API and events. small acld plugin fix Revert "introduce &weaken attribute" Fix crash when printing type of recursive structures. Testcase for crash when a record contains a function referencing a record. Rename Pacf to NetControl fix acld plugin to use address instead of subnet (and add functions for conversion) implement quarantine miscelaneous missing bits and pieces Acld implementation for Pacf - Bro side. ...
This commit is contained in:
commit
2233521de7
107 changed files with 6071 additions and 19 deletions
19
src/Type.cc
19
src/Type.cc
|
@ -1045,6 +1045,8 @@ TypeDecl* RecordType::FieldDecl(int field)
|
|||
|
||||
void RecordType::Describe(ODesc* d) const
|
||||
{
|
||||
d->PushType(this);
|
||||
|
||||
if ( d->IsReadable() )
|
||||
{
|
||||
if ( d->IsShort() && GetName().size() )
|
||||
|
@ -1064,10 +1066,13 @@ void RecordType::Describe(ODesc* d) const
|
|||
d->Add(int(Tag()));
|
||||
DescribeFields(d);
|
||||
}
|
||||
|
||||
d->PopType(this);
|
||||
}
|
||||
|
||||
void RecordType::DescribeReST(ODesc* d, bool roles_only) const
|
||||
{
|
||||
d->PushType(this);
|
||||
d->Add(":bro:type:`record`");
|
||||
|
||||
if ( num_fields == 0 )
|
||||
|
@ -1075,6 +1080,7 @@ void RecordType::DescribeReST(ODesc* d, bool roles_only) const
|
|||
|
||||
d->NL();
|
||||
DescribeFieldsReST(d, false);
|
||||
d->PopType(this);
|
||||
}
|
||||
|
||||
const char* RecordType::AddFields(type_decl_list* others, attr_list* attr)
|
||||
|
@ -1129,7 +1135,12 @@ void RecordType::DescribeFields(ODesc* d) const
|
|||
const TypeDecl* td = FieldDecl(i);
|
||||
d->Add(td->id);
|
||||
d->Add(":");
|
||||
td->type->Describe(d);
|
||||
|
||||
if ( d->FindType(td->type) )
|
||||
d->Add("<recursion>");
|
||||
else
|
||||
td->type->Describe(d);
|
||||
|
||||
d->Add(";");
|
||||
}
|
||||
}
|
||||
|
@ -1170,7 +1181,11 @@ void RecordType::DescribeFieldsReST(ODesc* d, bool func_args) const
|
|||
}
|
||||
|
||||
const TypeDecl* td = FieldDecl(i);
|
||||
td->DescribeReST(d);
|
||||
|
||||
if ( d->FindType(td->type) )
|
||||
d->Add("<recursion>");
|
||||
else
|
||||
td->DescribeReST(d);
|
||||
|
||||
if ( func_args )
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue