summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat44-ei/nat44_ei.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/nat/nat44-ei/nat44_ei.h')
-rw-r--r--src/plugins/nat/nat44-ei/nat44_ei.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/nat/nat44-ei/nat44_ei.h b/src/plugins/nat/nat44-ei/nat44_ei.h
index 5f42b834094..b8b339b8e89 100644
--- a/src/plugins/nat/nat44-ei/nat44_ei.h
+++ b/src/plugins/nat/nat44-ei/nat44_ei.h
@@ -63,8 +63,9 @@ typedef enum
#define NAT44_EI_SESSION_FLAG_UNKNOWN_PROTO (1 << 1)
/* Static mapping flags */
-#define NAT44_EI_SM_FLAG_ADDR_ONLY (1 << 0)
-#define NAT44_EI_SM_FLAG_IDENTITY_NAT (1 << 1)
+#define NAT44_EI_SM_FLAG_ADDR_ONLY (1 << 0)
+#define NAT44_EI_SM_FLAG_IDENTITY_NAT (1 << 1)
+#define NAT44_EI_SM_FLAG_SWITCH_ADDRESS (1 << 2)
typedef struct
{
@@ -678,6 +679,12 @@ is_sm_identity_nat (u32 f)
return (f & NAT44_EI_SM_FLAG_IDENTITY_NAT);
}
+always_inline bool
+is_sm_switch_address (u32 f)
+{
+ return (f & NAT44_EI_SM_FLAG_SWITCH_ADDRESS);
+}
+
/* logging */
#define nat44_ei_log_err(...) \
vlib_log (VLIB_LOG_LEVEL_ERR, nat44_ei_main.log_class, __VA_ARGS__)