Trim the list of "global type pointers" from NetVar.h further

Most of them are deprecated now, with usage sites now doing the lookup
themselves.
This commit is contained in:
Jon Siwek 2020-05-12 16:38:05 -07:00
parent d34b24e776
commit 9210d443d3
26 changed files with 290 additions and 315 deletions

View file

@ -499,12 +499,14 @@ string Manager::DetectMIME(const u_char* data, uint64_t len) const
IntrusivePtr<VectorVal> file_analysis::GenMIMEMatchesVal(const RuleMatcher::MIME_Matches& m)
{
auto rval = make_intrusive<VectorVal>(zeek::vars::mime_matches);
static auto mime_matches = zeek::lookup_type<VectorType>("mime_matches");
static auto mime_match = zeek::lookup_type<RecordType>("mime_match");
auto rval = make_intrusive<VectorVal>(mime_matches);
for ( RuleMatcher::MIME_Matches::const_iterator it = m.begin();
it != m.end(); ++it )
{
auto element = make_intrusive<RecordVal>(zeek::vars::mime_match);
auto element = make_intrusive<RecordVal>(mime_match);
for ( set<string>::const_iterator it2 = it->second.begin();
it2 != it->second.end(); ++it2 )