mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 15:18:20 +00:00
Move old TCP analyzer into analyzer adapter in packet analysis tree
This commit is contained in:
parent
b171f94729
commit
f6e31107e1
25 changed files with 2243 additions and 2247 deletions
|
@ -18,14 +18,12 @@ public:
|
|||
return std::make_shared<TCPAnalyzer>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an adapter appropriate for this IP-based analyzer. This adapter is used to
|
||||
* hook into the session analyzer framework. This function can also be used to do any
|
||||
* extra initialization of connection timers, etc.
|
||||
*
|
||||
* TODO: this is a stub until the TCP analyzer moves to the packet analysis framework.
|
||||
/*
|
||||
* Initialize the analyzer. This method is called after the configuration
|
||||
* was read. Derived classes can override this method to implement custom
|
||||
* initialization.
|
||||
*/
|
||||
IP::SessionAdapter* MakeSessionAdapter(Connection* conn) override { return nullptr; }
|
||||
void Initialize() override;
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -35,6 +33,9 @@ protected:
|
|||
bool BuildConnTuple(size_t len, const uint8_t* data, Packet* packet,
|
||||
ConnTuple& tuple) override;
|
||||
|
||||
void DeliverPacket(Connection* c, double t, bool is_orig, int remaining,
|
||||
Packet* pkt) override;
|
||||
|
||||
/**
|
||||
* Upon seeing the first packet of a connection, checks whether we want
|
||||
* to analyze it (e.g. we may not want to look at partial connections)
|
||||
|
@ -49,6 +50,19 @@ protected:
|
|||
*/
|
||||
bool WantConnection(uint16_t src_port, uint16_t dst_port,
|
||||
const u_char* data, bool& flip_roles) const override;
|
||||
|
||||
/**
|
||||
* Returns an analyzer adapter appropriate for this IP-based analyzer. This adapter
|
||||
* is used to hook into the session analyzer framework. This function can also be used
|
||||
* to do any extra initialization of connection timers, etc.
|
||||
*/
|
||||
packet_analysis::IP::SessionAdapter* MakeSessionAdapter(Connection* conn) override;
|
||||
|
||||
/**
|
||||
* Returns a PIA appropriate for this IP-based analyzer. This method is optional to
|
||||
* override in child classes, as not all analyzers need a PIA.
|
||||
*/
|
||||
analyzer::pia::PIA* MakePIA(Connection* conn) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue