X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip6_packet.h;h=6b724370e76751f2bab60377b4f7cbe03266101a;hb=75e7d1301475d49311d14e202936c62df0c07d10;hp=cdd7eed5a8240cf8d4475b81c98692b372a71464;hpb=e101e1f52f1da71575588fac30b984a0e94fb5a7;p=vpp.git diff --git a/src/vnet/ip/ip6_packet.h b/src/vnet/ip/ip6_packet.h index cdd7eed5a82..6b724370e76 100644 --- a/src/vnet/ip/ip6_packet.h +++ b/src/vnet/ip/ip6_packet.h @@ -341,6 +341,12 @@ typedef struct ip6_address_t src_address, dst_address; } ip6_header_t; +always_inline u8 +ip6_traffic_class (ip6_header_t * i) +{ + return (i->ip_version_traffic_class_and_flow_label & 0x0FF00000) >> 20; +} + always_inline void * ip6_next_header (ip6_header_t * i) { @@ -513,6 +519,9 @@ typedef CLIB_PACKED (struct { #define ip6_frag_hdr_offset(hdr) \ (clib_net_to_host_u16((hdr)->fragment_offset_and_more) >> 3) +#define ip6_frag_hdr_offset_bytes(hdr) \ + (8 * ip6_frag_hdr_offset(hdr)) + #define ip6_frag_hdr_more(hdr) \ (clib_net_to_host_u16((hdr)->fragment_offset_and_more) & 0x1)