0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _UAPI_LINUX_SEG6_IPTUNNEL_H
0016 #define _UAPI_LINUX_SEG6_IPTUNNEL_H
0017
0018 #include <linux/seg6.h> /* For struct ipv6_sr_hdr. */
0019
0020 enum {
0021 SEG6_IPTUNNEL_UNSPEC,
0022 SEG6_IPTUNNEL_SRH,
0023 __SEG6_IPTUNNEL_MAX,
0024 };
0025 #define SEG6_IPTUNNEL_MAX (__SEG6_IPTUNNEL_MAX - 1)
0026
0027 struct seg6_iptunnel_encap {
0028 int mode;
0029 struct ipv6_sr_hdr srh[];
0030 };
0031
0032 #define SEG6_IPTUN_ENCAP_SIZE(x) ((sizeof(*x)) + (((x)->srh->hdrlen + 1) << 3))
0033
0034 enum {
0035 SEG6_IPTUN_MODE_INLINE,
0036 SEG6_IPTUN_MODE_ENCAP,
0037 SEG6_IPTUN_MODE_L2ENCAP,
0038 SEG6_IPTUN_MODE_ENCAP_RED,
0039 SEG6_IPTUN_MODE_L2ENCAP_RED,
0040 };
0041
0042 #endif