diff options
| author | Cheng-Min Chiang <chmnchiang@google.com> | 2020-07-06 16:42:48 -0700 |
|---|---|---|
| committer | Matt Morehouse <mascasa@google.com> | 2020-07-10 13:02:07 -0700 |
| commit | 18d18b591b354e07ba76be8f115b7119d49056a9 (patch) | |
| tree | dc150f54afde5312ed1171a68a57f66d107c2cef /sys/linux | |
| parent | 146a394c19589483c629e3822d8869c980ad66ec (diff) | |
sys/linux: add descriptions for IP tunnels
Add descriptions related to IPv4/v6 tunnels
(include/uapi/linux/if_tunnel.h).
Descriptions of netlink actions are not included in this commit.
Update #533.
Diffstat (limited to 'sys/linux')
| -rw-r--r-- | sys/linux/socket_ip_tunnel.txt | 75 | ||||
| -rw-r--r-- | sys/linux/socket_ip_tunnel_386.const | 35 | ||||
| -rw-r--r-- | sys/linux/socket_ip_tunnel_amd64.const | 35 | ||||
| -rw-r--r-- | sys/linux/socket_ip_tunnel_arm.const | 35 | ||||
| -rw-r--r-- | sys/linux/socket_ip_tunnel_arm64.const | 35 | ||||
| -rw-r--r-- | sys/linux/socket_ip_tunnel_mips64le.const | 35 | ||||
| -rw-r--r-- | sys/linux/socket_ip_tunnel_ppc64le.const | 35 | ||||
| -rw-r--r-- | sys/linux/socket_ip_tunnel_riscv64.const | 35 | ||||
| -rw-r--r-- | sys/linux/socket_ip_tunnel_s390x.const | 35 |
9 files changed, 355 insertions, 0 deletions
diff --git a/sys/linux/socket_ip_tunnel.txt b/sys/linux/socket_ip_tunnel.txt new file mode 100644 index 000000000..33f6849ed --- /dev/null +++ b/sys/linux/socket_ip_tunnel.txt @@ -0,0 +1,75 @@ +# Copyright 2020 syzkaller project authors. All rights reserved. +# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +include <uapi/linux/if_tunnel.h> +include <uapi/linux/ip6_tunnel.h> +include <uapi/linux/if.h> +include <uapi/linux/in.h> +include <uapi/linux/ip.h> +include <net/ip.h> + +# Fallback tunnels and placeholder names "syztnl*". +ipv4_tunnel_names = "ip_vti0", "tunl0", "gre0", "gretap0", "erspan0", "syztnl0", "syztnl1", "syztnl2" +ipv6_tunnel_names = "ip6tnl0", "ip6_vti0", "ip6gre0", "sit0", "syztnl0", "syztnl1", "syztnl2" + +ip_tunnel_protocols = IPPROTO_IPIP, IPPROTO_GRE, IPPROTO_IPV6 +ip_tunnel_io_flags = GRE_CSUM, GRE_ROUTING, GRE_KEY, GRE_SEQ, GRE_STRICT, GRE_REC, GRE_ACK, GRE_FLAGS, GRE_VERSION, VTI_ISVTI + +type ipv4_header_only ipv4_packet_t[flags[ip_tunnel_protocols, int8], void] + +# IPv4 tunnel parameters +ip_tunnel_parm { + name string[ipv4_tunnel_names, IFNAMSIZ] + link ifindex + i_flags flags[ip_tunnel_io_flags, int16be] + o_flags flags[ip_tunnel_io_flags, int16be] + i_key int32be + o_key int32be + iph ipv4_header_only +} + +ipv6_tunnel_flags = IP6_TNL_F_IGN_ENCAP_LIMIT, IP6_TNL_F_USE_ORIG_TCLASS, IP6_TNL_F_USE_ORIG_FLOWLABEL, IP6_TNL_F_MIP6_DEV, IP6_TNL_F_RCV_DSCP_COPY, IP6_TNL_F_USE_ORIG_FWMARK, IP6_TNL_F_ALLOW_LOCAL_REMOTE + +# IPv6 tunnel parameters +ip6_tnl_parm2 { + name string[ipv6_tunnel_names, IFNAMSIZ] + link ifindex + proto flags[ip_tunnel_protocols, int8] + encap_limit int8 + hop_limit int8 + flowinfo int32be + flags flags[ipv6_tunnel_flags, int32] + laddr ipv6_addr + raddr ipv6_addr + i_flags flags[ip_tunnel_io_flags, int16be] + o_flags flags[ip_tunnel_io_flags, int16be] + i_key int32be + o_key int32be +} + +type ifreq_ipv4_tunnel ifreq_dev_t[ipv4_tunnel_names, ptr[inout, ip_tunnel_parm]] +type ifreq_ipv6_tunnel ifreq_dev_t[ipv6_tunnel_names, ptr[inout, ip6_tnl_parm2]] + +# Repeat IP tunnel syscall variants here until #1913 is resolved. +# IPv4 ioctls +ioctl$sock_ipv4_tunnel_SIOCGETTUNNEL(fd sock_udp, cmd const[SIOCGETTUNNEL], arg ptr[inout, ifreq_ipv4_tunnel]) +ioctl$sock_ipv4_tunnel_SIOCADDTUNNEL(fd sock_udp, cmd const[SIOCADDTUNNEL], arg ptr[inout, ifreq_ipv4_tunnel]) +ioctl$sock_ipv4_tunnel_SIOCDELTUNNEL(fd sock_udp, cmd const[SIOCDELTUNNEL], arg ptr[inout, ifreq_ipv4_tunnel]) +ioctl$sock_ipv4_tunnel_SIOCCHGTUNNEL(fd sock_udp, cmd const[SIOCCHGTUNNEL], arg ptr[inout, ifreq_ipv4_tunnel]) + +# IPv6 ioctls +# SIOC***TUNNEL +ioctl$sock_ipv6_tunnel_SIOCGETTUNNEL(fd sock_udp6, cmd const[SIOCGETTUNNEL], arg ptr[inout, ifreq_ipv6_tunnel]) +ioctl$sock_ipv6_tunnel_SIOCADDTUNNEL(fd sock_udp6, cmd const[SIOCADDTUNNEL], arg ptr[inout, ifreq_ipv6_tunnel]) +ioctl$sock_ipv6_tunnel_SIOCDELTUNNEL(fd sock_udp6, cmd const[SIOCDELTUNNEL], arg ptr[inout, ifreq_ipv6_tunnel]) +ioctl$sock_ipv6_tunnel_SIOCCHGTUNNEL(fd sock_udp6, cmd const[SIOCCHGTUNNEL], arg ptr[inout, ifreq_ipv6_tunnel]) +# SIOC***PRL +ioctl$sock_ipv6_tunnel_SIOCGETPRL(fd sock_udp6, cmd const[SIOCGETPRL], arg ptr[inout, ifreq_ipv6_tunnel]) +ioctl$sock_ipv6_tunnel_SIOCADDPRL(fd sock_udp6, cmd const[SIOCADDPRL], arg ptr[inout, ifreq_ipv6_tunnel]) +ioctl$sock_ipv6_tunnel_SIOCDELPRL(fd sock_udp6, cmd const[SIOCDELPRL], arg ptr[inout, ifreq_ipv6_tunnel]) +ioctl$sock_ipv6_tunnel_SIOCCHGPRL(fd sock_udp6, cmd const[SIOCCHGPRL], arg ptr[inout, ifreq_ipv6_tunnel]) +# SIOC***6RD +ioctl$sock_ipv6_tunnel_SIOCGET6RD(fd sock_udp6, cmd const[SIOCGET6RD], arg ptr[inout, ifreq_ipv6_tunnel]) +ioctl$sock_ipv6_tunnel_SIOCADD6RD(fd sock_udp6, cmd const[SIOCADD6RD], arg ptr[inout, ifreq_ipv6_tunnel]) +ioctl$sock_ipv6_tunnel_SIOCDEL6RD(fd sock_udp6, cmd const[SIOCDEL6RD], arg ptr[inout, ifreq_ipv6_tunnel]) +ioctl$sock_ipv6_tunnel_SIOCCHG6RD(fd sock_udp6, cmd const[SIOCCHG6RD], arg ptr[inout, ifreq_ipv6_tunnel]) diff --git a/sys/linux/socket_ip_tunnel_386.const b/sys/linux/socket_ip_tunnel_386.const new file mode 100644 index 000000000..30dbb35be --- /dev/null +++ b/sys/linux/socket_ip_tunnel_386.const @@ -0,0 +1,35 @@ +# AUTOGENERATED FILE +GRE_ACK = 32768 +GRE_CSUM = 128 +GRE_FLAGS = 30720 +GRE_KEY = 32 +GRE_REC = 7 +GRE_ROUTING = 64 +GRE_SEQ = 16 +GRE_STRICT = 8 +GRE_VERSION = 1792 +IFNAMSIZ = 16 +IP6_TNL_F_ALLOW_LOCAL_REMOTE = 64 +IP6_TNL_F_IGN_ENCAP_LIMIT = 1 +IP6_TNL_F_MIP6_DEV = 8 +IP6_TNL_F_RCV_DSCP_COPY = 16 +IP6_TNL_F_USE_ORIG_FLOWLABEL = 4 +IP6_TNL_F_USE_ORIG_FWMARK = 32 +IP6_TNL_F_USE_ORIG_TCLASS = 2 +IPPROTO_GRE = 47 +IPPROTO_IPIP = 4 +IPPROTO_IPV6 = 41 +SIOCADD6RD = 35321 +SIOCADDPRL = 35317 +SIOCADDTUNNEL = 35313 +SIOCCHG6RD = 35323 +SIOCCHGPRL = 35319 +SIOCCHGTUNNEL = 35315 +SIOCDEL6RD = 35322 +SIOCDELPRL = 35318 +SIOCDELTUNNEL = 35314 +SIOCGET6RD = 35320 +SIOCGETPRL = 35316 +SIOCGETTUNNEL = 35312 +VTI_ISVTI = 1 +__NR_ioctl = 54 diff --git a/sys/linux/socket_ip_tunnel_amd64.const b/sys/linux/socket_ip_tunnel_amd64.const new file mode 100644 index 000000000..b21f991d1 --- /dev/null +++ b/sys/linux/socket_ip_tunnel_amd64.const @@ -0,0 +1,35 @@ +# AUTOGENERATED FILE +GRE_ACK = 32768 +GRE_CSUM = 128 +GRE_FLAGS = 30720 +GRE_KEY = 32 +GRE_REC = 7 +GRE_ROUTING = 64 +GRE_SEQ = 16 +GRE_STRICT = 8 +GRE_VERSION = 1792 +IFNAMSIZ = 16 +IP6_TNL_F_ALLOW_LOCAL_REMOTE = 64 +IP6_TNL_F_IGN_ENCAP_LIMIT = 1 +IP6_TNL_F_MIP6_DEV = 8 +IP6_TNL_F_RCV_DSCP_COPY = 16 +IP6_TNL_F_USE_ORIG_FLOWLABEL = 4 +IP6_TNL_F_USE_ORIG_FWMARK = 32 +IP6_TNL_F_USE_ORIG_TCLASS = 2 +IPPROTO_GRE = 47 +IPPROTO_IPIP = 4 +IPPROTO_IPV6 = 41 +SIOCADD6RD = 35321 +SIOCADDPRL = 35317 +SIOCADDTUNNEL = 35313 +SIOCCHG6RD = 35323 +SIOCCHGPRL = 35319 +SIOCCHGTUNNEL = 35315 +SIOCDEL6RD = 35322 +SIOCDELPRL = 35318 +SIOCDELTUNNEL = 35314 +SIOCGET6RD = 35320 +SIOCGETPRL = 35316 +SIOCGETTUNNEL = 35312 +VTI_ISVTI = 1 +__NR_ioctl = 16 diff --git a/sys/linux/socket_ip_tunnel_arm.const b/sys/linux/socket_ip_tunnel_arm.const new file mode 100644 index 000000000..30dbb35be --- /dev/null +++ b/sys/linux/socket_ip_tunnel_arm.const @@ -0,0 +1,35 @@ +# AUTOGENERATED FILE +GRE_ACK = 32768 +GRE_CSUM = 128 +GRE_FLAGS = 30720 +GRE_KEY = 32 +GRE_REC = 7 +GRE_ROUTING = 64 +GRE_SEQ = 16 +GRE_STRICT = 8 +GRE_VERSION = 1792 +IFNAMSIZ = 16 +IP6_TNL_F_ALLOW_LOCAL_REMOTE = 64 +IP6_TNL_F_IGN_ENCAP_LIMIT = 1 +IP6_TNL_F_MIP6_DEV = 8 +IP6_TNL_F_RCV_DSCP_COPY = 16 +IP6_TNL_F_USE_ORIG_FLOWLABEL = 4 +IP6_TNL_F_USE_ORIG_FWMARK = 32 +IP6_TNL_F_USE_ORIG_TCLASS = 2 +IPPROTO_GRE = 47 +IPPROTO_IPIP = 4 +IPPROTO_IPV6 = 41 +SIOCADD6RD = 35321 +SIOCADDPRL = 35317 +SIOCADDTUNNEL = 35313 +SIOCCHG6RD = 35323 +SIOCCHGPRL = 35319 +SIOCCHGTUNNEL = 35315 +SIOCDEL6RD = 35322 +SIOCDELPRL = 35318 +SIOCDELTUNNEL = 35314 +SIOCGET6RD = 35320 +SIOCGETPRL = 35316 +SIOCGETTUNNEL = 35312 +VTI_ISVTI = 1 +__NR_ioctl = 54 diff --git a/sys/linux/socket_ip_tunnel_arm64.const b/sys/linux/socket_ip_tunnel_arm64.const new file mode 100644 index 000000000..828d20bb8 --- /dev/null +++ b/sys/linux/socket_ip_tunnel_arm64.const @@ -0,0 +1,35 @@ +# AUTOGENERATED FILE +GRE_ACK = 32768 +GRE_CSUM = 128 +GRE_FLAGS = 30720 +GRE_KEY = 32 +GRE_REC = 7 +GRE_ROUTING = 64 +GRE_SEQ = 16 +GRE_STRICT = 8 +GRE_VERSION = 1792 +IFNAMSIZ = 16 +IP6_TNL_F_ALLOW_LOCAL_REMOTE = 64 +IP6_TNL_F_IGN_ENCAP_LIMIT = 1 +IP6_TNL_F_MIP6_DEV = 8 +IP6_TNL_F_RCV_DSCP_COPY = 16 +IP6_TNL_F_USE_ORIG_FLOWLABEL = 4 +IP6_TNL_F_USE_ORIG_FWMARK = 32 +IP6_TNL_F_USE_ORIG_TCLASS = 2 +IPPROTO_GRE = 47 +IPPROTO_IPIP = 4 +IPPROTO_IPV6 = 41 +SIOCADD6RD = 35321 +SIOCADDPRL = 35317 +SIOCADDTUNNEL = 35313 +SIOCCHG6RD = 35323 +SIOCCHGPRL = 35319 +SIOCCHGTUNNEL = 35315 +SIOCDEL6RD = 35322 +SIOCDELPRL = 35318 +SIOCDELTUNNEL = 35314 +SIOCGET6RD = 35320 +SIOCGETPRL = 35316 +SIOCGETTUNNEL = 35312 +VTI_ISVTI = 1 +__NR_ioctl = 29 diff --git a/sys/linux/socket_ip_tunnel_mips64le.const b/sys/linux/socket_ip_tunnel_mips64le.const new file mode 100644 index 000000000..8b2f6b3b8 --- /dev/null +++ b/sys/linux/socket_ip_tunnel_mips64le.const @@ -0,0 +1,35 @@ +# AUTOGENERATED FILE +GRE_ACK = 32768 +GRE_CSUM = 128 +GRE_FLAGS = 30720 +GRE_KEY = 32 +GRE_REC = 7 +GRE_ROUTING = 64 +GRE_SEQ = 16 +GRE_STRICT = 8 +GRE_VERSION = 1792 +IFNAMSIZ = 16 +IP6_TNL_F_ALLOW_LOCAL_REMOTE = 64 +IP6_TNL_F_IGN_ENCAP_LIMIT = 1 +IP6_TNL_F_MIP6_DEV = 8 +IP6_TNL_F_RCV_DSCP_COPY = 16 +IP6_TNL_F_USE_ORIG_FLOWLABEL = 4 +IP6_TNL_F_USE_ORIG_FWMARK = 32 +IP6_TNL_F_USE_ORIG_TCLASS = 2 +IPPROTO_GRE = 47 +IPPROTO_IPIP = 4 +IPPROTO_IPV6 = 41 +SIOCADD6RD = 35321 +SIOCADDPRL = 35317 +SIOCADDTUNNEL = 35313 +SIOCCHG6RD = 35323 +SIOCCHGPRL = 35319 +SIOCCHGTUNNEL = 35315 +SIOCDEL6RD = 35322 +SIOCDELPRL = 35318 +SIOCDELTUNNEL = 35314 +SIOCGET6RD = 35320 +SIOCGETPRL = 35316 +SIOCGETTUNNEL = 35312 +VTI_ISVTI = 1 +__NR_ioctl = 5015 diff --git a/sys/linux/socket_ip_tunnel_ppc64le.const b/sys/linux/socket_ip_tunnel_ppc64le.const new file mode 100644 index 000000000..30dbb35be --- /dev/null +++ b/sys/linux/socket_ip_tunnel_ppc64le.const @@ -0,0 +1,35 @@ +# AUTOGENERATED FILE +GRE_ACK = 32768 +GRE_CSUM = 128 +GRE_FLAGS = 30720 +GRE_KEY = 32 +GRE_REC = 7 +GRE_ROUTING = 64 +GRE_SEQ = 16 +GRE_STRICT = 8 +GRE_VERSION = 1792 +IFNAMSIZ = 16 +IP6_TNL_F_ALLOW_LOCAL_REMOTE = 64 +IP6_TNL_F_IGN_ENCAP_LIMIT = 1 +IP6_TNL_F_MIP6_DEV = 8 +IP6_TNL_F_RCV_DSCP_COPY = 16 +IP6_TNL_F_USE_ORIG_FLOWLABEL = 4 +IP6_TNL_F_USE_ORIG_FWMARK = 32 +IP6_TNL_F_USE_ORIG_TCLASS = 2 +IPPROTO_GRE = 47 +IPPROTO_IPIP = 4 +IPPROTO_IPV6 = 41 +SIOCADD6RD = 35321 +SIOCADDPRL = 35317 +SIOCADDTUNNEL = 35313 +SIOCCHG6RD = 35323 +SIOCCHGPRL = 35319 +SIOCCHGTUNNEL = 35315 +SIOCDEL6RD = 35322 +SIOCDELPRL = 35318 +SIOCDELTUNNEL = 35314 +SIOCGET6RD = 35320 +SIOCGETPRL = 35316 +SIOCGETTUNNEL = 35312 +VTI_ISVTI = 1 +__NR_ioctl = 54 diff --git a/sys/linux/socket_ip_tunnel_riscv64.const b/sys/linux/socket_ip_tunnel_riscv64.const new file mode 100644 index 000000000..828d20bb8 --- /dev/null +++ b/sys/linux/socket_ip_tunnel_riscv64.const @@ -0,0 +1,35 @@ +# AUTOGENERATED FILE +GRE_ACK = 32768 +GRE_CSUM = 128 +GRE_FLAGS = 30720 +GRE_KEY = 32 +GRE_REC = 7 +GRE_ROUTING = 64 +GRE_SEQ = 16 +GRE_STRICT = 8 +GRE_VERSION = 1792 +IFNAMSIZ = 16 +IP6_TNL_F_ALLOW_LOCAL_REMOTE = 64 +IP6_TNL_F_IGN_ENCAP_LIMIT = 1 +IP6_TNL_F_MIP6_DEV = 8 +IP6_TNL_F_RCV_DSCP_COPY = 16 +IP6_TNL_F_USE_ORIG_FLOWLABEL = 4 +IP6_TNL_F_USE_ORIG_FWMARK = 32 +IP6_TNL_F_USE_ORIG_TCLASS = 2 +IPPROTO_GRE = 47 +IPPROTO_IPIP = 4 +IPPROTO_IPV6 = 41 +SIOCADD6RD = 35321 +SIOCADDPRL = 35317 +SIOCADDTUNNEL = 35313 +SIOCCHG6RD = 35323 +SIOCCHGPRL = 35319 +SIOCCHGTUNNEL = 35315 +SIOCDEL6RD = 35322 +SIOCDELPRL = 35318 +SIOCDELTUNNEL = 35314 +SIOCGET6RD = 35320 +SIOCGETPRL = 35316 +SIOCGETTUNNEL = 35312 +VTI_ISVTI = 1 +__NR_ioctl = 29 diff --git a/sys/linux/socket_ip_tunnel_s390x.const b/sys/linux/socket_ip_tunnel_s390x.const new file mode 100644 index 000000000..50b419834 --- /dev/null +++ b/sys/linux/socket_ip_tunnel_s390x.const @@ -0,0 +1,35 @@ +# AUTOGENERATED FILE +GRE_ACK = 128 +GRE_CSUM = 32768 +GRE_FLAGS = 120 +GRE_KEY = 8192 +GRE_REC = 1792 +GRE_ROUTING = 16384 +GRE_SEQ = 4096 +GRE_STRICT = 2048 +GRE_VERSION = 7 +IFNAMSIZ = 16 +IP6_TNL_F_ALLOW_LOCAL_REMOTE = 64 +IP6_TNL_F_IGN_ENCAP_LIMIT = 1 +IP6_TNL_F_MIP6_DEV = 8 +IP6_TNL_F_RCV_DSCP_COPY = 16 +IP6_TNL_F_USE_ORIG_FLOWLABEL = 4 +IP6_TNL_F_USE_ORIG_FWMARK = 32 +IP6_TNL_F_USE_ORIG_TCLASS = 2 +IPPROTO_GRE = 47 +IPPROTO_IPIP = 4 +IPPROTO_IPV6 = 41 +SIOCADD6RD = 35321 +SIOCADDPRL = 35317 +SIOCADDTUNNEL = 35313 +SIOCCHG6RD = 35323 +SIOCCHGPRL = 35319 +SIOCCHGTUNNEL = 35315 +SIOCDEL6RD = 35322 +SIOCDELPRL = 35318 +SIOCDELTUNNEL = 35314 +SIOCGET6RD = 35320 +SIOCGETPRL = 35316 +SIOCGETTUNNEL = 35312 +VTI_ISVTI = 1 +__NR_ioctl = 54 |
