syzkaller/sys/tun.txt

62 lines
2.5 KiB
Plaintext
Raw Normal View History

# Copyright 2015 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 <linux/if_tun.h>
include <linux/virtio_net.h>
resource fd_tun[fd]
syz_open_dev$tun(dev ptr[in, string["/dev/net/tun"]], id const[0], flags flags[open_flags]) fd_tun
write$tun(fd fd_tun, buf ptr[in, tun_buffer], count len[buf])
ioctl$TUNGETFEATURES(fd fd_tun, cmd const[TUNGETFEATURES], arg ptr[out, int32])
ioctl$TUNSETQUEUE(fd fd_tun, cmd const[TUNSETQUEUE], arg ptr[in, ifreq])
ioctl$TUNSETIFF(fd fd_tun, cmd const[TUNSETIFF], arg ptr[in, ifreq])
ioctl$TUNSETIFINDEX(fd fd_tun, cmd const[TUNSETIFINDEX], arg ptr[in, int32])
ioctl$TUNGETIFF(fd fd_tun, cmd const[TUNGETIFF], arg ptr[in, int32])
ioctl$TUNSETNOCSUM(fd fd_tun, cmd const[TUNSETNOCSUM], arg ptr[in, int32])
ioctl$TUNSETPERSIST(fd fd_tun, cmd const[TUNSETPERSIST], arg ptr[in, int32])
ioctl$TUNSETOWNER(fd fd_tun, cmd const[TUNSETOWNER], arg ptr[in, uid])
ioctl$TUNSETLINK(fd fd_tun, cmd const[TUNSETLINK], arg ptr[in, int32])
ioctl$TUNSETOFFLOAD(fd fd_tun, cmd const[TUNSETOFFLOAD], arg ptr[in, int32])
ioctl$TUNSETTXFILTER(fd fd_tun, cmd const[TUNSETTXFILTER], arg ptr[in, tun_filter])
ioctl$SIOCGIFHWADDR(fd fd_tun, cmd const[SIOCGIFHWADDR], arg ptr[in, ifreq])
ioctl$SIOCSIFHWADDR(fd fd_tun, cmd const[SIOCSIFHWADDR], arg ptr[in, ifreq])
ioctl$TUNGETSNDBUF(fd fd_tun, cmd const[TUNGETSNDBUF], arg ptr[out, int32])
ioctl$TUNSETSNDBUF(fd fd_tun, cmd const[TUNSETSNDBUF], arg ptr[in, int32])
ioctl$TUNGETVNETHDRSZ(fd fd_tun, cmd const[TUNGETVNETHDRSZ], arg ptr[out, int32])
ioctl$TUNSETVNETHDRSZ(fd fd_tun, cmd const[TUNSETVNETHDRSZ], arg ptr[in, int32])
ioctl$TUNATTACHFILTER(fd fd_tun, cmd const[TUNATTACHFILTER], arg ptr[in, sock_fprog])
ioctl$TUNDETACHFILTER(fd fd_tun, cmd const[TUNDETACHFILTER], arg ptr[in, int32])
ioctl$TTUNGETFILTER(fd fd_tun, cmd const[TUNGETFILTER], arg ptr[out, int32])
tun_buffer [
pi tun_pi
hdr virtio_net_hdr
] [varlen]
tun_pi {
flags flags[ifru_flags, int32]
proto int16
data array[int8]
}
virtio_net_hdr {
2017-08-14 18:01:28 +00:00
flags flags[virtio_net_flags, int8]
gsotype flags[virtio_net_types, int8]
hdrlen int16
gsosize int16
start int16
offset int16
data array[int8]
}
tun_filter {
flags flags[ifru_flags, int32]
count len[addr, int32]
addr ptr[in, array[int8, 6]]
}
virtio_net_flags = VIRTIO_NET_HDR_F_NEEDS_CSUM, VIRTIO_NET_HDR_F_DATA_VALID
virtio_net_types = VIRTIO_NET_HDR_GSO_NONE, VIRTIO_NET_HDR_GSO_TCPV4, VIRTIO_NET_HDR_GSO_UDP, VIRTIO_NET_HDR_GSO_TCPV6, VIRTIO_NET_HDR_GSO_ECN