blob: 74499f54c90a5ea1f3b403edc2eafbdbd991e1ef [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
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 Ferris48af7cb2017-02-21 12:35:09 -08007#ifndef _UAPI_LINUX_SEG6_IPTUNNEL_H
8#define _UAPI_LINUX_SEG6_IPTUNNEL_H
Christopher Ferris525ce912017-07-26 13:12:53 -07009#include <linux/seg6.h>
Christopher Ferris48af7cb2017-02-21 12:35:09 -080010enum {
11 SEG6_IPTUNNEL_UNSPEC,
Christopher Ferris48af7cb2017-02-21 12:35:09 -080012 SEG6_IPTUNNEL_SRH,
13 __SEG6_IPTUNNEL_MAX,
14};
15#define SEG6_IPTUNNEL_MAX (__SEG6_IPTUNNEL_MAX - 1)
Christopher Ferris48af7cb2017-02-21 12:35:09 -080016struct seg6_iptunnel_encap {
17 int mode;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070018 struct ipv6_sr_hdr srh[];
Christopher Ferris48af7cb2017-02-21 12:35:09 -080019};
Christopher Ferris48af7cb2017-02-21 12:35:09 -080020#define SEG6_IPTUN_ENCAP_SIZE(x) ((sizeof(* x)) + (((x)->srh->hdrlen + 1) << 3))
21enum {
22 SEG6_IPTUN_MODE_INLINE,
23 SEG6_IPTUN_MODE_ENCAP,
Christopher Ferris1308ad32017-11-14 17:32:13 -080024 SEG6_IPTUN_MODE_L2ENCAP,
Christopher Ferris7447a1c2022-10-04 18:24:44 -070025 SEG6_IPTUN_MODE_ENCAP_RED,
26 SEG6_IPTUN_MODE_L2ENCAP_RED,
Christopher Ferris48af7cb2017-02-21 12:35:09 -080027};
28#endif