Label session adapters in the output of zeek -NN

This commit is contained in:
Tim Wojtulewicz 2021-05-28 13:51:23 -07:00
parent 5433f2936e
commit 1f94b8f250
10 changed files with 18 additions and 24 deletions

View file

@ -14,11 +14,6 @@ public:
ICMPSessionAdapter(Connection* conn) :
IP::SessionAdapter("ICMP", conn) { }
static zeek::analyzer::Analyzer* Instantiate(Connection* conn)
{
return new ICMPSessionAdapter(conn);
}
void AddExtraAnalyzers(Connection* conn) override;
void UpdateConnVal(RecordVal* conn_val) override;
void UpdateEndpointVal(const ValPtr& endp, bool is_orig);

View file

@ -14,8 +14,7 @@ public:
{
AddComponent(new zeek::packet_analysis::Component("ICMP",
zeek::packet_analysis::ICMP::ICMPAnalyzer::Instantiate));
AddComponent(new zeek::analyzer::Component("ICMP",
zeek::packet_analysis::ICMP::ICMPSessionAdapter::Instantiate));
AddComponent(new zeek::analyzer::Component("ICMP", nullptr, 0, true, false, true));
zeek::plugin::Configuration config;
config.name = "Zeek::ICMP";

View file

@ -14,8 +14,7 @@ public:
{
AddComponent(new zeek::packet_analysis::Component("TCP",
zeek::packet_analysis::TCP::TCPAnalyzer::Instantiate));
AddComponent(new zeek::analyzer::Component("TCP",
zeek::packet_analysis::TCP::TCPSessionAdapter::Instantiate));
AddComponent(new zeek::analyzer::Component("TCP", nullptr, 0, true, false, true));
zeek::plugin::Configuration config;
config.name = "Zeek::TCP_PKT";

View file

@ -69,9 +69,6 @@ public:
// From Analyzer.h
void UpdateConnVal(RecordVal *conn_val) override;
static analyzer::Analyzer* Instantiate(Connection* conn)
{ return new TCPSessionAdapter(conn); }
void AddExtraAnalyzers(Connection* conn) override;
protected:

View file

@ -14,8 +14,7 @@ public:
{
AddComponent(new zeek::packet_analysis::Component("UDP",
zeek::packet_analysis::UDP::UDPAnalyzer::Instantiate));
AddComponent(new zeek::analyzer::Component("UDP",
zeek::packet_analysis::UDP::UDPSessionAdapter::Instantiate));
AddComponent(new zeek::analyzer::Component("UDP", nullptr, 0, true, false, true));
zeek::plugin::Configuration config;
config.name = "Zeek::UDP";

View file

@ -13,11 +13,6 @@ public:
UDPSessionAdapter(Connection* conn) :
IP::SessionAdapter("UDP", conn) { }
static zeek::analyzer::Analyzer* Instantiate(Connection* conn)
{
return new UDPSessionAdapter(conn);
}
void AddExtraAnalyzers(Connection* conn) override;
void UpdateConnVal(RecordVal* conn_val) override;