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

Go to the source code of this file.

Macros

#define IP4_MAP_T_DUAL_LOOP   1
 
#define frag_id_4to6(id)   (id)
 

Enumerations

enum  ip4_mapt_next_t {
  IP4_MAPT_NEXT_MAPT_TCP_UDP, IP4_MAPT_NEXT_MAPT_ICMP, IP4_MAPT_NEXT_MAPT_FRAGMENTED, IP4_MAPT_NEXT_DROP,
  IP4_MAPT_N_NEXT
}
 
enum  ip4_mapt_icmp_next_t { IP4_MAPT_ICMP_NEXT_IP6_LOOKUP, IP4_MAPT_ICMP_NEXT_IP6_FRAG, IP4_MAPT_ICMP_NEXT_DROP, IP4_MAPT_ICMP_N_NEXT }
 
enum  ip4_mapt_tcp_udp_next_t { IP4_MAPT_TCP_UDP_NEXT_IP6_LOOKUP, IP4_MAPT_TCP_UDP_NEXT_IP6_FRAG, IP4_MAPT_TCP_UDP_NEXT_DROP, IP4_MAPT_TCP_UDP_N_NEXT }
 
enum  ip4_mapt_fragmented_next_t { IP4_MAPT_FRAGMENTED_NEXT_IP6_LOOKUP, IP4_MAPT_FRAGMENTED_NEXT_IP6_FRAG, IP4_MAPT_FRAGMENTED_NEXT_DROP, IP4_MAPT_FRAGMENTED_N_NEXT }
 

Functions

typedef CLIB_PACKED (struct{ip6_address_t daddr;ip6_address_t saddr;u8 unused[28];})
 
static_always_inline int ip4_map_fragment_cache (ip4_header_t *ip4, u16 port)
 
static_always_inline i32 ip4_map_fragment_get_port (ip4_header_t *ip4)
 
static_always_inline int ip4_icmp_to_icmp6_in_place (icmp46_header_t *icmp, u32 icmp_len, i32 *receiver_port, ip4_header_t **inner_ip4)
 
static uword ip4_map_t_icmp (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip4_map_t_fragmented (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip4_map_t_tcp_udp (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static_always_inline void ip4_map_t_classify (vlib_buffer_t *p0, map_domain_t *d0, ip4_header_t *ip40, u16 ip4_len0, i32 *dst_port0, u8 *error0, ip4_mapt_next_t *next0)
 
static uword ip4_map_t (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 

Variables

static char * map_t_error_strings []
 
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_icmp_node
 (constructor) VLIB_REGISTER_NODE (ip4_map_t_icmp_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_node
 (constructor) VLIB_REGISTER_NODE (ip4_map_t_node) More...
 

Macro Definition Documentation

#define frag_id_4to6 (   id)    (id)
#define IP4_MAP_T_DUAL_LOOP   1

Definition at line 19 of file ip4_map_t.c.

Enumeration Type Documentation

Enumerator
IP4_MAPT_FRAGMENTED_NEXT_IP6_LOOKUP 
IP4_MAPT_FRAGMENTED_NEXT_IP6_FRAG 
IP4_MAPT_FRAGMENTED_NEXT_DROP 
IP4_MAPT_FRAGMENTED_N_NEXT 

Definition at line 43 of file ip4_map_t.c.

Enumerator
IP4_MAPT_ICMP_NEXT_IP6_LOOKUP 
IP4_MAPT_ICMP_NEXT_IP6_FRAG 
IP4_MAPT_ICMP_NEXT_DROP 
IP4_MAPT_ICMP_N_NEXT 

Definition at line 29 of file ip4_map_t.c.

Enumerator
IP4_MAPT_NEXT_MAPT_TCP_UDP 
IP4_MAPT_NEXT_MAPT_ICMP 
IP4_MAPT_NEXT_MAPT_FRAGMENTED 
IP4_MAPT_NEXT_DROP 
IP4_MAPT_N_NEXT 

Definition at line 21 of file ip4_map_t.c.

Enumerator
IP4_MAPT_TCP_UDP_NEXT_IP6_LOOKUP 
IP4_MAPT_TCP_UDP_NEXT_IP6_FRAG 
IP4_MAPT_TCP_UDP_NEXT_DROP 
IP4_MAPT_TCP_UDP_N_NEXT 

Definition at line 36 of file ip4_map_t.c.

Function Documentation

typedef CLIB_PACKED ( struct{ip6_address_t daddr;ip6_address_t saddr;u8 unused[28];}  )

Definition at line 52 of file ip4_map_t.c.

static_always_inline int ip4_icmp_to_icmp6_in_place ( icmp46_header_t *  icmp,
u32  icmp_len,
i32 receiver_port,
ip4_header_t **  inner_ip4 
)

Definition at line 107 of file ip4_map_t.c.

+ Here is the call graph for this function:

static_always_inline int ip4_map_fragment_cache ( ip4_header_t ip4,
u16  port 
)

Definition at line 71 of file ip4_map_t.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline i32 ip4_map_fragment_get_port ( ip4_header_t ip4)

Definition at line 87 of file ip4_map_t.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 829 of file ip4_map_t.c.

+ Here is the call graph for this function:

static_always_inline void ip4_map_t_classify ( vlib_buffer_t p0,
map_domain_t d0,
ip4_header_t ip40,
u16  ip4_len0,
i32 dst_port0,
u8 error0,
ip4_mapt_next_t next0 
)

Definition at line 795 of file ip4_map_t.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 447 of file ip4_map_t.c.

+ Here is the call graph for this function:

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

Definition at line 386 of file ip4_map_t.c.

+ Here is the call graph for this function:

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

Definition at line 522 of file ip4_map_t.c.

+ Here is the call graph for this function:

Variable Documentation

vlib_node_registration_t ip4_map_t_fragmented_node
Initial value:
= {
.function = ip4_map_t_fragmented,
.name = "ip4-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 = IP4_MAPT_FRAGMENTED_N_NEXT,
.next_nodes = {
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
#define IP6_FRAG_NODE_NAME
Definition: ip_frag.h:44
unsigned int u32
Definition: types.h:88
u8 * format_map_trace(u8 *s, va_list *args)
Definition: map.c:1101
static uword ip4_map_t_fragmented(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_map_t.c:447
static char * map_t_error_strings[]
Definition: ip4_map_t.c:1015

(constructor) VLIB_REGISTER_NODE (ip4_map_t_fragmented_node)

Definition at line 1021 of file ip4_map_t.c.

vlib_node_registration_t ip4_map_t_icmp_node
Initial value:
= {
.function = ip4_map_t_icmp,
.name = "ip4-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 = IP4_MAPT_ICMP_N_NEXT,
.next_nodes = {
[IP4_MAPT_ICMP_NEXT_DROP] = "error-drop",
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
#define IP6_FRAG_NODE_NAME
Definition: ip_frag.h:44
static uword ip4_map_t_icmp(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_map_t.c:386
unsigned int u32
Definition: types.h:88
u8 * format_map_trace(u8 *s, va_list *args)
Definition: map.c:1101
static char * map_t_error_strings[]
Definition: ip4_map_t.c:1015

(constructor) VLIB_REGISTER_NODE (ip4_map_t_icmp_node)

Definition at line 1039 of file ip4_map_t.c.

vlib_node_registration_t ip4_map_t_node
Initial value:
= {
.function = ip4_map_t,
.name = "ip4-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 = IP4_MAPT_N_NEXT,
.next_nodes = {
[IP4_MAPT_NEXT_MAPT_TCP_UDP] = "ip4-map-t-tcp-udp",
[IP4_MAPT_NEXT_MAPT_ICMP] = "ip4-map-t-icmp",
[IP4_MAPT_NEXT_MAPT_FRAGMENTED] = "ip4-map-t-fragmented",
[IP4_MAPT_NEXT_DROP] = "error-drop",
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static uword ip4_map_t(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_map_t.c:829
unsigned int u32
Definition: types.h:88
u8 * format_map_trace(u8 *s, va_list *args)
Definition: map.c:1101
static char * map_t_error_strings[]
Definition: ip4_map_t.c:1015

(constructor) VLIB_REGISTER_NODE (ip4_map_t_node)

Definition at line 1075 of file ip4_map_t.c.

vlib_node_registration_t ip4_map_t_tcp_udp_node
Initial value:
= {
.function = ip4_map_t_tcp_udp,
.name = "ip4-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 = IP4_MAPT_TCP_UDP_N_NEXT,
.next_nodes = {
[IP4_MAPT_TCP_UDP_NEXT_DROP] = "error-drop",
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
#define IP6_FRAG_NODE_NAME
Definition: ip_frag.h:44
unsigned int u32
Definition: types.h:88
u8 * format_map_trace(u8 *s, va_list *args)
Definition: map.c:1101
static uword ip4_map_t_tcp_udp(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_map_t.c:522
static char * map_t_error_strings[]
Definition: ip4_map_t.c:1015

(constructor) VLIB_REGISTER_NODE (ip4_map_t_tcp_udp_node)

Definition at line 1057 of file ip4_map_t.c.

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

Definition at line 1015 of file ip4_map_t.c.