FD.io VPP  v17.01-9-ge7dcee4
Vector Packet Processing
ip6_map_t.c File Reference
+ Include dependency graph for ip6_map_t.c:

Go to the source code of this file.

Macros

#define IP6_MAP_T_DUAL_LOOP
 

Enumerations

enum  ip6_mapt_next_t {
  IP6_MAPT_NEXT_MAPT_TCP_UDP, IP6_MAPT_NEXT_MAPT_ICMP, IP6_MAPT_NEXT_MAPT_FRAGMENTED, IP6_MAPT_NEXT_DROP,
  IP6_MAPT_N_NEXT
}
 
enum  ip6_mapt_icmp_next_t { IP6_MAPT_ICMP_NEXT_IP4_LOOKUP, IP6_MAPT_ICMP_NEXT_IP4_FRAG, IP6_MAPT_ICMP_NEXT_DROP, IP6_MAPT_ICMP_N_NEXT }
 
enum  ip6_mapt_tcp_udp_next_t { IP6_MAPT_TCP_UDP_NEXT_IP4_LOOKUP, IP6_MAPT_TCP_UDP_NEXT_IP4_FRAG, IP6_MAPT_TCP_UDP_NEXT_DROP, IP6_MAPT_TCP_UDP_N_NEXT }
 
enum  ip6_mapt_fragmented_next_t { IP6_MAPT_FRAGMENTED_NEXT_IP4_LOOKUP, IP6_MAPT_FRAGMENTED_NEXT_IP4_FRAG, IP6_MAPT_FRAGMENTED_NEXT_DROP, IP6_MAPT_FRAGMENTED_N_NEXT }
 

Functions

static_always_inline int ip6_map_fragment_cache (ip6_header_t *ip6, ip6_frag_hdr_t *frag, map_domain_t *d, u16 port)
 
static_always_inline i32 ip6_map_fragment_get (ip6_header_t *ip6, ip6_frag_hdr_t *frag, map_domain_t *d)
 
static_always_inline u8 ip6_translate_tos (const ip6_header_t *ip6)
 
static_always_inline int ip6_icmp_to_icmp6_in_place (icmp46_header_t *icmp, u32 icmp_len, i32 *sender_port, ip6_header_t **inner_ip6)
 
static uword ip6_map_t_icmp (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip6_map_t_fragmented (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip6_map_t_tcp_udp (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static_always_inline void ip6_map_t_classify (vlib_buffer_t *p0, ip6_header_t *ip60, map_domain_t *d0, i32 *src_port0, u8 *error0, ip6_mapt_next_t *next0, u32 l4_len0, ip6_frag_hdr_t *frag0)
 
static uword ip6_map_t (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 

Variables

static u8 icmp6_to_icmp_updater_pointer_table []
 
static char * map_t_error_strings []
 
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_icmp_node
 (constructor) VLIB_REGISTER_NODE (ip6_map_t_icmp_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_node
 (constructor) VLIB_REGISTER_NODE (ip6_map_t_node) More...
 

Macro Definition Documentation

#define IP6_MAP_T_DUAL_LOOP

Definition at line 19 of file ip6_map_t.c.

Enumeration Type Documentation

Enumerator
IP6_MAPT_FRAGMENTED_NEXT_IP4_LOOKUP 
IP6_MAPT_FRAGMENTED_NEXT_IP4_FRAG 
IP6_MAPT_FRAGMENTED_NEXT_DROP 
IP6_MAPT_FRAGMENTED_N_NEXT 

Definition at line 46 of file ip6_map_t.c.

Enumerator
IP6_MAPT_ICMP_NEXT_IP4_LOOKUP 
IP6_MAPT_ICMP_NEXT_IP4_FRAG 
IP6_MAPT_ICMP_NEXT_DROP 
IP6_MAPT_ICMP_N_NEXT 

Definition at line 30 of file ip6_map_t.c.

Enumerator
IP6_MAPT_NEXT_MAPT_TCP_UDP 
IP6_MAPT_NEXT_MAPT_ICMP 
IP6_MAPT_NEXT_MAPT_FRAGMENTED 
IP6_MAPT_NEXT_DROP 
IP6_MAPT_N_NEXT 

Definition at line 21 of file ip6_map_t.c.

Enumerator
IP6_MAPT_TCP_UDP_NEXT_IP4_LOOKUP 
IP6_MAPT_TCP_UDP_NEXT_IP4_FRAG 
IP6_MAPT_TCP_UDP_NEXT_DROP 
IP6_MAPT_TCP_UDP_N_NEXT 

Definition at line 38 of file ip6_map_t.c.

Function Documentation

static_always_inline int ip6_icmp_to_icmp6_in_place ( icmp46_header_t *  icmp,
u32  icmp_len,
i32 sender_port,
ip6_header_t **  inner_ip6 
)

Definition at line 125 of file ip6_map_t.c.

+ Here is the call graph for this function:

static_always_inline int ip6_map_fragment_cache ( ip6_header_t ip6,
ip6_frag_hdr_t *  frag,
map_domain_t d,
u16  port 
)

Definition at line 55 of file ip6_map_t.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline i32 ip6_map_fragment_get ( ip6_header_t ip6,
ip6_frag_hdr_t *  frag,
map_domain_t d 
)

Definition at line 78 of file ip6_map_t.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 1048 of file ip6_map_t.c.

+ Here is the call graph for this function:

static_always_inline void ip6_map_t_classify ( vlib_buffer_t p0,
ip6_header_t ip60,
map_domain_t d0,
i32 src_port0,
u8 error0,
ip6_mapt_next_t next0,
u32  l4_len0,
ip6_frag_hdr_t *  frag0 
)

Definition at line 970 of file ip6_map_t.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 517 of file ip6_map_t.c.

+ Here is the call graph for this function:

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

Definition at line 441 of file ip6_map_t.c.

+ Here is the call graph for this function:

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

Definition at line 725 of file ip6_map_t.c.

+ Here is the call graph for this function:

static_always_inline u8 ip6_translate_tos ( const ip6_header_t ip6)

Definition at line 98 of file ip6_map_t.c.

+ Here is the caller graph for this function:

Variable Documentation

u8 icmp6_to_icmp_updater_pointer_table[]
static
Initial value:
=
{ 0, 1, ~0, ~0,
2, 2, 9, 8,
12, 12, 12, 12,
12, 12, 12, 12,
12, 12, 12, 12,
12, 12, 12, 12,
24, 24, 24, 24,
24, 24, 24, 24,
24, 24, 24, 24,
24, 24, 24, 24
}

Definition at line 110 of file ip6_map_t.c.

vlib_node_registration_t ip6_map_t_fragmented_node
Initial value:
= {
.function = ip6_map_t_fragmented,
.name = "ip6-map-t-fragmented",
.vector_size = sizeof (u32),
.format_trace = format_map_trace,
.n_errors = MAP_N_ERROR,
.error_strings = map_t_error_strings,
.n_next_nodes = IP6_MAPT_FRAGMENTED_N_NEXT,
.next_nodes = {
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
#define IP4_FRAG_NODE_NAME
Definition: ip_frag.h:43
unsigned int u32
Definition: types.h:88
u8 * format_map_trace(u8 *s, va_list *args)
Definition: map.c:1278
static uword ip6_map_t_fragmented(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip6_map_t.c:517
static char * map_t_error_strings[]
Definition: ip6_map_t.c:1424

(constructor) VLIB_REGISTER_NODE (ip6_map_t_fragmented_node)

Definition at line 1431 of file ip6_map_t.c.

vlib_node_registration_t ip6_map_t_icmp_node
Initial value:
= {
.function = ip6_map_t_icmp,
.name = "ip6-map-t-icmp",
.vector_size = sizeof (u32),
.format_trace = format_map_trace,
.n_errors = MAP_N_ERROR,
.error_strings = map_t_error_strings,
.n_next_nodes = IP6_MAPT_ICMP_N_NEXT,
.next_nodes = {
[IP6_MAPT_ICMP_NEXT_DROP] = "error-drop",
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
#define IP4_FRAG_NODE_NAME
Definition: ip_frag.h:43
static uword ip6_map_t_icmp(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip6_map_t.c:441
unsigned int u32
Definition: types.h:88
u8 * format_map_trace(u8 *s, va_list *args)
Definition: map.c:1278
static char * map_t_error_strings[]
Definition: ip6_map_t.c:1424

(constructor) VLIB_REGISTER_NODE (ip6_map_t_icmp_node)

Definition at line 1451 of file ip6_map_t.c.

vlib_node_registration_t ip6_map_t_node
Initial value:
= {
.function = ip6_map_t,
.name = "ip6-map-t",
.vector_size = sizeof(u32),
.format_trace = format_map_trace,
.n_errors = MAP_N_ERROR,
.error_strings = map_t_error_strings,
.n_next_nodes = IP6_MAPT_N_NEXT,
.next_nodes = {
[IP6_MAPT_NEXT_MAPT_TCP_UDP] = "ip6-map-t-tcp-udp",
[IP6_MAPT_NEXT_MAPT_ICMP] = "ip6-map-t-icmp",
[IP6_MAPT_NEXT_MAPT_FRAGMENTED] = "ip6-map-t-fragmented",
[IP6_MAPT_NEXT_DROP] = "error-drop",
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static uword ip6_map_t(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip6_map_t.c:1048
unsigned int u32
Definition: types.h:88
u8 * format_map_trace(u8 *s, va_list *args)
Definition: map.c:1278
static char * map_t_error_strings[]
Definition: ip6_map_t.c:1424

(constructor) VLIB_REGISTER_NODE (ip6_map_t_node)

Definition at line 1491 of file ip6_map_t.c.

vlib_node_registration_t ip6_map_t_tcp_udp_node
Initial value:
= {
.function = ip6_map_t_tcp_udp,
.name = "ip6-map-t-tcp-udp",
.vector_size = sizeof (u32),
.format_trace = format_map_trace,
.n_errors = MAP_N_ERROR,
.error_strings = map_t_error_strings,
.n_next_nodes = IP6_MAPT_TCP_UDP_N_NEXT,
.next_nodes = {
[IP6_MAPT_TCP_UDP_NEXT_DROP] = "error-drop",
},
}
static uword ip6_map_t_tcp_udp(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip6_map_t.c:725
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
#define IP4_FRAG_NODE_NAME
Definition: ip_frag.h:43
unsigned int u32
Definition: types.h:88
u8 * format_map_trace(u8 *s, va_list *args)
Definition: map.c:1278
static char * map_t_error_strings[]
Definition: ip6_map_t.c:1424

(constructor) VLIB_REGISTER_NODE (ip6_map_t_tcp_udp_node)

Definition at line 1471 of file ip6_map_t.c.

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

Definition at line 1424 of file ip6_map_t.c.