FD.io VPP  v19.01.3-6-g70449b9b9
Vector Packet Processing
map.h File Reference
+ Include dependency graph for map.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  map_domain_t
 
union  map_ip4_reass_key_t
 
struct  map_ip4_reass_t
 
union  map_ip6_reass_key_t
 
struct  map_ip6_fragment_t
 
struct  map_ip6_reass_t
 
struct  map_main_pre_resolved_t_
 A pre-resolved next-hop. More...
 
struct  map_main_t
 
struct  map_trace_t
 

Macros

#define MAP_SKIP_IP6_LOOKUP   1
 
#define MAP_ERR_GOOD   0
 
#define MAP_ERR_BAD_POOL_SIZE   -1
 
#define MAP_ERR_BAD_HT_RATIO   -2
 
#define MAP_ERR_BAD_LIFETIME   -3
 
#define MAP_ERR_BAD_BUFFERS   -4
 
#define MAP_ERR_BAD_BUFFERS_TOO_LARGE   -5
 
#define MAP_IP4_REASS_LIFETIME_DEFAULT   (100) /* ms */
 IP4 reassembly logic: One virtually reassembled flow requires a map_ip4_reass_t structure in order to keep the first-fragment port number and, optionally, cache out of sequence packets. More...
 
#define MAP_IP4_REASS_HT_RATIO_DEFAULT   (1.0)
 
#define MAP_IP4_REASS_POOL_SIZE_DEFAULT   1024
 
#define MAP_IP4_REASS_BUFFERS_DEFAULT   2048
 
#define MAP_IP4_REASS_MAX_FRAGMENTS_PER_REASSEMBLY   5
 
#define MAP_IP6_REASS_LIFETIME_DEFAULT   (100) /* ms */
 
#define MAP_IP6_REASS_HT_RATIO_DEFAULT   (1.0)
 
#define MAP_IP6_REASS_POOL_SIZE_DEFAULT   1024
 
#define MAP_IP6_REASS_BUFFERS_DEFAULT   2048
 
#define MAP_IP6_REASS_MAX_FRAGMENTS_PER_REASSEMBLY   5
 
#define MAP_IP6_REASS_COUNT_BYTES
 
#define MAP_IP4_REASS_COUNT_BYTES
 
#define MAP_REASS_INDEX_NONE   ((u16)0xffff)
 
#define foreach_map_error
 
#define map_ip4_reass_lock()   while (clib_atomic_test_and_set (map_main.ip4_reass_lock)) {}
 
#define map_ip4_reass_unlock()   do {CLIB_MEMORY_BARRIER(); *map_main.ip4_reass_lock = 0;} while(0)
 
#define map_ip6_reass_lock()   while (clib_atomic_test_and_set (map_main.ip6_reass_lock)) {}
 
#define map_ip6_reass_unlock()   do {CLIB_MEMORY_BARRIER(); *map_main.ip6_reass_lock = 0;} while(0)
 
#define MAP_IP4_REASS_CONF_HT_RATIO_MAX   100
 
#define MAP_IP4_REASS_CONF_POOL_SIZE_MAX   (0xfeff)
 
#define MAP_IP4_REASS_CONF_LIFETIME_MAX   0xffff
 
#define MAP_IP4_REASS_CONF_BUFFERS_MAX   (0xffffffff)
 
#define MAP_IP6_REASS_CONF_HT_RATIO_MAX   100
 
#define MAP_IP6_REASS_CONF_POOL_SIZE_MAX   (0xfeff)
 
#define MAP_IP6_REASS_CONF_LIFETIME_MAX   0xffff
 
#define MAP_IP6_REASS_CONF_BUFFERS_MAX   (0xffffffff)
 

Typedefs

typedef struct map_main_pre_resolved_t_ map_main_pre_resolved_t
 A pre-resolved next-hop. More...
 

Enumerations

enum  map_domain_flags_e { MAP_DOMAIN_PREFIX = 1 << 0, MAP_DOMAIN_TRANSLATION = 1 << 1, MAP_DOMAIN_RFC6052 = 1 << 2 }
 
enum  map_domain_counter_t { MAP_DOMAIN_IPV4_FRAGMENT = 0, MAP_DOMAIN_COUNTER_RX = 0, MAP_DOMAIN_COUNTER_TX, MAP_N_DOMAIN_COUNTER }
 
enum  map_error_t { MAP_N_ERROR }
 

Functions

int map_create_domain (ip4_address_t *ip4_prefix, u8 ip4_prefix_len, ip6_address_t *ip6_prefix, u8 ip6_prefix_len, ip6_address_t *ip6_src, u8 ip6_src_len, u8 ea_bits_len, u8 psid_offset, u8 psid_length, u32 *map_domain_index, u16 mtu, u8 flags)
 
int map_delete_domain (u32 map_domain_index)
 
int map_add_del_psid (u32 map_domain_index, u16 psid, ip6_address_t *tep, bool is_add)
 
int map_if_enable_disable (bool is_enable, u32 sw_if_index, bool is_translation)
 
u8format_map_trace (u8 *s, va_list *args)
 
int map_param_set_fragmentation (bool inner, bool ignore_df)
 
int map_param_set_icmp (ip4_address_t *ip4_err_relay_src)
 
int map_param_set_icmp6 (u8 enable_unreachable)
 
void map_pre_resolve (ip4_address_t *ip4, ip6_address_t *ip6, bool is_del)
 
int map_param_set_reassembly (bool is_ipv6, u16 lifetime_ms, u16 pool_size, u32 buffers, f64 ht_ratio, u32 *reass, u32 *packets)
 
int map_param_set_security_check (bool enable, bool fragments)
 
int map_param_set_traffic_class (bool copy, u8 tc)
 
int map_param_set_tcp (u16 tcp_mss)
 
 STATIC_ASSERT ((sizeof(map_domain_t)<=CLIB_CACHE_LINE_BYTES), "MAP domain fits in one cacheline")
 
u64 map_error_counter_get (u32 node_index, map_error_t map_error)
 
static_always_inline u64 map_get_pfx (map_domain_t *d, u32 addr, u16 port)
 
static_always_inline u64 map_get_pfx_net (map_domain_t *d, u32 addr, u16 port)
 
static_always_inline u64 map_get_sfx (map_domain_t *d, u32 addr, u16 port)
 
static_always_inline u64 map_get_sfx_net (map_domain_t *d, u32 addr, u16 port)
 
static_always_inline u32 map_get_ip4 (ip6_address_t *addr, u16 prefix_len)
 
static_always_inline map_domain_tip4_map_get_domain (ip4_address_t *addr, u32 *map_domain_index, u8 *error)
 
static_always_inline map_domain_tip6_map_get_domain (ip6_address_t *addr, u32 *map_domain_index, u8 *error)
 
map_ip4_reass_tmap_ip4_reass_get (u32 src, u32 dst, u16 fragment_id, u8 protocol, u32 **pi_to_drop)
 
void map_ip4_reass_free (map_ip4_reass_t *r, u32 **pi_to_drop)
 
static_always_inline void map_ip4_reass_get_fragments (map_ip4_reass_t *r, u32 **pi)
 
clib_error_tmap_plugin_api_hookup (vlib_main_t *vm)
 
int map_ip4_reass_add_fragment (map_ip4_reass_t *r, u32 pi)
 
map_ip6_reass_tmap_ip6_reass_get (ip6_address_t *src, ip6_address_t *dst, u32 fragment_id, u8 protocol, u32 **pi_to_drop)
 
void map_ip6_reass_free (map_ip6_reass_t *r, u32 **pi_to_drop)
 
int map_ip6_reass_add_fragment (map_ip6_reass_t *r, u32 pi, u16 data_offset, u16 next_data_offset, u8 *data_start, u16 data_len)
 
void map_ip4_drop_pi (u32 pi)
 
int map_ip4_reass_conf_ht_ratio (f32 ht_ratio, u32 *trashed_reass, u32 *dropped_packets)
 
int map_ip4_reass_conf_pool_size (u16 pool_size, u32 *trashed_reass, u32 *dropped_packets)
 
int map_ip4_reass_conf_lifetime (u16 lifetime_ms)
 
int map_ip4_reass_conf_buffers (u32 buffers)
 
void map_ip6_drop_pi (u32 pi)
 
int map_ip6_reass_conf_ht_ratio (f32 ht_ratio, u32 *trashed_reass, u32 *dropped_packets)
 
int map_ip6_reass_conf_pool_size (u16 pool_size, u32 *trashed_reass, u32 *dropped_packets)
 
int map_ip6_reass_conf_lifetime (u16 lifetime_ms)
 
int map_ip6_reass_conf_buffers (u32 buffers)
 
static_always_inline void ip4_map_t_embedded_address (map_domain_t *d, ip6_address_t *ip6, const ip4_address_t *ip4)
 
static_always_inline u32 ip6_map_t_embedded_address (map_domain_t *d, ip6_address_t *addr)
 
static void map_domain_counter_lock (map_main_t *mm)
 
static void map_domain_counter_unlock (map_main_t *mm)
 
static_always_inline void map_send_all_to_node (vlib_main_t *vm, u32 *pi_vector, vlib_node_runtime_t *node, vlib_error_t *error, u32 next)
 
static_always_inline void map_mss_clamping (tcp_header_t *tcp, ip_csum_t *sum, u16 mss_clamping)
 

Variables

map_main_pre_resolved_t pre_resolved [FIB_PROTOCOL_MAX]
 Pre-resolved next hops for v4 and v6. More...
 
map_main_t map_main
 
vlib_node_registration_t ip4_map_node
 (constructor) VLIB_REGISTER_NODE (ip4_map_node) More...
 
vlib_node_registration_t ip6_map_node
 (constructor) VLIB_REGISTER_NODE (ip6_map_node) More...
 
vlib_node_registration_t ip4_map_t_node
 (constructor) VLIB_REGISTER_NODE (ip4_map_t_node) More...
 
vlib_node_registration_t ip4_map_t_fragmented_node
 (constructor) VLIB_REGISTER_NODE (ip4_map_t_fragmented_node) More...
 
vlib_node_registration_t ip4_map_t_tcp_udp_node
 (constructor) VLIB_REGISTER_NODE (ip4_map_t_tcp_udp_node) More...
 
vlib_node_registration_t ip4_map_t_icmp_node
 (constructor) VLIB_REGISTER_NODE (ip4_map_t_icmp_node) More...
 
vlib_node_registration_t ip6_map_t_node
 (constructor) VLIB_REGISTER_NODE (ip6_map_t_node) More...
 
vlib_node_registration_t ip6_map_t_fragmented_node
 (constructor) VLIB_REGISTER_NODE (ip6_map_t_fragmented_node) More...
 
vlib_node_registration_t ip6_map_t_tcp_udp_node
 (constructor) VLIB_REGISTER_NODE (ip6_map_t_tcp_udp_node) More...
 
vlib_node_registration_t ip6_map_t_icmp_node
 (constructor) VLIB_REGISTER_NODE (ip6_map_t_icmp_node) More...
 

Macro Definition Documentation

◆ foreach_map_error

#define foreach_map_error
Value:
/* Must be first. */ \
_(NONE, "valid MAP packets") \
_(BAD_PROTOCOL, "bad protocol") \
_(SEC_CHECK, "security check failed") \
_(ENCAP_SEC_CHECK, "encap security check failed") \
_(DECAP_SEC_CHECK, "decap security check failed") \
_(ICMP, "unable to translate ICMP") \
_(ICMP_RELAY, "unable to relay ICMP") \
_(UNKNOWN, "unknown") \
_(NO_BINDING, "no binding") \
_(NO_DOMAIN, "no domain") \
_(FRAGMENTED, "packet is a fragment") \
_(FRAGMENT_MEMORY, "could not cache fragment") \
_(FRAGMENT_MALFORMED, "fragment has unexpected format")\
_(FRAGMENT_DROPPED, "dropped cached fragment") \
_(MALFORMED, "malformed packet") \
_(DF_SET, "can't fragment, DF set")

Definition at line 337 of file map.h.

◆ MAP_ERR_BAD_BUFFERS

#define MAP_ERR_BAD_BUFFERS   -4

Definition at line 32 of file map.h.

◆ MAP_ERR_BAD_BUFFERS_TOO_LARGE

#define MAP_ERR_BAD_BUFFERS_TOO_LARGE   -5

Definition at line 33 of file map.h.

◆ MAP_ERR_BAD_HT_RATIO

#define MAP_ERR_BAD_HT_RATIO   -2

Definition at line 30 of file map.h.

◆ MAP_ERR_BAD_LIFETIME

#define MAP_ERR_BAD_LIFETIME   -3

Definition at line 31 of file map.h.

◆ MAP_ERR_BAD_POOL_SIZE

#define MAP_ERR_BAD_POOL_SIZE   -1

Definition at line 29 of file map.h.

◆ MAP_ERR_GOOD

#define MAP_ERR_GOOD   0

Definition at line 28 of file map.h.

◆ MAP_IP4_REASS_BUFFERS_DEFAULT

#define MAP_IP4_REASS_BUFFERS_DEFAULT   2048

Definition at line 82 of file map.h.

◆ MAP_IP4_REASS_CONF_BUFFERS_MAX

#define MAP_IP4_REASS_CONF_BUFFERS_MAX   (0xffffffff)

Definition at line 534 of file map.h.

◆ MAP_IP4_REASS_CONF_HT_RATIO_MAX

#define MAP_IP4_REASS_CONF_HT_RATIO_MAX   100

Definition at line 528 of file map.h.

◆ MAP_IP4_REASS_CONF_LIFETIME_MAX

#define MAP_IP4_REASS_CONF_LIFETIME_MAX   0xffff

Definition at line 532 of file map.h.

◆ MAP_IP4_REASS_CONF_POOL_SIZE_MAX

#define MAP_IP4_REASS_CONF_POOL_SIZE_MAX   (0xfeff)

Definition at line 530 of file map.h.

◆ MAP_IP4_REASS_COUNT_BYTES

#define MAP_IP4_REASS_COUNT_BYTES

Definition at line 94 of file map.h.

◆ MAP_IP4_REASS_HT_RATIO_DEFAULT

#define MAP_IP4_REASS_HT_RATIO_DEFAULT   (1.0)

Definition at line 80 of file map.h.

◆ MAP_IP4_REASS_LIFETIME_DEFAULT

#define MAP_IP4_REASS_LIFETIME_DEFAULT   (100) /* ms */

IP4 reassembly logic: One virtually reassembled flow requires a map_ip4_reass_t structure in order to keep the first-fragment port number and, optionally, cache out of sequence packets.

There are up to MAP_IP4_REASS_MAX_REASSEMBLY such structures. When in use, those structures are stored in a hash table of MAP_IP4_REASS_BUCKETS buckets. When a new structure needs to be used, it is allocated from available ones. If there is no structure available, the oldest in use is selected and used if and only if it was first allocated more than MAP_IP4_REASS_LIFETIME seconds ago. In case no structure can be allocated, the fragment is dropped.

Definition at line 79 of file map.h.

◆ map_ip4_reass_lock

#define map_ip4_reass_lock ( )    while (clib_atomic_test_and_set (map_main.ip4_reass_lock)) {}

Definition at line 492 of file map.h.

◆ MAP_IP4_REASS_MAX_FRAGMENTS_PER_REASSEMBLY

#define MAP_IP4_REASS_MAX_FRAGMENTS_PER_REASSEMBLY   5

Definition at line 84 of file map.h.

◆ MAP_IP4_REASS_POOL_SIZE_DEFAULT

#define MAP_IP4_REASS_POOL_SIZE_DEFAULT   1024

Definition at line 81 of file map.h.

◆ map_ip4_reass_unlock

#define map_ip4_reass_unlock ( )    do {CLIB_MEMORY_BARRIER(); *map_main.ip4_reass_lock = 0;} while(0)

Definition at line 493 of file map.h.

◆ MAP_IP6_REASS_BUFFERS_DEFAULT

#define MAP_IP6_REASS_BUFFERS_DEFAULT   2048

Definition at line 89 of file map.h.

◆ MAP_IP6_REASS_CONF_BUFFERS_MAX

#define MAP_IP6_REASS_CONF_BUFFERS_MAX   (0xffffffff)

Definition at line 546 of file map.h.

◆ MAP_IP6_REASS_CONF_HT_RATIO_MAX

#define MAP_IP6_REASS_CONF_HT_RATIO_MAX   100

Definition at line 540 of file map.h.

◆ MAP_IP6_REASS_CONF_LIFETIME_MAX

#define MAP_IP6_REASS_CONF_LIFETIME_MAX   0xffff

Definition at line 544 of file map.h.

◆ MAP_IP6_REASS_CONF_POOL_SIZE_MAX

#define MAP_IP6_REASS_CONF_POOL_SIZE_MAX   (0xfeff)

Definition at line 542 of file map.h.

◆ MAP_IP6_REASS_COUNT_BYTES

#define MAP_IP6_REASS_COUNT_BYTES

Definition at line 93 of file map.h.

◆ MAP_IP6_REASS_HT_RATIO_DEFAULT

#define MAP_IP6_REASS_HT_RATIO_DEFAULT   (1.0)

Definition at line 87 of file map.h.

◆ MAP_IP6_REASS_LIFETIME_DEFAULT

#define MAP_IP6_REASS_LIFETIME_DEFAULT   (100) /* ms */

Definition at line 86 of file map.h.

◆ map_ip6_reass_lock

#define map_ip6_reass_lock ( )    while (clib_atomic_test_and_set (map_main.ip6_reass_lock)) {}

Definition at line 517 of file map.h.

◆ MAP_IP6_REASS_MAX_FRAGMENTS_PER_REASSEMBLY

#define MAP_IP6_REASS_MAX_FRAGMENTS_PER_REASSEMBLY   5

Definition at line 91 of file map.h.

◆ MAP_IP6_REASS_POOL_SIZE_DEFAULT

#define MAP_IP6_REASS_POOL_SIZE_DEFAULT   1024

Definition at line 88 of file map.h.

◆ map_ip6_reass_unlock

#define map_ip6_reass_unlock ( )    do {CLIB_MEMORY_BARRIER(); *map_main.ip6_reass_lock = 0;} while(0)

Definition at line 518 of file map.h.

◆ MAP_REASS_INDEX_NONE

#define MAP_REASS_INDEX_NONE   ((u16)0xffff)

Definition at line 132 of file map.h.

◆ MAP_SKIP_IP6_LOOKUP

#define MAP_SKIP_IP6_LOOKUP   1

Definition at line 26 of file map.h.

Typedef Documentation

◆ map_main_pre_resolved_t

A pre-resolved next-hop.

Enumeration Type Documentation

◆ map_domain_counter_t

Enumerator
MAP_DOMAIN_IPV4_FRAGMENT 
MAP_DOMAIN_COUNTER_RX 
MAP_DOMAIN_COUNTER_TX 
MAP_N_DOMAIN_COUNTER 

Definition at line 169 of file map.h.

◆ map_domain_flags_e

Enumerator
MAP_DOMAIN_PREFIX 
MAP_DOMAIN_TRANSLATION 
MAP_DOMAIN_RFC6052 

Definition at line 59 of file map.h.

◆ map_error_t

Enumerator
MAP_N_ERROR 

Definition at line 356 of file map.h.

Function Documentation

◆ format_map_trace()

u8* format_map_trace ( u8 s,
va_list *  args 
)

Definition at line 1303 of file map.c.

+ Here is the call graph for this function:

◆ ip4_map_get_domain()

static_always_inline map_domain_t* ip4_map_get_domain ( ip4_address_t addr,
u32 map_domain_index,
u8 error 
)

Definition at line 452 of file map.h.

+ Here is the caller graph for this function:

◆ ip4_map_t_embedded_address()

static_always_inline void ip4_map_t_embedded_address ( map_domain_t d,
ip6_address_t ip6,
const ip4_address_t ip4 
)

Definition at line 552 of file map.h.

+ Here is the caller graph for this function:

◆ ip6_map_get_domain()

static_always_inline map_domain_t* ip6_map_get_domain ( ip6_address_t addr,
u32 map_domain_index,
u8 error 
)

Definition at line 471 of file map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip6_map_t_embedded_address()

static_always_inline u32 ip6_map_t_embedded_address ( map_domain_t d,
ip6_address_t addr 
)

Definition at line 563 of file map.h.

+ Here is the caller graph for this function:

◆ map_add_del_psid()

int map_add_del_psid ( u32  map_domain_index,
u16  psid,
ip6_address_t tep,
bool  is_add 
)

Definition at line 186 of file map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_create_domain()

int map_create_domain ( ip4_address_t ip4_prefix,
u8  ip4_prefix_len,
ip6_address_t ip6_prefix,
u8  ip6_prefix_len,
ip6_address_t ip6_src,
u8  ip6_src_len,
u8  ea_bits_len,
u8  psid_offset,
u8  psid_length,
u32 map_domain_index,
u16  mtu,
u8  flags 
)

Definition at line 64 of file map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_delete_domain()

int map_delete_domain ( u32  map_domain_index)

Definition at line 158 of file map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_domain_counter_lock()

static void map_domain_counter_lock ( map_main_t mm)
inlinestatic

Definition at line 573 of file map.h.

+ Here is the caller graph for this function:

◆ map_domain_counter_unlock()

static void map_domain_counter_unlock ( map_main_t mm)
inlinestatic

Definition at line 580 of file map.h.

+ Here is the caller graph for this function:

◆ map_error_counter_get()

u64 map_error_counter_get ( u32  node_index,
map_error_t  map_error 
)

Definition at line 1028 of file map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_get_ip4()

static_always_inline u32 map_get_ip4 ( ip6_address_t addr,
u16  prefix_len 
)

Definition at line 442 of file map.h.

+ Here is the caller graph for this function:

◆ map_get_pfx()

static_always_inline u64 map_get_pfx ( map_domain_t d,
u32  addr,
u16  port 
)

Definition at line 389 of file map.h.

+ Here is the caller graph for this function:

◆ map_get_pfx_net()

static_always_inline u64 map_get_pfx_net ( map_domain_t d,
u32  addr,
u16  port 
)

Definition at line 403 of file map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_get_sfx()

static_always_inline u64 map_get_sfx ( map_domain_t d,
u32  addr,
u16  port 
)

Definition at line 413 of file map.h.

+ Here is the caller graph for this function:

◆ map_get_sfx_net()

static_always_inline u64 map_get_sfx_net ( map_domain_t d,
u32  addr,
u16  port 
)

Definition at line 435 of file map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_if_enable_disable()

int map_if_enable_disable ( bool  is_enable,
u32  sw_if_index,
bool  is_translation 
)

Definition at line 601 of file map_api.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_ip4_drop_pi()

void map_ip4_drop_pi ( u32  pi)

Definition at line 661 of file ip6_map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_ip4_reass_add_fragment()

int map_ip4_reass_add_fragment ( map_ip4_reass_t r,
u32  pi 
)

Definition at line 1464 of file map.c.

+ Here is the caller graph for this function:

◆ map_ip4_reass_conf_buffers()

int map_ip4_reass_conf_buffers ( u32  buffers)

Definition at line 1794 of file map.c.

+ Here is the caller graph for this function:

◆ map_ip4_reass_conf_ht_ratio()

int map_ip4_reass_conf_ht_ratio ( f32  ht_ratio,
u32 trashed_reass,
u32 dropped_packets 
)

Definition at line 1755 of file map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_ip4_reass_conf_lifetime()

int map_ip4_reass_conf_lifetime ( u16  lifetime_ms)

Definition at line 1787 of file map.c.

+ Here is the caller graph for this function:

◆ map_ip4_reass_conf_pool_size()

int map_ip4_reass_conf_pool_size ( u16  pool_size,
u32 trashed_reass,
u32 dropped_packets 
)

Definition at line 1772 of file map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_ip4_reass_free()

void map_ip4_reass_free ( map_ip4_reass_t r,
u32 **  pi_to_drop 
)

Definition at line 1340 of file map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_ip4_reass_get()

map_ip4_reass_t* map_ip4_reass_get ( u32  src,
u32  dst,
u16  fragment_id,
u8  protocol,
u32 **  pi_to_drop 
)

Definition at line 1383 of file map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_ip4_reass_get_fragments()

static_always_inline void map_ip4_reass_get_fragments ( map_ip4_reass_t r,
u32 **  pi 
)

Definition at line 496 of file map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_ip6_drop_pi()

void map_ip6_drop_pi ( u32  pi)

Definition at line 652 of file ip6_map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_ip6_reass_add_fragment()

int map_ip6_reass_add_fragment ( map_ip6_reass_t r,
u32  pi,
u16  data_offset,
u16  next_data_offset,
u8 data_start,
u16  data_len 
)

Definition at line 1643 of file map.c.

+ Here is the caller graph for this function:

◆ map_ip6_reass_conf_buffers()

int map_ip6_reass_conf_buffers ( u32  buffers)

Definition at line 1877 of file map.c.

+ Here is the caller graph for this function:

◆ map_ip6_reass_conf_ht_ratio()

int map_ip6_reass_conf_ht_ratio ( f32  ht_ratio,
u32 trashed_reass,
u32 dropped_packets 
)

Definition at line 1838 of file map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_ip6_reass_conf_lifetime()

int map_ip6_reass_conf_lifetime ( u16  lifetime_ms)

Definition at line 1870 of file map.c.

+ Here is the caller graph for this function:

◆ map_ip6_reass_conf_pool_size()

int map_ip6_reass_conf_pool_size ( u16  pool_size,
u32 trashed_reass,
u32 dropped_packets 
)

Definition at line 1855 of file map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_ip6_reass_free()

void map_ip6_reass_free ( map_ip6_reass_t r,
u32 **  pi_to_drop 
)

Definition at line 1503 of file map.c.

+ Here is the caller graph for this function:

◆ map_ip6_reass_get()

map_ip6_reass_t* map_ip6_reass_get ( ip6_address_t src,
ip6_address_t dst,
u32  fragment_id,
u8  protocol,
u32 **  pi_to_drop 
)

Definition at line 1555 of file map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_mss_clamping()

static_always_inline void map_mss_clamping ( tcp_header_t tcp,
ip_csum_t sum,
u16  mss_clamping 
)

Definition at line 614 of file map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_param_set_fragmentation()

int map_param_set_fragmentation ( bool  inner,
bool  ignore_df 
)

Definition at line 250 of file map_api.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_param_set_icmp()

int map_param_set_icmp ( ip4_address_t ip4_err_relay_src)

Definition at line 275 of file map_api.c.

+ Here is the caller graph for this function:

◆ map_param_set_icmp6()

int map_param_set_icmp6 ( u8  enable_unreachable)

Definition at line 302 of file map_api.c.

+ Here is the caller graph for this function:

◆ map_param_set_reassembly()

int map_param_set_reassembly ( bool  is_ipv6,
u16  lifetime_ms,
u16  pool_size,
u32  buffers,
f64  ht_ratio,
u32 reass,
u32 packets 
)

Definition at line 340 of file map_api.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_param_set_security_check()

int map_param_set_security_check ( bool  enable,
bool  fragments 
)

Definition at line 473 of file map_api.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_param_set_tcp()

int map_param_set_tcp ( u16  tcp_mss)

Definition at line 523 of file map_api.c.

+ Here is the caller graph for this function:

◆ map_param_set_traffic_class()

int map_param_set_traffic_class ( bool  copy,
u8  tc 
)

Definition at line 498 of file map_api.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_plugin_api_hookup()

clib_error_t* map_plugin_api_hookup ( vlib_main_t vm)

Definition at line 700 of file map_api.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_pre_resolve()

void map_pre_resolve ( ip4_address_t ip4,
ip6_address_t ip6,
bool  is_del 
)

Definition at line 365 of file map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map_send_all_to_node()

static_always_inline void map_send_all_to_node ( vlib_main_t vm,
u32 pi_vector,
vlib_node_runtime_t node,
vlib_error_t error,
u32  next 
)

Definition at line 588 of file map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ STATIC_ASSERT()

STATIC_ASSERT ( (sizeof(map_domain_t)<=CLIB_CACHE_LINE_BYTES ,
"MAP domain fits in one cacheline"   
)

Variable Documentation

◆ ip4_map_node

(constructor) VLIB_REGISTER_NODE (ip4_map_node)

Definition at line 719 of file ip4_map.c.

◆ ip4_map_t_fragmented_node

vlib_node_registration_t ip4_map_t_fragmented_node

(constructor) VLIB_REGISTER_NODE (ip4_map_t_fragmented_node)

Definition at line 682 of file ip4_map_t.c.

◆ ip4_map_t_icmp_node

vlib_node_registration_t ip4_map_t_icmp_node

(constructor) VLIB_REGISTER_NODE (ip4_map_t_icmp_node)

Definition at line 702 of file ip4_map_t.c.

◆ ip4_map_t_node

vlib_node_registration_t ip4_map_t_node

(constructor) VLIB_REGISTER_NODE (ip4_map_t_node)

Definition at line 742 of file ip4_map_t.c.

◆ ip4_map_t_tcp_udp_node

vlib_node_registration_t ip4_map_t_tcp_udp_node

(constructor) VLIB_REGISTER_NODE (ip4_map_t_tcp_udp_node)

Definition at line 722 of file ip4_map_t.c.

◆ ip6_map_node

(constructor) VLIB_REGISTER_NODE (ip6_map_node)

Definition at line 1181 of file ip6_map.c.

◆ ip6_map_t_fragmented_node

vlib_node_registration_t ip6_map_t_fragmented_node

(constructor) VLIB_REGISTER_NODE (ip6_map_t_fragmented_node)

Definition at line 706 of file ip6_map_t.c.

◆ ip6_map_t_icmp_node

vlib_node_registration_t ip6_map_t_icmp_node

(constructor) VLIB_REGISTER_NODE (ip6_map_t_icmp_node)

Definition at line 727 of file ip6_map_t.c.

◆ ip6_map_t_node

vlib_node_registration_t ip6_map_t_node

(constructor) VLIB_REGISTER_NODE (ip6_map_t_node)

Definition at line 775 of file ip6_map_t.c.

◆ ip6_map_t_tcp_udp_node

vlib_node_registration_t ip6_map_t_tcp_udp_node

(constructor) VLIB_REGISTER_NODE (ip6_map_t_tcp_udp_node)

Definition at line 748 of file ip6_map_t.c.

◆ map_main

map_main_t map_main

Definition at line 26 of file map.c.

◆ pre_resolved

Pre-resolved next hops for v4 and v6.

Why these are global and not per-domain is beyond me.

Pre-resolved next hops for v4 and v6.

Definition at line 234 of file map.c.