16 #ifndef SRC_VNET_UDP_UDP_INLINES_H_ 17 #define SRC_VNET_UDP_UDP_INLINES_H_ 36 uh->
length = clib_host_to_net_u16 (udp_len);
38 b->
flags |= VNET_BUFFER_F_OFFLOAD_UDP_CKSUM;
40 b->
flags |= VNET_BUFFER_F_L4_HDR_OFFSET_VALID;
133 ASSERT (_vec_len (ec0) == _vec_len (ec1));
142 u16 old_l0 = 0, old_l1 = 0;
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
static void ip_udp_fixup_one(vlib_main_t *vm, vlib_buffer_t *b0, u8 is_ip4)
#define clib_memcpy_fast(a, b, c)
u16 current_length
Nbytes between current data and the end of this buffer.
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
u16 ip6_tcp_udp_icmp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip6_header_t *ip0, int *bogus_lengthp)
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
static void * vlib_buffer_push_udp(vlib_buffer_t *b, u16 sp, u16 dp, u8 offload_csum)
static void * vlib_buffer_push_uninit(vlib_buffer_t *b, u8 size)
Prepend uninitialized data to buffer.
VLIB buffer representation.
#define ip_csum_update(sum, old, new, type, field)
u32 total_length_not_including_first_buffer
Only valid for first buffer in chain.
static void ip_udp_encap_one(vlib_main_t *vm, vlib_buffer_t *b0, u8 *ec0, word ec_len, u8 is_ip4)
static u16 ip_csum_fold(ip_csum_t c)
static void ip_udp_encap_two(vlib_main_t *vm, vlib_buffer_t *b0, vlib_buffer_t *b1, u8 *ec0, u8 *ec1, word ec_len, u8 is_v4)