16 #ifndef __CNAT_SESSION_H__ 17 #define __CNAT_SESSION_H__
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.
enum ip_protocol ip_protocol_t
int cnat_session_purge(void)
Purge all the sessions.
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
Indicates a return path session that was source NATed on the way in.
struct cnat_session_t_::@637 value
this value sits in the same memory location a 'value' in the bihash kvp
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.
struct cnat_session_t_::@636 key
this key sits in the same memory location a 'key' in the bihash kvp
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