FD.io VPP  v21.01
Vector Packet Processing
ip_frag.h File Reference
+ Include dependency graph for ip_frag.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IP_FRAG_FLAG_IP4_HEADER   0x01
 
#define IP_FRAG_FLAG_IP6_HEADER   0x02
 
#define IP4_FRAG_NODE_NAME   "ip4-frag"
 
#define IP6_FRAG_NODE_NAME   "ip6-frag"
 
#define foreach_ip_frag_error
 

Enumerations

enum  ip_frag_next_t {
  IP_FRAG_NEXT_IP_REWRITE, IP_FRAG_NEXT_IP_REWRITE_MIDCHAIN, IP_FRAG_NEXT_IP4_LOOKUP, IP_FRAG_NEXT_IP6_LOOKUP,
  IP_FRAG_NEXT_ICMP_ERROR, IP_FRAG_NEXT_DROP, IP_FRAG_N_NEXT
}
 
enum  ip_frag_error_t { IP_FRAG_N_ERROR }
 

Functions

void ip_frag_set_vnet_buffer (vlib_buffer_t *b, u16 mtu, u8 next_index, u8 flags)
 
ip_frag_error_t ip4_frag_do_fragment (vlib_main_t *vm, u32 from_bi, u16 mtu, u16 encapsize, u32 **buffer)
 
ip_frag_error_t ip6_frag_do_fragment (vlib_main_t *vm, u32 from_bi, u16 mtu, u16 encapsize, u32 **buffer)
 

Variables

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

Macro Definition Documentation

◆ foreach_ip_frag_error

#define foreach_ip_frag_error
Value:
/* Must be first. */ \
_(NONE, "packet fragmented") \
_(SMALL_PACKET, "packet smaller than MTU") \
_(FRAGMENT_SENT, "number of sent fragments") \
_(CANT_FRAGMENT_HEADER, "can't fragment header") \
_(DONT_FRAGMENT_SET, "can't fragment this packet") \
_(MALFORMED, "malformed packet") \
_(MEMORY, "could not allocate buffer") \
_(UNKNOWN, "unknown error")

Definition at line 60 of file ip_frag.h.

◆ IP4_FRAG_NODE_NAME

#define IP4_FRAG_NODE_NAME   "ip4-frag"

Definition at line 43 of file ip_frag.h.

◆ IP6_FRAG_NODE_NAME

#define IP6_FRAG_NODE_NAME   "ip6-frag"

Definition at line 44 of file ip_frag.h.

◆ IP_FRAG_FLAG_IP4_HEADER

#define IP_FRAG_FLAG_IP4_HEADER   0x01

Definition at line 40 of file ip_frag.h.

◆ IP_FRAG_FLAG_IP6_HEADER

#define IP_FRAG_FLAG_IP6_HEADER   0x02

Definition at line 41 of file ip_frag.h.

Enumeration Type Documentation

◆ ip_frag_error_t

Enumerator
IP_FRAG_N_ERROR 

Definition at line 71 of file ip_frag.h.

◆ ip_frag_next_t

Enumerator
IP_FRAG_NEXT_IP_REWRITE 
IP_FRAG_NEXT_IP_REWRITE_MIDCHAIN 
IP_FRAG_NEXT_IP4_LOOKUP 
IP_FRAG_NEXT_IP6_LOOKUP 
IP_FRAG_NEXT_ICMP_ERROR 
IP_FRAG_NEXT_DROP 
IP_FRAG_N_NEXT 

Definition at line 49 of file ip_frag.h.

Function Documentation

◆ ip4_frag_do_fragment()

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

Definition at line 94 of file ip_frag.c.

+ Here is the call graph for this function:
+ Here is the caller 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  encapsize,
u32 **  buffer 
)

Definition at line 382 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 239 of file ip_frag.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ ip4_frag_node

vlib_node_registration_t ip4_frag_node

(constructor) VLIB_REGISTER_NODE (ip4_frag_node)

Definition at line 513 of file ip_frag.c.

◆ ip6_frag_node

vlib_node_registration_t ip6_frag_node

(constructor) VLIB_REGISTER_NODE (ip6_frag_node)

Definition at line 536 of file ip_frag.c.