net: add IPv6 header fields macros

Support IPv6 header vtc_flow fields : tc , flow_label

Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
This commit is contained in:
Shachar Beiser 2018-01-16 11:17:51 +02:00 committed by Ferruh Yigit
parent 2c6b19af78
commit 9b20c6e902

View File

@ -344,6 +344,12 @@ struct ipv6_hdr {
uint8_t dst_addr[16]; /**< IP address of destination host(s). */
} __attribute__((__packed__));
/* IPv6 vtc_flow: IPv / TC / flow_label */
#define IPV6_HDR_FL_SHIFT 0
#define IPV6_HDR_TC_SHIFT 20
#define IPV6_HDR_FL_MASK ((1u << IPV6_HDR_TC_SHIFT) - 1)
#define IPV6_HDR_TC_MASK (0xf << IPV6_HDR_TC_SHIFT)
/**
* Process the pseudo-header checksum of an IPv6 header.
*