Change FragReassembler to use a tuple as a key and use std::map for fragments in Sessions

This commit is contained in:
Tim Wojtulewicz 2019-08-01 14:20:10 -07:00
parent 57f29f3e7c
commit a4b8aa1f30
4 changed files with 26 additions and 46 deletions

View file

@ -173,6 +173,7 @@ protected:
friend class IPTunnelTimer;
using ConnectionMap = std::map<ConnIDKey, Connection*>;
using FragmentMap = std::map<FragReassemblerKey, FragReassembler*>;
Connection* NewConn(const ConnIDKey& k, double t, const ConnID* id,
const u_char* data, int proto, uint32_t flow_label,
@ -221,11 +222,10 @@ protected:
// the new one.
void InsertConnection(ConnectionMap* m, const ConnIDKey& key, Connection* conn);
CompositeHash* ch;
ConnectionMap tcp_conns;
ConnectionMap udp_conns;
ConnectionMap icmp_conns;
PDict<FragReassembler> fragments;
FragmentMap fragments;
SessionStats stats;