aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/lib/lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/nat/lib/lib.h')
-rw-r--r--src/plugins/nat/lib/lib.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/plugins/nat/lib/lib.h b/src/plugins/nat/lib/lib.h
index bd1c43338e6..febe829ce56 100644
--- a/src/plugins/nat/lib/lib.h
+++ b/src/plugins/nat/lib/lib.h
@@ -19,6 +19,28 @@
#ifndef included_nat_lib_h__
#define included_nat_lib_h__
+#include <vlibapi/api.h>
+
+/* NAT API Configuration flags */
+#define foreach_nat_config_flag \
+ _(0x01, IS_TWICE_NAT) \
+ _(0x02, IS_SELF_TWICE_NAT) \
+ _(0x04, IS_OUT2IN_ONLY) \
+ _(0x08, IS_ADDR_ONLY) \
+ _(0x10, IS_OUTSIDE) \
+ _(0x20, IS_INSIDE) \
+ _(0x40, IS_STATIC) \
+ _(0x80, IS_EXT_HOST_VALID)
+
+typedef enum nat_config_flags_t_
+{
+#define _(n,f) NAT_API_##f = n,
+ foreach_nat_config_flag
+#undef _
+} nat_config_flags_t;
+
+#define foreach_nat_counter _ (tcp) _ (udp) _ (icmp) _ (other) _ (drops)
+
#define foreach_nat_error \
_ (VALUE_EXIST, -1, "Value already exists") \
_ (NO_SUCH_ENTRY, -2, "No such entry") \
@@ -45,6 +67,14 @@ typedef enum
#undef _
} nat_protocol_t;
+/* default session timeouts */
+#define NAT_UDP_TIMEOUT 300
+#define NAT_TCP_TRANSITORY_TIMEOUT 240
+#define NAT_TCP_ESTABLISHED_TIMEOUT 7440
+#define NAT_ICMP_TIMEOUT 60
+
+// TODO: move common formating definitions here
+
#endif /* included_nat_lib_h__ */
/*
* fd.io coding-style-patch-verification: ON