| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 1 | /**************************************************************************** | 
|  | 2 | **************************************************************************** | 
|  | 3 | *** | 
|  | 4 | ***   This header was automatically generated from a Linux kernel header | 
|  | 5 | ***   of the same name, to make information necessary for userspace to | 
|  | 6 | ***   call into the kernel available to libc.  It contains only constants, | 
|  | 7 | ***   structures, and macros generated from the original header, and thus, | 
|  | 8 | ***   contains no copyrightable information. | 
|  | 9 | *** | 
|  | 10 | ***   To edit the content of this header, modify the corresponding | 
|  | 11 | ***   source file (e.g. under external/kernel-headers/original/) then | 
|  | 12 | ***   run bionic/libc/kernel/tools/update_all.py | 
|  | 13 | *** | 
|  | 14 | ***   Any manual change here will be lost the next time this script will | 
|  | 15 | ***   be run. You've been warned! | 
|  | 16 | *** | 
|  | 17 | **************************************************************************** | 
|  | 18 | ****************************************************************************/ | 
|  | 19 | #ifndef _UAPI_LINUX_SEG6_H | 
|  | 20 | #define _UAPI_LINUX_SEG6_H | 
| Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 21 | #include <linux/types.h> | 
|  | 22 | #include <linux/in6.h> | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 23 | struct ipv6_sr_hdr { | 
|  | 24 | __u8 nexthdr; | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 25 | __u8 hdrlen; | 
|  | 26 | __u8 type; | 
|  | 27 | __u8 segments_left; | 
|  | 28 | __u8 first_segment; | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 29 | __u8 flags; | 
| Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 30 | __u16 tag; | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 31 | struct in6_addr segments[0]; | 
|  | 32 | }; | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 33 | #define SR6_FLAG1_PROTECTED (1 << 6) | 
|  | 34 | #define SR6_FLAG1_OAM (1 << 5) | 
|  | 35 | #define SR6_FLAG1_ALERT (1 << 4) | 
|  | 36 | #define SR6_FLAG1_HMAC (1 << 3) | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 37 | #define SR6_TLV_INGRESS 1 | 
|  | 38 | #define SR6_TLV_EGRESS 2 | 
|  | 39 | #define SR6_TLV_OPAQUE 3 | 
|  | 40 | #define SR6_TLV_PADDING 4 | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 41 | #define SR6_TLV_HMAC 5 | 
|  | 42 | #define sr_has_hmac(srh) ((srh)->flags & SR6_FLAG1_HMAC) | 
|  | 43 | struct sr6_tlv { | 
|  | 44 | __u8 type; | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 45 | __u8 len; | 
|  | 46 | __u8 data[0]; | 
|  | 47 | }; | 
|  | 48 | #endif |