|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
46 iproto =
ip4->protocol;
52 iproto =
ip6->protocol;
87 case IP_PROTOCOL_ICMP:
89 case IP_PROTOCOL_ICMP6:
111 *
port = clib_net_to_host_u16 (*
port);
131 *
port = clib_host_to_net_u16 (*
port);
static void clib_spinlock_init(clib_spinlock_t *p)
cnat_src_policy_main_t cnat_src_policy_main
cnat_source_policy_errors_t cnat_vip_default_source_policy(vlib_main_t *vm, vlib_buffer_t *b, cnat_session_t *session, u32 *rsession_flags, const cnat_translation_t *ct, cnat_node_ctx_t *ctx)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
A session represents the memory of a translation.
@ CNAT_SOURCE_ERROR_EXHAUSTED_PORTS
void cnat_register_vip_src_policy(cnat_vip_source_policy_t fp)
cnat_source_policy_errors_t(* cnat_vip_source_policy_t)(vlib_main_t *vm, vlib_buffer_t *b, cnat_session_t *session, u32 *rsession_flags, const cnat_translation_t *ct, cnat_node_ctx_t *ctx)
static_always_inline void clib_spinlock_lock(clib_spinlock_t *p)
@ CNAT_SESSION_FLAG_HAS_SNAT
Indicates a return path session that was source NATed on the way in.
cnat_src_port_allocator_t * src_ports
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
int cnat_allocate_port(u16 *port, ip_protocol_t iproto)
cnat_vip_source_policy_t vip_policy
@ CNAT_TRANSLATION_FLAG_ALLOCATE_PORT
static uword clib_bitmap_get_no_check(uword *ai, uword i)
Gets the ith bit value from a bitmap Does not sanity-check the bit position.
#define clib_bitmap_validate(v, n_bits)
#define VLIB_INIT_FUNCTION(x)
static clib_error_t * cnat_src_policy_init(vlib_main_t *vm)
@ CNAT_SESSION_FLAG_ALLOC_PORT
This session source port was allocated, free it on cleanup.
cnat_vip_source_policy_t default_policy
static_always_inline void clib_spinlock_unlock(clib_spinlock_t *p)
enum ip_protocol ip_protocol_t
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
enum cnat_source_policy_errors_ cnat_source_policy_errors_t
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
static cnat_src_port_allocator_t * cnat_get_src_port_allocator(ip_protocol_t iproto)
struct cnat_session_t_::@646 value
this value sits in the same memory location a 'value' in the bihash kvp
u8 flags
Translation flags.
static uword clib_bitmap_set_no_check(uword *a, uword i, uword new_value)
Sets the ith bit of a bitmap to new_value.
void cnat_free_port(u16 port, ip_protocol_t iproto)
void(* cnat_free_port_cb)(u16 port, ip_protocol_t iproto)
Port cleanup callback.
A Translation represents the translation of a VEP to one of a set of real server addresses.
VLIB buffer representation.
u16 cs_port[VLIB_N_DIR]
ports in rx/tx