aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/socket_netlink_generic_gtp.txt
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-12-30 20:18:14 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-12-30 20:18:14 +0100
commit7f117e28b86fbcd044980c4d2c8baa07548bf0cb (patch)
treec3430c7a2b21ed2e2c2fd9f78c99658b24dcf947 /sys/linux/socket_netlink_generic_gtp.txt
parent74da6acb2157908c0ac6524cbf3bfb60a1221531 (diff)
sys/linux: add virt_wifi and xfrm devices
+ some netlink descriptions
Diffstat (limited to 'sys/linux/socket_netlink_generic_gtp.txt')
-rw-r--r--sys/linux/socket_netlink_generic_gtp.txt47
1 files changed, 47 insertions, 0 deletions
diff --git a/sys/linux/socket_netlink_generic_gtp.txt b/sys/linux/socket_netlink_generic_gtp.txt
new file mode 100644
index 000000000..918044ce8
--- /dev/null
+++ b/sys/linux/socket_netlink_generic_gtp.txt
@@ -0,0 +1,47 @@
+# Copyright 2019 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.
+
+# AF_NETLINK/NETLINK_GENERIC/gtp support.
+
+# TODO: describe gtp packets in vnet.txt (they go inside of udp packets, see gtp_encap_recv()).
+
+include <linux/net.h>
+include <uapi/linux/netlink.h>
+include <uapi/linux/genetlink.h>
+include <uapi/linux/if_link.h>
+include <uapi/linux/gtp.h>
+
+resource genl_gtp_family_id[int16]
+type msghdr_nl_gtp[CMD] msghdr_netlink[netlink_msg_t[genl_gtp_family_id, genlmsghdr_t[CMD], gtp_genl_policy]]
+
+syz_genetlink_get_family_id$gtp(name ptr[in, string["gtp"]]) genl_gtp_family_id
+
+sendmsg$GTP_CMD_NEWPDP(fd sock_nl_generic, msg ptr[in, msghdr_nl_gtp[GTP_CMD_NEWPDP]], f flags[send_flags])
+sendmsg$GTP_CMD_DELPDP(fd sock_nl_generic, msg ptr[in, msghdr_nl_gtp[GTP_CMD_DELPDP]], f flags[send_flags])
+sendmsg$GTP_CMD_GETPDP(fd sock_nl_generic, msg ptr[in, msghdr_nl_gtp[GTP_CMD_GETPDP]], f flags[send_flags])
+
+gtp_genl_policy [
+# TODO: fuzzer will have hard time getting ifindex of a gtp device (which needs to be created before).
+ GTPA_LINK nlattr[GTPA_LINK, ifindex]
+ GTPA_VERSION nlattr[GTPA_VERSION, int32[GTP_V0:GTP_V1]]
+ GTPA_TID nlattr[GTPA_TID, int64[0:4]]
+ GTPA_PEER_ADDRESS nlattr[GTPA_PEER_ADDRESS, ipv4_addr]
+ GTPA_MS_ADDRESS nlattr[GTPA_MS_ADDRESS, ipv4_addr]
+ GTPA_FLOW nlattr[GTPA_FLOW, int16[0:4]]
+ GTPA_NET_NS_FD nlattr[GTPA_NET_NS_FD, fd_namespace]
+ GTPA_I_TEI nlattr[GTPA_I_TEI, int32[0:4]]
+ GTPA_O_TEI nlattr[GTPA_O_TEI, int32[0:4]]
+] [varlen]
+
+gtp_policy {
+ IFLA_GTP_FD0 nlattr[IFLA_GTP_FD0, sock_udp]
+ IFLA_GTP_FD1 nlattr[IFLA_GTP_FD1, sock_udp]
+ var array[gtp_policy_var]
+}
+
+gtp_policy_var [
+ IFLA_GTP_FD0 nlattr[IFLA_GTP_FD0, sock_udp6]
+ IFLA_GTP_FD1 nlattr[IFLA_GTP_FD1, sock_udp6]
+ IFLA_GTP_PDP_HASHSIZE nlattr[IFLA_GTP_PDP_HASHSIZE, int32]
+ IFLA_GTP_ROLE nlattr[IFLA_GTP_ROLE, int32[0:2]]
+] [varlen]