summaryrefslogtreecommitdiffstats
path: root/src/nat_check.h
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-07-11 16:58:21 +0300
committerIdo Barnea <ibarnea@cisco.com>2016-07-12 16:06:29 +0300
commit7b9d10888594ca9fe1114309e53c0dea9089085b (patch)
tree564133e0a95a22c07be11540540cd627089cbea5 /src/nat_check.h
parentcc5cc5631e9df4ef0eee9c26705208dfcf035e8c (diff)
NAT seq num randomization fully working
Diffstat (limited to 'src/nat_check.h')
-rwxr-xr-xsrc/nat_check.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/nat_check.h b/src/nat_check.h
index 3b526c0b..18add5e0 100755
--- a/src/nat_check.h
+++ b/src/nat_check.h
@@ -29,6 +29,7 @@ limitations under the License.
#include <common/Network/Packet/IPv6Header.h>
#include <common/Network/Packet/EthernetHeader.h>
#include "os_time.h"
+#include "nat_check_flow_table.h"
// 2msec timeout
#define MAX_TIME_MSG_IN_QUEUE_SEC ( 0.002 )
@@ -211,22 +212,6 @@ public:
void Dump(FILE *fd);
};
-typedef std::map<uint64_t, uint32_t, std::less<uint64_t> > nat_check_flow_map_t;
-typedef nat_check_flow_map_t::iterator nat_check_flow_map_iter_t;
-
-class CNatCheckFlowTableMap {
-public:
- void erase(uint64_t key) {m_map.erase(key);}
- bool find(uint64_t fid, uint32_t &val);
- void insert(uint64_t key, uint32_t val) {m_map.insert(std::pair<uint64_t, uint32_t>(key, val));}
- void clear(void) {m_map.clear();}
- void dump(FILE *fd);
- uint64_t size(void) {return m_map.size();}
-
-public:
- nat_check_flow_map_t m_map;
-};
-
class CNatRxManager {
public:
@@ -248,7 +233,7 @@ private:
uint8_t m_max_threads;
CNatPerThreadInfo * m_per_thread;
CNatStats m_stats;
- CNatCheckFlowTableMap m_fm;
+ CNatCheckFlowTable m_ft;
};