FD.io VPP  v16.06
Vector Packet Processing
ip4_map.c File Reference
+ Include dependency graph for ip4_map.c:

Go to the source code of this file.

Data Structures

struct  map_ip4_map_reass_trace_t
 

Macros

#define MAP_ENCAP_DUAL   0
 

Enumerations

enum  ip4_map_next_e {
  IP4_MAP_NEXT_IP6_LOOKUP, IP4_MAP_NEXT_IP6_REWRITE, IP4_MAP_NEXT_IP4_FRAGMENT, IP4_MAP_NEXT_IP6_FRAGMENT,
  IP4_MAP_NEXT_REASS, IP4_MAP_NEXT_ICMP_ERROR, IP4_MAP_NEXT_DROP, IP4_MAP_N_NEXT
}
 
enum  ip4_map_reass_next_t { IP4_MAP_REASS_NEXT_IP6_LOOKUP, IP4_MAP_REASS_NEXT_IP4_FRAGMENT, IP4_MAP_REASS_NEXT_DROP, IP4_MAP_REASS_N_NEXT }
 

Functions

u8format_ip4_map_reass_trace (u8 *s, va_list *args)
 
u16 ip4_map_get_port (ip4_header_t *ip, map_dir_e dir)
 
static_always_inline u16 ip4_map_port_and_security_check (map_domain_t *d, ip4_header_t *ip, u32 *next, u8 *error)
 
static_always_inline u32 ip4_map_vtcfl (ip4_header_t *ip4, vlib_buffer_t *p)
 
static_always_inline bool ip4_map_ip6_lookup_bypass (vlib_buffer_t *p0, ip4_header_t *ip)
 
static void ip4_map_decrement_ttl (ip4_header_t *ip, u8 *error)
 
static u32 ip4_map_fragment (vlib_buffer_t *b, u16 mtu, bool df, u8 *error)
 
static uword ip4_map (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip4_map_reass (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 

Variables

vlib_node_registration_t ip4_map_reass_node
 (constructor) VLIB_REGISTER_NODE (ip4_map_reass_node) More...
 
static char * map_error_strings []
 
vlib_node_registration_t ip4_map_node
 (constructor) VLIB_REGISTER_NODE (ip4_map_node) More...
 

Macro Definition Documentation

#define MAP_ENCAP_DUAL   0

Definition at line 18 of file ip4_map.c.

Enumeration Type Documentation

Enumerator
IP4_MAP_NEXT_IP6_LOOKUP 
IP4_MAP_NEXT_IP6_REWRITE 
IP4_MAP_NEXT_IP4_FRAGMENT 
IP4_MAP_NEXT_IP6_FRAGMENT 
IP4_MAP_NEXT_REASS 
IP4_MAP_NEXT_ICMP_ERROR 
IP4_MAP_NEXT_DROP 
IP4_MAP_N_NEXT 

Definition at line 25 of file ip4_map.c.

Enumerator
IP4_MAP_REASS_NEXT_IP6_LOOKUP 
IP4_MAP_REASS_NEXT_IP4_FRAGMENT 
IP4_MAP_REASS_NEXT_DROP 
IP4_MAP_REASS_N_NEXT 

Definition at line 38 of file ip4_map.c.

Function Documentation

u8* format_ip4_map_reass_trace ( u8 s,
va_list *  args 
)

Definition at line 52 of file ip4_map.c.

+ Here is the call graph for this function:

static uword ip4_map ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 208 of file ip4_map.c.

+ Here is the call graph for this function:

static void ip4_map_decrement_ttl ( ip4_header_t ip,
u8 error 
)
inlinestatic

Definition at line 165 of file ip4_map.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 ip4_map_fragment ( vlib_buffer_t b,
u16  mtu,
bool  df,
u8 error 
)
static

Definition at line 184 of file ip4_map.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u16 ip4_map_get_port ( ip4_header_t ip,
map_dir_e  dir 
)

Definition at line 65 of file ip4_map.c.

+ Here is the caller graph for this function:

static_always_inline bool ip4_map_ip6_lookup_bypass ( vlib_buffer_t p0,
ip4_header_t ip 
)

Definition at line 142 of file ip4_map.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline u16 ip4_map_port_and_security_check ( map_domain_t d,
ip4_header_t ip,
u32 next,
u8 error 
)

Definition at line 98 of file ip4_map.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword ip4_map_reass ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 451 of file ip4_map.c.

+ Here is the call graph for this function:

static_always_inline u32 ip4_map_vtcfl ( ip4_header_t ip4,
vlib_buffer_t p 
)

Definition at line 130 of file ip4_map.c.

+ Here is the caller graph for this function:

Variable Documentation

Initial value:
= {
.function = ip4_map,
.name = "ip4-map",
.vector_size = sizeof(u32),
.format_trace = format_map_trace,
.n_errors = MAP_N_ERROR,
.error_strings = map_error_strings,
.n_next_nodes = IP4_MAP_N_NEXT,
.next_nodes = {
[IP4_MAP_NEXT_IP6_LOOKUP] = "ip6-lookup",
[IP4_MAP_NEXT_IP6_REWRITE] = "ip6-rewrite",
[IP4_MAP_NEXT_IP4_FRAGMENT] = "ip4-frag",
[IP4_MAP_NEXT_IP6_FRAGMENT] = "ip6-frag",
[IP4_MAP_NEXT_REASS] = "ip4-map-reass",
[IP4_MAP_NEXT_ICMP_ERROR] = "ip4-icmp-error",
[IP4_MAP_NEXT_DROP] = "error-drop",
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static uword ip4_map(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_map.c:208
static char * map_error_strings[]
Definition: ip4_map.c:591
unsigned int u32
Definition: types.h:88
u8 * format_map_trace(u8 *s, va_list *args)
Definition: map.c:1101

(constructor) VLIB_REGISTER_NODE (ip4_map_node)

Definition at line 597 of file ip4_map.c.

vlib_node_registration_t ip4_map_reass_node
Initial value:
= {
.function = ip4_map_reass,
.name = "ip4-map-reass",
.vector_size = sizeof(u32),
.format_trace = format_ip4_map_reass_trace,
.n_errors = MAP_N_ERROR,
.error_strings = map_error_strings,
.n_next_nodes = IP4_MAP_REASS_N_NEXT,
.next_nodes = {
[IP4_MAP_REASS_NEXT_DROP] = "error-drop",
},
}
u8 * format_ip4_map_reass_trace(u8 *s, va_list *args)
Definition: ip4_map.c:52
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static uword ip4_map_reass(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_map.c:451
static char * map_error_strings[]
Definition: ip4_map.c:591
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (ip4_map_reass_node)

Definition at line 23 of file ip4_map.c.

char* map_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_map_error
Definition: map.h:264

Definition at line 591 of file ip4_map.c.