FD.io VPP  v19.04.4-rc0-5-ge88582fac
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.

Data Structures

struct  icmp6_to_icmp_ctx_t
 

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 int ip6_to_ip4_set_icmp_cb (ip6_header_t *ip6, ip4_header_t *ip4, void *arg)
 
static int ip6_to_ip4_set_inner_icmp_cb (ip6_header_t *ip6, ip4_header_t *ip4, void *arg)
 
static uword ip6_map_t_icmp (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static int map_ip6_to_ip4_fragmented (vlib_buffer_t *p)
 
static uword ip6_map_t_fragmented (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static int map_ip6_to_ip4_tcp_udp (vlib_buffer_t *p, bool udp_checksum)
 
static uword ip6_map_t_tcp_udp (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip6_map_t (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (ip4_map_t_feature, static)
 

Variables

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...
 

Enumeration Type Documentation

◆ ip6_mapt_fragmented_next_t

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.

◆ ip6_mapt_icmp_next_t

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.

◆ ip6_mapt_next_t

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.

◆ ip6_mapt_tcp_udp_next_t

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

◆ ip6_map_fragment_cache()

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:

◆ ip6_map_fragment_get()

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

Definition at line 76 of file ip6_map_t.c.

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

◆ ip6_map_t()

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

Definition at line 498 of file ip6_map_t.c.

+ Here is the call graph for this function:

◆ ip6_map_t_fragmented()

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

Definition at line 289 of file ip6_map_t.c.

+ Here is the call graph for this function:

◆ ip6_map_t_icmp()

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

Definition at line 146 of file ip6_map_t.c.

+ Here is the call graph for this function:

◆ ip6_map_t_tcp_udp()

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

Definition at line 442 of file ip6_map_t.c.

+ Here is the call graph for this function:

◆ ip6_to_ip4_set_icmp_cb()

static int ip6_to_ip4_set_icmp_cb ( ip6_header_t ip6,
ip4_header_t ip4,
void *  arg 
)
static

Definition at line 100 of file ip6_map_t.c.

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

◆ ip6_to_ip4_set_inner_icmp_cb()

static int ip6_to_ip4_set_inner_icmp_cb ( ip6_header_t ip6,
ip4_header_t ip4,
void *  arg 
)
static

Definition at line 123 of file ip6_map_t.c.

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

◆ map_ip6_to_ip4_fragmented()

static int map_ip6_to_ip4_fragmented ( vlib_buffer_t p)
inlinestatic

Definition at line 242 of file ip6_map_t.c.

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

◆ map_ip6_to_ip4_tcp_udp()

static int map_ip6_to_ip4_tcp_udp ( vlib_buffer_t p,
bool  udp_checksum 
)
inlinestatic

Definition at line 348 of file ip6_map_t.c.

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

◆ VNET_FEATURE_INIT()

VNET_FEATURE_INIT ( ip4_map_t_feature  ,
static   
)

Variable Documentation

◆ ip6_map_t_fragmented_node

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 =
{
},
}
unsigned int u32
Definition: types.h:88
#define IP4_FRAG_NODE_NAME
Definition: ip_frag.h:43
u8 * format_map_trace(u8 *s, va_list *args)
Definition: map.c:1367
static uword ip6_map_t_fragmented(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip6_map_t.c:289
static char * map_t_error_strings[]
Definition: ip6_map_t.c:699

(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
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",
},
}
unsigned int u32
Definition: types.h:88
#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:146
u8 * format_map_trace(u8 *s, va_list *args)
Definition: map.c:1367
static char * map_t_error_strings[]
Definition: ip6_map_t.c:699

(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
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",
},
}
static uword ip6_map_t(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip6_map_t.c:498
unsigned int u32
Definition: types.h:88
u8 * format_map_trace(u8 *s, va_list *args)
Definition: map.c:1367
static char * map_t_error_strings[]
Definition: ip6_map_t.c:699

(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
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:442
unsigned int u32
Definition: types.h:88
#define IP4_FRAG_NODE_NAME
Definition: ip_frag.h:43
u8 * format_map_trace(u8 *s, va_list *args)
Definition: map.c:1367
static char * map_t_error_strings[]
Definition: ip6_map_t.c:699

(constructor) VLIB_REGISTER_NODE (ip6_map_t_tcp_udp_node)

Definition at line 748 of file ip6_map_t.c.

◆ map_t_error_strings

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

Definition at line 699 of file ip6_map_t.c.