summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip6_packet.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip/ip6_packet.h')
-rw-r--r--src/vnet/ip/ip6_packet.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/ip/ip6_packet.h b/src/vnet/ip/ip6_packet.h
index cdd7eed5a82..c0c745e27fe 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)
{