mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Small cleanup of packet analysis.
This commit is contained in:
parent
2d7280fabd
commit
0ec7516602
4 changed files with 13 additions and 43 deletions
|
@ -30,7 +30,7 @@ void Manager::InitPostScript()
|
|||
if ( mapping_val->Size() == 0 )
|
||||
return;
|
||||
|
||||
for (unsigned int i = 0; i < mapping_val->Size(); i++)
|
||||
for ( unsigned int i = 0; i < mapping_val->Size(); i++ )
|
||||
{
|
||||
auto* rv = mapping_val->At(i)->AsRecordVal();
|
||||
//TODO: Make that field a string for usability reasons
|
||||
|
|
|
@ -23,19 +23,9 @@ const IntrusivePtr<EnumVal>& Tag::AsVal() const
|
|||
return zeek::Tag::AsVal(packet_mgr->GetTagType());
|
||||
}
|
||||
|
||||
EnumVal* Tag::AsEnumVal() const
|
||||
{
|
||||
return AsVal().get();
|
||||
}
|
||||
|
||||
Tag::Tag(IntrusivePtr<EnumVal> val)
|
||||
: zeek::Tag(std::move(val))
|
||||
{
|
||||
}
|
||||
|
||||
Tag::Tag(EnumVal* val)
|
||||
: zeek::Tag({NewRef {}, val})
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,14 +9,6 @@ namespace zeek::plugin {
|
|||
template <class T> class TaggedComponent;
|
||||
template <class T, class C> class ComponentManager;
|
||||
}
|
||||
namespace plugin {
|
||||
template <class T>
|
||||
using TaggedComponent [[deprecated("Remove in v4.1. Use zeek::plugin::TaggedComponent instead.")]] =
|
||||
zeek::plugin::TaggedComponent<T>;
|
||||
template <class T, class C>
|
||||
using ComponentManager [[deprecated("Remove in v4.1. Use zeek::plugin::ComponentManager instead.")]] =
|
||||
zeek::plugin::ComponentManager<T, C>;
|
||||
}
|
||||
|
||||
namespace zeek::packet_analysis {
|
||||
|
||||
|
@ -87,15 +79,6 @@ public:
|
|||
*/
|
||||
const IntrusivePtr<EnumVal>& AsVal() const;
|
||||
|
||||
/**
|
||||
* Returns the \c Analyzer::Tag enum that corresponds to this tag.
|
||||
* The returned value does not have its ref-count increased.
|
||||
*
|
||||
* @param etype the script-layer enum type associated with the tag.
|
||||
*/
|
||||
[[deprecated("Remove in v4.1. Use AsVal() instead.")]]
|
||||
EnumVal* AsEnumVal() const;
|
||||
|
||||
static Tag Error;
|
||||
|
||||
protected:
|
||||
|
@ -122,9 +105,6 @@ protected:
|
|||
* @param val An enum value of script type \c Analyzer::Tag.
|
||||
*/
|
||||
explicit Tag(IntrusivePtr<EnumVal> val);
|
||||
|
||||
[[deprecated("Remove in v4.1. Construct from IntrusivePtr instead")]]
|
||||
explicit Tag(EnumVal* val);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue