0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _UAPI_LINUX_SEG6_H
0016 #define _UAPI_LINUX_SEG6_H
0017
0018 #include <linux/types.h>
0019 #include <linux/in6.h> /* For struct in6_addr. */
0020
0021
0022
0023
0024 struct ipv6_sr_hdr {
0025 __u8 nexthdr;
0026 __u8 hdrlen;
0027 __u8 type;
0028 __u8 segments_left;
0029 __u8 first_segment;
0030 __u8 flags;
0031 __u16 tag;
0032
0033 struct in6_addr segments[];
0034 };
0035
0036 #define SR6_FLAG1_PROTECTED (1 << 6)
0037 #define SR6_FLAG1_OAM (1 << 5)
0038 #define SR6_FLAG1_ALERT (1 << 4)
0039 #define SR6_FLAG1_HMAC (1 << 3)
0040
0041 #define SR6_TLV_INGRESS 1
0042 #define SR6_TLV_EGRESS 2
0043 #define SR6_TLV_OPAQUE 3
0044 #define SR6_TLV_PADDING 4
0045 #define SR6_TLV_HMAC 5
0046
0047 #define sr_has_hmac(srh) ((srh)->flags & SR6_FLAG1_HMAC)
0048
0049 struct sr6_tlv {
0050 __u8 type;
0051 __u8 len;
0052 __u8 data[0];
0053 };
0054
0055 #endif