40 #ifndef included_ip_ip6_inlines_h 41 #define included_ip_ip6_inlines_h 60 || (ip->
protocol == IP_PROTOCOL_UDP)))
63 tcp = (
void *) (ip + 1);
65 else if (ip->
protocol == IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS)
68 if ((hbh->
protocol == IP_PROTOCOL_TCP) ||
86 t1 = is_tcp_udp ? tcp->src : 0;
87 t2 = is_tcp_udp ? tcp->dst : 0;
110 ((t1 << 16) | t2) : ((t2 << 16) | t1);
146 done = (next_proto == find_hdr_type);
156 if ((!
ip6_ext_hdr (next_proto)) || next_proto == IP_PROTOCOL_IP6_NONXT)
158 if (find_hdr_type < 0)
162 if (next_proto == IP_PROTOCOL_IPV6_FRAGMENTATION)
164 ip6_frag_hdr_t *frag_hdr = (ip6_frag_hdr_t *) next_header;
169 exthdr_len =
sizeof (ip6_frag_hdr_t);
170 temp_nxthdr = next_header + exthdr_len;
172 else if (next_proto == IP_PROTOCOL_IPSEC_AH)
176 temp_nxthdr = next_header + exthdr_len;
182 temp_nxthdr = next_header + exthdr_len;
184 next_proto = ((ip6_ext_header_t *) next_header)->next_hdr;
185 next_header = temp_nxthdr;
186 cur_offset += exthdr_len;
189 *offset = cur_offset;
208 ip6_address_t *
src, ip6_address_t *
dst,
216 ASSERT (flow_label < 1 << 20);
218 clib_host_to_net_u32 ((0x6 << 28) | flow_label);
222 payload_length -=
sizeof (*ip6h);
233 b->
flags |= VNET_BUFFER_F_IS_IP6 | VNET_BUFFER_F_L3_HDR_OFFSET_VALID;
251 ip6_address_t *
src, ip6_address_t *
dst,
int proto)
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
vl_api_ip_proto_t protocol
#define clib_memcpy_fast(a, b, c)
u16 current_length
Nbytes between current data and the end of this buffer.
static void * vlib_buffer_push_ip6_custom(vlib_main_t *vm, vlib_buffer_t *b, ip6_address_t *src, ip6_address_t *dst, int proto, u32 flow_label)
Push IPv6 header to buffer.
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
static void * vlib_buffer_push_ip6(vlib_main_t *vm, vlib_buffer_t *b, ip6_address_t *src, ip6_address_t *dst, int proto)
Push IPv6 header to buffer.
#define IP_FLOW_HASH_DST_ADDR
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
#define IP_FLOW_HASH_DST_PORT
#define ip6_ext_authhdr_len(p)
#define ip6_ext_header_len(p)
#define hash_mix64(a0, b0, c0)
#define IP_FLOW_HASH_PROTO
static void * ip6_next_header(ip6_header_t *i)
static u8 ip6_ext_hdr(u8 nexthdr)
#define ip6_frag_hdr_offset(hdr)
static u32 ip6_compute_flow_hash(const ip6_header_t *ip, flow_hash_config_t flow_hash_config)
template key/value backing page structure
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 int ip6_locate_header(vlib_buffer_t *p0, ip6_header_t *ip0, int find_hdr_type, u32 *offset)