/* Check for link local unicast fe80::/10. */
always_inline uword
-ip6_address_is_link_local_unicast (ip6_address_t * a)
+ip6_address_is_link_local_unicast (const ip6_address_t * a)
{
return a->as_u8[0] == 0xfe && (a->as_u8[1] & 0xc0) == 0x80;
}
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)
{
#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)