FD.io VPP  v18.07.1-13-g909ba93
Vector Packet Processing
buffer.h File Reference
+ Include dependency graph for buffer.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vnet_buffer_opaque_t
 
struct  vnet_buffer_opaque2_t
 

Macros

#define foreach_vnet_buffer_flag
 Flags that are set in the high order bits of ((vlib_buffer*)b)->flags. More...
 
#define VNET_BUFFER_FLAGS_VLAN_BITS   (VNET_BUFFER_F_VLAN_1_DEEP | VNET_BUFFER_F_VLAN_2_DEEP)
 
#define foreach_buffer_opaque_union_subtype
 
#define vnet_buffer(b)   ((vnet_buffer_opaque_t *) (b)->opaque)
 
#define vnet_buffer2(b)   ((vnet_buffer_opaque2_t *) (b)->opaque2)
 

Enumerations

enum  { foreach_vnet_buffer_flag }
 
enum  { foreach_vnet_buffer_flag }
 

Functions

 STATIC_ASSERT (sizeof(vnet_buffer_opaque_t)<=STRUCT_SIZE_OF(vlib_buffer_t, opaque),"VNET buffer meta-data too large for vlib_buffer")
 
 STATIC_ASSERT (sizeof(vnet_buffer_opaque2_t)<=STRUCT_SIZE_OF(vlib_buffer_t, opaque2),"VNET buffer opaque2 meta-data too large for vlib_buffer")
 

Variables

format_function_t format_vnet_buffer
 

Macro Definition Documentation

#define foreach_buffer_opaque_union_subtype
Value:
_(ip) \
_(l2) \
_(l2t) \
_(l2_classify) \
_(handoff) \
_(policer) \
_(ipsec) \
_(map) \
_(map_t) \
_(ip_frag) \
_(mpls) \
_(tcp)

Definition at line 87 of file buffer.h.

foreach_vnet_buffer_flag
Value:
_( 1, L4_CHECKSUM_COMPUTED, "l4-cksum-computed") \
_( 2, L4_CHECKSUM_CORRECT, "l4-cksum-correct") \
_( 3, VLAN_2_DEEP, "vlan-2-deep") \
_( 4, VLAN_1_DEEP, "vlan-1-deep") \
_( 5, SPAN_CLONE, "span-clone") \
_( 6, HANDOFF_NEXT_VALID, "handoff-next-valid") \
_( 7, LOCALLY_ORIGINATED, "local") \
_( 8, IS_IP4, "ip4") \
_( 9, IS_IP6, "ip6") \
_(10, OFFLOAD_IP_CKSUM, "offload-ip-cksum") \
_(11, OFFLOAD_TCP_CKSUM, "offload-tcp-cksum") \
_(12, OFFLOAD_UDP_CKSUM, "offload-udp-cksum") \
_(13, IS_NATED, "nated") \
_(14, L2_HDR_OFFSET_VALID, 0) \
_(15, L3_HDR_OFFSET_VALID, 0) \
_(16, L4_HDR_OFFSET_VALID, 0) \
_(17, FLOW_REPORT, "flow-report") \
_(18, IS_DVR, "dvr") \
_(19, QOS_DATA_VALID, 0) \
_(20, LOOP_COUNTER_VALID, 0)

Flags that are set in the high order bits of ((vlib_buffer*)b)->flags.

Definition at line 48 of file buffer.h.

#define vnet_buffer (   b)    ((vnet_buffer_opaque_t *) (b)->opaque)

Definition at line 360 of file buffer.h.

#define vnet_buffer2 (   b)    ((vnet_buffer_opaque2_t *) (b)->opaque2)

Definition at line 403 of file buffer.h.

#define VNET_BUFFER_FLAGS_VLAN_BITS   (VNET_BUFFER_F_VLAN_1_DEEP | VNET_BUFFER_F_VLAN_2_DEEP)

Definition at line 70 of file buffer.h.

Enumeration Type Documentation

anonymous enum
Enumerator
foreach_vnet_buffer_flag 

Definition at line 73 of file buffer.h.

anonymous enum
Enumerator
foreach_vnet_buffer_flag 

Definition at line 80 of file buffer.h.

Function Documentation

STATIC_ASSERT ( sizeof(vnet_buffer_opaque_t)<=STRUCT_SIZE_OF(vlib_buffer_t, opaque)  ,
"VNET buffer meta-data too large for vlib_buffer"   
)
STATIC_ASSERT ( sizeof(vnet_buffer_opaque2_t)<=STRUCT_SIZE_OF(vlib_buffer_t, opaque2)  ,
"VNET buffer opaque2 meta-data too large for vlib_buffer"   
)

Variable Documentation

format_function_t format_vnet_buffer

Definition at line 413 of file buffer.h.