summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/Conntrack.h
diff options
context:
space:
mode:
authorYin Lin <linyi@vmware.com>2017-06-09 15:16:06 -0700
committerGurucharan Shetty <guru@ovn.org>2017-06-12 12:08:07 -0700
commitb7a6b3a76be7227a4cdaa5610553aa84f34d88fb (patch)
tree595dbe0b37b524d675eb2b18e86b097090fbb390 /datapath-windows/ovsext/Conntrack.h
parent560cc32cf50a31682a72ca7b42fde64c92114f09 (diff)
downloadopenvswitch-b7a6b3a76be7227a4cdaa5610553aa84f34d88fb.tar.gz
datapath-windows: NAT integration with conntrack
This patch integrates NAT module with existing conntrack module. NAT action is now supported. Signed-off-by: Yin Lin <linyi@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Diffstat (limited to 'datapath-windows/ovsext/Conntrack.h')
-rw-r--r--datapath-windows/ovsext/Conntrack.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/datapath-windows/ovsext/Conntrack.h b/datapath-windows/ovsext/Conntrack.h
index 1ad289f21..fcdd96eef 100644
--- a/datapath-windows/ovsext/Conntrack.h
+++ b/datapath-windows/ovsext/Conntrack.h
@@ -18,8 +18,9 @@
#define __OVS_CONNTRACK_H_ 1
#include "precomp.h"
-#include "Flow.h"
+#include "Actions.h"
#include "Debug.h"
+#include "Flow.h"
#include "Actions.h"
#include <stddef.h>
@@ -87,6 +88,14 @@ typedef struct _OVS_CT_KEY {
UINT64 byteCount;
} OVS_CT_KEY, *POVS_CT_KEY;
+typedef struct _NAT_ACTION_INFO {
+ struct ct_addr minAddr;
+ struct ct_addr maxAddr;
+ uint16_t minPort;
+ uint16_t maxPort;
+ uint16_t natAction;
+} NAT_ACTION_INFO, *PNAT_ACTION_INFO;
+
typedef struct OVS_CT_ENTRY {
OVS_CT_KEY key;
OVS_CT_KEY rev_key;
@@ -95,6 +104,7 @@ typedef struct OVS_CT_ENTRY {
UINT32 mark;
UINT64 timestampStart;
struct ovs_key_ct_labels labels;
+ NAT_ACTION_INFO natInfo;
PVOID parent; /* Points to main connection */
} OVS_CT_ENTRY, *POVS_CT_ENTRY;
@@ -119,14 +129,6 @@ typedef struct OvsConntrackKeyLookupCtx {
BOOLEAN related;
} OvsConntrackKeyLookupCtx;
-typedef struct _NAT_ACTION_INFO {
- struct ct_addr minAddr;
- struct ct_addr maxAddr;
- uint16_t minPort;
- uint16_t maxPort;
- uint16_t natAction;
-} NAT_ACTION_INFO, *PNAT_ACTION_INFO;
-
#define CT_HASH_TABLE_SIZE ((UINT32)1 << 10)
#define CT_HASH_TABLE_MASK (CT_HASH_TABLE_SIZE - 1)
#define CT_INTERVAL_SEC 10000000LL //1s
@@ -225,4 +227,9 @@ NDIS_STATUS OvsCtHandleFtp(PNET_BUFFER_LIST curNbl,
POVS_CT_ENTRY entry,
BOOLEAN request);
+UINT32 OvsHashCtKey(const OVS_CT_KEY *key);
+BOOLEAN OvsCtKeyAreSame(OVS_CT_KEY ctxKey, OVS_CT_KEY entryKey);
+POVS_CT_ENTRY OvsCtLookup(OvsConntrackKeyLookupCtx *ctx);
+
+
#endif /* __OVS_CONNTRACK_H_ */