40 #ifndef included_ip_ip4_inlines_h 41 #define included_ip_ip4_inlines_h 67 t1 = is_tcp_udp ? tcp->src : 0;
68 t2 = is_tcp_udp ? tcp->dst : 0;
91 (t1 << 16) | t2 : (t2 << 16) | t1;
121 b->
flags |= VNET_BUFFER_F_IS_IP4 | VNET_BUFFER_F_L3_HDR_OFFSET_VALID;
127 b->
flags |= VNET_BUFFER_F_OFFLOAD_IP_CKSUM;
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
#define IP_FLOW_HASH_SYMMETRIC
static u32 ip4_compute_flow_hash(const ip4_header_t *ip, flow_hash_config_t flow_hash_config)
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
#define IP_FLOW_HASH_SRC_PORT
struct _tcp_header tcp_header_t
#define hash_v3_mix32(a, b, c)
#define IP_FLOW_HASH_DST_ADDR
#define IP_FLOW_HASH_DST_PORT
static void * vlib_buffer_push_ip4_custom(vlib_main_t *vm, vlib_buffer_t *b, ip4_address_t *src, ip4_address_t *dst, int proto, u8 csum_offload, u8 is_df)
#define IP_FLOW_HASH_PROTO
#define hash_v3_finalize32(a, b, c)
static void * vlib_buffer_push_uninit(vlib_buffer_t *b, u8 size)
Prepend uninitialized data to buffer.
#define IP_FLOW_HASH_REVERSE_SRC_DST
VLIB buffer representation.
#define IP_FLOW_HASH_SRC_ADDR
Flow hash configuration.
u32 flow_hash_config_t
A flow hash configuration is a mask of the flow hash options.
static void * vlib_buffer_push_ip4(vlib_main_t *vm, vlib_buffer_t *b, ip4_address_t *src, ip4_address_t *dst, int proto, u8 csum_offload)
Push IPv4 header to buffer.
static u16 ip4_header_checksum(ip4_header_t *i)