16 #ifndef __CNAT_SESSION_H__ 17 #define __CNAT_SESSION_H__
This session source port was allocated, free it on cleanup.
This session doesn't have a client, do not attempt to free it.
struct cnat_session_t_::@632 key
this key sits in the same memory location a 'key' in the bihash kvp
u16 cs_port[VLIB_N_DIR]
ports in rx/tx
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
#define STRUCT_OFFSET_OF(t, f)
A session represents the memory of a translation.
enum walk_rc_t_ walk_rc_t
Walk return code.
u8 cs_af
The address family describing the IP addresses.
STATIC_ASSERT(STRUCT_OFFSET_OF(cnat_session_t, key)==STRUCT_OFFSET_OF(clib_bihash_kv_40_48_t, key), "key overlaps")
Ensure the session object correctly overlays the bihash key/value pair.
ip46_address_t cs_ip[VLIB_N_DIR]
IP 4/6 address in the rx/tx direction.
u32 cs_ts_index
Timestamp index this session was last used.
Indicates a return path session that was source NATed on the way in.
enum ip_protocol ip_protocol_t
void cnat_session_free(cnat_session_t *session)
Free a session & update refcounts.
int cnat_session_purge(void)
Purge all the sessions.
u32 ct_index
Persist translation->ct_lb.dpoi_next_node when cs_lbi != INDEX_INVALID.
index_t cs_lbi
The load balance object to use to forward.
u8 * format_cnat_session(u8 *s, va_list *args)
sll srl srl sll sra u16x4 i
u64 cnat_session_scan(vlib_main_t *vm, f64 start_time, int i)
Scan the session DB for expired sessions.
u32 flags
session flags if cs_lbi == INDEX_INVALID
struct cnat_session_t_ cnat_session_t
A session represents the memory of a translation.
void cnat_session_walk(cnat_session_walk_cb_t cb, void *ctx)
Walk/visit each of the cnat session.
ip_protocol_t cs_proto
The IP protocol TCP or UDP only supported.
clib_bihash_40_48_t cnat_session_db
The DB of sessions.
void(* cnat_free_port_cb)(u16 port, ip_protocol_t iproto)
Port cleanup callback.
walk_rc_t(* cnat_session_walk_cb_t)(const cnat_session_t *session, void *ctx)
Callback function invoked during a walk of all translations.
enum cnat_session_flag_t_ cnat_session_flag_t
struct cnat_session_t_::@633 value
this value sits in the same memory location a 'value' in the bihash kvp