FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
ip_frag.c File Reference
+ Include dependency graph for ip_frag.c:

Go to the source code of this file.

Data Structures

struct  ip_frag_trace_t
 

Functions

static u8format_ip_frag_trace (u8 *s, va_list *args)
 
static void frag_set_sw_if_index (vlib_buffer_t *to, vlib_buffer_t *from)
 
static vlib_buffer_tfrag_buffer_alloc (vlib_buffer_t *org_b, u32 *bi)
 
ip_frag_error_t ip4_frag_do_fragment (vlib_main_t *vm, u32 from_bi, u16 mtu, u16 l2unfragmentablesize, u32 **buffer)
 
void ip_frag_set_vnet_buffer (vlib_buffer_t *b, u16 mtu, u8 next_index, u8 flags)
 
static uword frag_node_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u32 node_index, bool is_ip6)
 
static uword ip4_frag (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip6_frag (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
ip_frag_error_t ip6_frag_do_fragment (vlib_main_t *vm, u32 from_bi, u16 mtu, u16 l2unfragmentablesize, u32 **buffer)
 

Variables

static u32 running_fragment_id
 
static char * ip4_frag_error_strings []
 
vlib_node_registration_t ip4_frag_node
 (constructor) VLIB_REGISTER_NODE (ip4_frag_node) More...
 
vlib_node_registration_t ip6_frag_node
 (constructor) VLIB_REGISTER_NODE (ip6_frag_node) More...
 

Function Documentation

◆ format_ip_frag_trace()

static u8* format_ip_frag_trace ( u8 s,
va_list *  args 
)
static

Definition at line 35 of file ip_frag.c.

◆ frag_buffer_alloc()

static vlib_buffer_t* frag_buffer_alloc ( vlib_buffer_t org_b,
u32 bi 
)
static

Definition at line 73 of file ip_frag.c.

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

◆ frag_node_inline()

static uword frag_node_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
u32  node_index,
bool  is_ip6 
)
inlinestatic

Definition at line 247 of file ip_frag.c.

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

◆ frag_set_sw_if_index()

static void frag_set_sw_if_index ( vlib_buffer_t to,
vlib_buffer_t from 
)
static

Definition at line 48 of file ip_frag.c.

+ Here is the caller graph for this function:

◆ ip4_frag()

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

Definition at line 362 of file ip_frag.c.

+ Here is the call graph for this function:

◆ ip4_frag_do_fragment()

ip_frag_error_t ip4_frag_do_fragment ( vlib_main_t vm,
u32  from_bi,
u16  mtu,
u16  l2unfragmentablesize,
u32 **  buffer 
)

Definition at line 93 of file ip_frag.c.

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

◆ ip6_frag()

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

Definition at line 369 of file ip_frag.c.

+ Here is the call graph for this function:

◆ ip6_frag_do_fragment()

ip_frag_error_t ip6_frag_do_fragment ( vlib_main_t vm,
u32  from_bi,
u16  mtu,
u16  l2unfragmentablesize,
u32 **  buffer 
)

Definition at line 381 of file ip_frag.c.

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

◆ ip_frag_set_vnet_buffer()

void ip_frag_set_vnet_buffer ( vlib_buffer_t b,
u16  mtu,
u8  next_index,
u8  flags 
)

Definition at line 238 of file ip_frag.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ ip4_frag_error_strings

char* ip4_frag_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}

Definition at line 505 of file ip_frag.c.

◆ ip4_frag_node

vlib_node_registration_t ip4_frag_node
Initial value:
= {
.function = ip4_frag,
.vector_size = sizeof (u32),
.format_trace = format_ip_frag_trace,
.n_errors = IP_FRAG_N_ERROR,
.error_strings = ip4_frag_error_strings,
.n_next_nodes = IP_FRAG_N_NEXT,
.next_nodes = {
[IP_FRAG_NEXT_IP_REWRITE] = "ip4-rewrite",
[IP_FRAG_NEXT_IP4_LOOKUP] = "ip4-lookup",
[IP_FRAG_NEXT_IP6_LOOKUP] = "ip6-lookup",
[IP_FRAG_NEXT_ICMP_ERROR] = "ip4-icmp-error",
[IP_FRAG_NEXT_DROP] = "ip4-drop"
},
}

(constructor) VLIB_REGISTER_NODE (ip4_frag_node)

Definition at line 512 of file ip_frag.c.

◆ ip6_frag_node

vlib_node_registration_t ip6_frag_node
Initial value:
= {
.function = ip6_frag,
.vector_size = sizeof (u32),
.format_trace = format_ip_frag_trace,
.n_errors = IP_FRAG_N_ERROR,
.error_strings = ip4_frag_error_strings,
.n_next_nodes = IP_FRAG_N_NEXT,
.next_nodes = {
[IP_FRAG_NEXT_IP_REWRITE] = "ip6-rewrite",
[IP_FRAG_NEXT_IP4_LOOKUP] = "ip4-lookup",
[IP_FRAG_NEXT_IP6_LOOKUP] = "ip6-lookup",
[IP_FRAG_NEXT_ICMP_ERROR] = "error-drop",
[IP_FRAG_NEXT_DROP] = "ip6-drop"
},
}

(constructor) VLIB_REGISTER_NODE (ip6_frag_node)

Definition at line 535 of file ip_frag.c.

◆ running_fragment_id

u32 running_fragment_id
static

Definition at line 45 of file ip_frag.c.

VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
IP_FRAG_NEXT_DROP
@ IP_FRAG_NEXT_DROP
Definition: ip_frag.h:56
IP_FRAG_NEXT_IP_REWRITE
@ IP_FRAG_NEXT_IP_REWRITE
Definition: ip_frag.h:51
IP4_FRAG_NODE_NAME
#define IP4_FRAG_NODE_NAME
Definition: ip_frag.h:43
foreach_ip_frag_error
#define foreach_ip_frag_error
Definition: ip_frag.h:60
IP6_FRAG_NODE_NAME
#define IP6_FRAG_NODE_NAME
Definition: ip_frag.h:44
ip6_frag
static uword ip6_frag(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip_frag.c:369
IP_FRAG_N_ERROR
@ IP_FRAG_N_ERROR
Definition: ip_frag.h:76
ip4_frag
static uword ip4_frag(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip_frag.c:362
IP_FRAG_NEXT_IP6_LOOKUP
@ IP_FRAG_NEXT_IP6_LOOKUP
Definition: ip_frag.h:54
u32
unsigned int u32
Definition: types.h:88
IP_FRAG_N_NEXT
@ IP_FRAG_N_NEXT
Definition: ip_frag.h:57
ip4_frag_error_strings
static char * ip4_frag_error_strings[]
Definition: ip_frag.c:505
IP_FRAG_NEXT_ICMP_ERROR
@ IP_FRAG_NEXT_ICMP_ERROR
Definition: ip_frag.h:55
format_ip_frag_trace
static u8 * format_ip_frag_trace(u8 *s, va_list *args)
Definition: ip_frag.c:35
IP_FRAG_NEXT_IP4_LOOKUP
@ IP_FRAG_NEXT_IP4_LOOKUP
Definition: ip_frag.h:53
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123
IP_FRAG_NEXT_IP_REWRITE_MIDCHAIN
@ IP_FRAG_NEXT_IP_REWRITE_MIDCHAIN
Definition: ip_frag.h:52