Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
NAT44: nat44_add_del_lb_static_mapping enhancements (VPP-1514)
[vpp.git]
/
src
/
plugins
/
nat
/
nat.h
diff --git
a/src/plugins/nat/nat.h
b/src/plugins/nat/nat.h
index
02d4aae
..
e851e2f
100644
(file)
--- a/
src/plugins/nat/nat.h
+++ b/
src/plugins/nat/nat.h
@@
-165,6
+165,7
@@
typedef enum
#define NAT44_SES_O2I_FIN_ACK 8
#define NAT44_SES_I2O_SYN 16
#define NAT44_SES_O2I_SYN 32
#define NAT44_SES_O2I_FIN_ACK 8
#define NAT44_SES_I2O_SYN 16
#define NAT44_SES_O2I_SYN 32
+#define NAT44_SES_RST 64
/* Session flags */
#define SNAT_SESSION_FLAG_STATIC_MAPPING 1
/* Session flags */
#define SNAT_SESSION_FLAG_STATIC_MAPPING 1
@@
-221,6
+222,9
@@
typedef CLIB_PACKED(struct
u8 state;
u32 i2o_fin_seq;
u32 o2i_fin_seq;
u8 state;
u32 i2o_fin_seq;
u32 o2i_fin_seq;
+
+ /* user index */
+ u32 user_index;
}) snat_session_t;
/* *INDENT-ON* */
}) snat_session_t;
/* *INDENT-ON* */
@@
-855,6
+859,11
@@
int nat44_add_del_lb_static_mapping (ip4_address_t e_addr, u16 e_port,
twice_nat_type_t twice_nat,
u8 out2in_only, u8 * tag, u32 affinity);
twice_nat_type_t twice_nat,
u8 out2in_only, u8 * tag, u32 affinity);
+int nat44_lb_static_mapping_add_del_local (ip4_address_t e_addr, u16 e_port,
+ ip4_address_t l_addr, u16 l_port,
+ snat_protocol_t proto, u32 vrf_id,
+ u8 probability, u8 is_add);
+
clib_error_t *snat_api_init (vlib_main_t * vm, snat_main_t * sm);
/**
clib_error_t *snat_api_init (vlib_main_t * vm, snat_main_t * sm);
/**