1 #ifndef included_vnet_sr_packet_h 2 #define included_vnet_sr_packet_h 169 #ifndef IPPROTO_IPV6_ROUTE 170 #define IPPROTO_IPV6_ROUTE 43 173 #define ROUTING_HEADER_TYPE_SR 4 201 #define IP6_SR_HEADER_FLAG_CLEANUP (0x8000) 203 #define IP6_SR_HEADER_FLAG_PROTECTED (0x4000) 205 #define IP6_SR_HEADER_FLAG_RESERVED (0x3000) 207 #define IP6_SR_HEADER_FLAG_PL_ELT_NOT_PRESENT (0x0) 209 #define IP6_SR_HEADER_FLAG_PL_ELT_INGRESS_PE (0x1) 211 #define IP6_SR_HEADER_FLAG_PL_ELT_EGRESS_PE (0x2) 213 #define IP6_SR_HEADER_FLAG_PL_ELT_ORIG_SRC_ADDR (0x3) 225 return (-3 * pl_index) + 12;
234 if (pl_index <= 0 || pl_index > 4)
237 shift = (-3 * pl_index) + 12;
238 flags_host_byte_order >>= shift;
240 return (flags_host_byte_order & 7);
static int ip6_sr_policy_list_shift_from_index(int pl_index)
static int ip6_sr_policy_list_flags(u16 flags_host_byte_order, int pl_index)
pl_index is one-origined