mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
Move some code out of NetSessions
- TCPStateStats update when a session is removed was moved to Connection - Stepping Stone manager moved to a singleton object in SteppingStoneManager
This commit is contained in:
parent
14ffd9646f
commit
50713b3c2d
7 changed files with 38 additions and 34 deletions
13
src/Conn.cc
13
src/Conn.cc
|
@ -170,6 +170,19 @@ void Connection::CheckEncapsulation(const std::shared_ptr<EncapsulationStack>& a
|
|||
|
||||
void Connection::Done()
|
||||
{
|
||||
// TODO: this still doesn't feel like the right place to do this, but it's better
|
||||
// here than in SessionManager. This really should be down in the TCP analyzer
|
||||
// somewhere, but it's session-related, so maybe not?
|
||||
if ( ConnTransport() == TRANSPORT_TCP )
|
||||
{
|
||||
auto ta = static_cast<analyzer::tcp::TCP_Analyzer*>(GetRootAnalyzer());
|
||||
assert(ta->IsAnalyzer("TCP"));
|
||||
analyzer::tcp::TCP_Endpoint* to = ta->Orig();
|
||||
analyzer::tcp::TCP_Endpoint* tr = ta->Resp();
|
||||
|
||||
sessions->tcp_stats.StateLeft(to->state, tr->state);
|
||||
}
|
||||
|
||||
finished = 1;
|
||||
|
||||
if ( root_analyzer && ! root_analyzer->IsFinished() )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue