Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_SEG6_IPTUNNEL_H |
| 8 | #define _UAPI_LINUX_SEG6_IPTUNNEL_H |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 9 | #include <linux/seg6.h> |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 10 | enum { |
| 11 | SEG6_IPTUNNEL_UNSPEC, |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 12 | SEG6_IPTUNNEL_SRH, |
| 13 | __SEG6_IPTUNNEL_MAX, |
| 14 | }; |
| 15 | #define SEG6_IPTUNNEL_MAX (__SEG6_IPTUNNEL_MAX - 1) |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 16 | struct seg6_iptunnel_encap { |
| 17 | int mode; |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 18 | struct ipv6_sr_hdr srh[]; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 19 | }; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 20 | #define SEG6_IPTUN_ENCAP_SIZE(x) ((sizeof(* x)) + (((x)->srh->hdrlen + 1) << 3)) |
| 21 | enum { |
| 22 | SEG6_IPTUN_MODE_INLINE, |
| 23 | SEG6_IPTUN_MODE_ENCAP, |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 24 | SEG6_IPTUN_MODE_L2ENCAP, |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 25 | SEG6_IPTUN_MODE_ENCAP_RED, |
| 26 | SEG6_IPTUN_MODE_L2ENCAP_RED, |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 27 | }; |
| 28 | #endif |