aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/ip6.h
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2021-03-04 10:26:40 +0000
committerKristof Provost <kp@FreeBSD.org>2021-03-04 19:56:48 +0000
commitbb4a7d94b99fbf7f59c876ffff8ded5f6a5b5c3e (patch)
tree19cfdf18c158291c34192527ec472d5c07f3d171 /sys/netinet/ip6.h
parentf19323847ca894af8a58839f6a2a41691a8e2245 (diff)
Diffstat (limited to 'sys/netinet/ip6.h')
-rw-r--r--sys/netinet/ip6.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/ip6.h b/sys/netinet/ip6.h
index 44c46fd3b71d..1bc79a98e689 100644
--- a/sys/netinet/ip6.h
+++ b/sys/netinet/ip6.h
@@ -106,6 +106,10 @@ struct ip6_hdr {
#endif
#define IPV6_FLOWLABEL_LEN 20
+#define IPV6_TRAFFIC_CLASS(ip6) ((ntohl((ip6)->ip6_flow) >> 20) & 0xff)
+#define IPV6_DSCP(ip6) ((ntohl((ip6)->ip6_flow) >> 20) & 0xfc)
+#define IPV6_ECN(ip6) ((ntohl((ip6)->ip6_flow) >> 20) & 0x03)
+
/*
* Extension Headers
*/