40 #ifndef __INTERFACE_INLINES_H__ 41 #define __INTERFACE_INLINES_H__ 53 int is_ip4 = (b->
flags & VNET_BUFFER_F_IS_IP4) != 0;
54 int is_ip6 = (b->
flags & VNET_BUFFER_F_IS_IP6) != 0;
56 ASSERT (!(is_ip4 && is_ip6));
65 if (b->
flags & VNET_BUFFER_F_OFFLOAD_IP_CKSUM)
67 if (b->
flags & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM)
72 if (b->
flags & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM)
81 if (b->
flags & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM)
87 if (b->
flags & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM)
95 b->
flags &= ~VNET_BUFFER_F_OFFLOAD_TCP_CKSUM;
96 b->
flags &= ~VNET_BUFFER_F_OFFLOAD_UDP_CKSUM;
97 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.
struct _tcp_header tcp_header_t
#define static_always_inline
u16 ip6_tcp_udp_icmp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip6_header_t *ip0, int *bogus_lengthp)
u16 ip4_tcp_udp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip4_header_t *ip0)
static_always_inline void calc_checksums(vlib_main_t *vm, vlib_buffer_t *b)
VLIB buffer representation.
static u16 ip4_header_checksum(ip4_header_t *i)