- /*//Removing
- if (stgTime - pi->second.updateTime > REMOVE_TIME)
- {
- // Remove packet and references from ip2packets index
- //printfd(__FILE__, "+++ Removing +++\n");
- pair<ip2p_iter, ip2p_iter> be(
- ip2packets.equal_range(pi->first.GetSrcIP()));
- while (be.first != be.second)
- {
- // Have a reference to a packet?
- if (be.first->second == pi)
- {
- ip2packets.erase(be.first++);
- //printfd(__FILE__, "Remove U from ip2packets %s\n", inet_ntostring(pi->first.GetSrcIP()).c_str());
- }
- else
- {
- ++be.first;
- }
- }
-
- //printfd(__FILE__, "-------------------\n");
- be = ip2packets.equal_range(pi->first.GetDstIP());
- while (be.first != be.second)
- {
- // Have a reference to a packet?
- if (be.first->second == pi)
- {
- ip2packets.erase(be.first++);
- //printfd(__FILE__, "Remove D from ip2packets %s\n", inet_ntostring(pi->first.GetDstIP()).c_str());
- }
- else
- {
- ++be.first;
- }
- }
- //printfd(__FILE__, "Remove packet\n");
- packets.erase(pi++);
- }
- else
- {
- ++pi;
- }*/