Move building session analyzer tree out of analyzer::Manager

This commit is contained in:
Tim Wojtulewicz 2021-05-07 14:02:00 -07:00
parent 7dc803f7bb
commit c56fb3e8e4
12 changed files with 98 additions and 105 deletions

View file

@ -33,12 +33,6 @@ public:
*/
virtual bool IsReuse(double t, const u_char* pkt) { return false; }
/**
* TODO: comment
*/
virtual void CreateTransportAnalyzer(Connection* conn, IPBasedTransportAnalyzer*& root,
analyzer::pia::PIA*& pia, bool& check_port) = 0;
protected:
/**
@ -96,6 +90,17 @@ protected:
return true;
}
/**
* Returns a transport analyzer appropriate for this IP-based analyzer. This
* can also be used to do any extra initialization of connection timers, etc.
*/
virtual IPBasedTransportAnalyzer* MakeTransportAnalyzer(Connection* conn) { return nullptr; }
/**
* Returns a PIA appropriate for this IP-based analyzer.
*/
virtual analyzer::pia::PIA* MakePIA(Connection* conn) { return nullptr; }
/**
* Verifies that there is enough data in the packet to process the header
* length requested.
@ -134,6 +139,8 @@ private:
zeek::Connection* NewConn(const ConnTuple* id, const detail::ConnKey& key,
const Packet* pkt);
bool BuildSessionAnalyzerTree(Connection* conn);
TransportProto transport;
uint32_t server_port_mask;
};