diff options
author | Anand Kumar <kumaranand@vmware.com> | 2017-06-09 15:16:04 -0700 |
---|---|---|
committer | Gurucharan Shetty <guru@ovn.org> | 2017-06-12 12:07:02 -0700 |
commit | 1ef6b404a8a53c7d85644c8f0a690a0eebb1985b (patch) | |
tree | 781e4865f3fc767286f2ec49a80c3be825888196 /datapath-windows/ovsext/Conntrack.h | |
parent | 5bcd47540f112a53c9d35f2f46395ba82fe6e1fa (diff) | |
download | openvswitch-1ef6b404a8a53c7d85644c8f0a690a0eebb1985b.tar.gz |
datapath-windows: Add support for NAT in conntrack
Add support for parsing netlink attributes related to NAT
in conntrack.
Co-Authored-by: Yin Lin <linyi@vmware.com>
Co-Authored-by: Darrell Ball <dlu998@gmail.com>
Signed-off-by: Anand Kumar <kumaranand@vmware.com>
Signed-off-by: Yin Lin <linyi@vmware.com>
Signed-off-by: Darrell Ball <dlu998@gmail.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.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/datapath-windows/ovsext/Conntrack.h b/datapath-windows/ovsext/Conntrack.h index 87d7eebf8..1ad289f21 100644 --- a/datapath-windows/ovsext/Conntrack.h +++ b/datapath-windows/ovsext/Conntrack.h @@ -68,6 +68,15 @@ typedef struct MD_LABELS { struct ovs_key_ct_labels mask; } MD_LABELS; +typedef enum NAT_ACTION { + NAT_ACTION_NONE = 0, + NAT_ACTION_REVERSE = 1 << 0, + NAT_ACTION_SRC = 1 << 1, + NAT_ACTION_SRC_PORT = 1 << 2, + NAT_ACTION_DST = 1 << 3, + NAT_ACTION_DST_PORT = 1 << 4, +}; + typedef struct _OVS_CT_KEY { struct ct_endpoint src; struct ct_endpoint dst; @@ -110,6 +119,14 @@ 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 |