Merge tag 'kvmarm-fixes-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmar...
[linux-block.git] / include / uapi / linux / seg6_iptunnel.h
CommitLineData
e2be04c7 1/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
6c8702c6
DL
2/*
3 * SR-IPv6 implementation
4 *
5 * Author:
6 * David Lebrun <david.lebrun@uclouvain.be>
7 *
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version
12 * 2 of the License, or (at your option) any later version.
13 */
14
15#ifndef _UAPI_LINUX_SEG6_IPTUNNEL_H
16#define _UAPI_LINUX_SEG6_IPTUNNEL_H
17
ea3ebc73
DL
18#include <linux/seg6.h> /* For struct ipv6_sr_hdr. */
19
6c8702c6
DL
20enum {
21 SEG6_IPTUNNEL_UNSPEC,
22 SEG6_IPTUNNEL_SRH,
23 __SEG6_IPTUNNEL_MAX,
24};
25#define SEG6_IPTUNNEL_MAX (__SEG6_IPTUNNEL_MAX - 1)
26
27struct seg6_iptunnel_encap {
28 int mode;
94dfc73e 29 struct ipv6_sr_hdr srh[];
6c8702c6
DL
30};
31
32#define SEG6_IPTUN_ENCAP_SIZE(x) ((sizeof(*x)) + (((x)->srh->hdrlen + 1) << 3))
33
34enum {
35 SEG6_IPTUN_MODE_INLINE,
36 SEG6_IPTUN_MODE_ENCAP,
38ee7f2d 37 SEG6_IPTUN_MODE_L2ENCAP,
b07c8cdb 38 SEG6_IPTUN_MODE_ENCAP_RED,
13f0296b 39 SEG6_IPTUN_MODE_L2ENCAP_RED,
6c8702c6
DL
40};
41
a50a05f4 42#endif