• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This header was generated from the Linux kernel headers by update_headers.py,
3  * to provide necessary information from kernel to userspace, such as constants,
4  * structures, and macros, and thus, contains no copyrightable information.
5  */
6 #ifndef _UAPI_LINUX_SEG6_H
7 #define _UAPI_LINUX_SEG6_H
8 #include <linux/types.h>
9 #include <linux/in6.h>
10 struct ipv6_sr_hdr {
11 	__u8	nexthdr;
12 	__u8	hdrlen;
13 	__u8	type;
14 	__u8	segments_left;
15 	__u8	first_segment;
16 	__u8	flags;
17 	__u16	tag;
18 	struct in6_addr segments[0];
19 };
20 #define SR6_FLAG1_PROTECTED	(1 << 6)
21 #define SR6_FLAG1_OAM		(1 << 5)
22 #define SR6_FLAG1_ALERT		(1 << 4)
23 #define SR6_FLAG1_HMAC		(1 << 3)
24 #define SR6_TLV_INGRESS		1
25 #define SR6_TLV_EGRESS		2
26 #define SR6_TLV_OPAQUE		3
27 #define SR6_TLV_PADDING		4
28 #define SR6_TLV_HMAC		5
29 #define sr_has_hmac(srh) ((srh)->flags & SR6_FLAG1_HMAC)
30 struct sr6_tlv {
31 	__u8 type;
32 	__u8 len;
33 	__u8 data[0];
34 };
35 #endif
36