github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/socket_netlink_generic_mptcp.txt (about)

     1  # Copyright 2020 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  # AF_NETLINK/NETLINK_GENERIC/mptcp support.
     5  
     6  include <linux/net.h>
     7  include <uapi/linux/netlink.h>
     8  include <uapi/linux/genetlink.h>
     9  include <uapi/linux/mptcp.h>
    10  
    11  resource genl_mptcp_family_id[int16]
    12  type msghdr_nl_mptcp[CMD] msghdr_netlink[netlink_msg_t[genl_mptcp_family_id, genlmsghdr_t[CMD], mptcp_pm_policy]]
    13  
    14  syz_genetlink_get_family_id$mptcp(name ptr[in, string["mptcp_pm"]], fd sock_nl_generic) genl_mptcp_family_id
    15  
    16  sendmsg$MPTCP_PM_CMD_ADD_ADDR(fd sock_nl_generic, msg ptr[in, msghdr_nl_mptcp[MPTCP_PM_CMD_ADD_ADDR]], f flags[send_flags])
    17  sendmsg$MPTCP_PM_CMD_DEL_ADDR(fd sock_nl_generic, msg ptr[in, msghdr_nl_mptcp[MPTCP_PM_CMD_DEL_ADDR]], f flags[send_flags])
    18  sendmsg$MPTCP_PM_CMD_GET_ADDR(fd sock_nl_generic, msg ptr[in, msghdr_nl_mptcp[MPTCP_PM_CMD_GET_ADDR]], f flags[send_flags])
    19  sendmsg$MPTCP_PM_CMD_FLUSH_ADDRS(fd sock_nl_generic, msg ptr[in, msghdr_nl_mptcp[MPTCP_PM_CMD_FLUSH_ADDRS]], f flags[send_flags])
    20  sendmsg$MPTCP_PM_CMD_SET_LIMITS(fd sock_nl_generic, msg ptr[in, msghdr_nl_mptcp[MPTCP_PM_CMD_SET_LIMITS]], f flags[send_flags])
    21  sendmsg$MPTCP_PM_CMD_GET_LIMITS(fd sock_nl_generic, msg ptr[in, msghdr_nl_mptcp[MPTCP_PM_CMD_GET_LIMITS]], f flags[send_flags])
    22  sendmsg$MPTCP_PM_CMD_SET_FLAGS(fd sock_nl_generic, msg ptr[in, msghdr_nl_mptcp[MPTCP_PM_CMD_SET_FLAGS]], f flags[send_flags])
    23  sendmsg$MPTCP_PM_CMD_ANNOUNCE(fd sock_nl_generic, msg ptr[in, msghdr_nl_mptcp[MPTCP_PM_CMD_ANNOUNCE]], f flags[send_flags])
    24  sendmsg$MPTCP_PM_CMD_REMOVE(fd sock_nl_generic, msg ptr[in, msghdr_nl_mptcp[MPTCP_PM_CMD_REMOVE]], f flags[send_flags])
    25  sendmsg$MPTCP_PM_CMD_SUBFLOW_CREATE(fd sock_nl_generic, msg ptr[in, msghdr_nl_mptcp[MPTCP_PM_CMD_SUBFLOW_CREATE]], f flags[send_flags])
    26  sendmsg$MPTCP_PM_CMD_SUBFLOW_DESTROY(fd sock_nl_generic, msg ptr[in, msghdr_nl_mptcp[MPTCP_PM_CMD_SUBFLOW_DESTROY]], f flags[send_flags])
    27  
    28  mptcp_pm_policy [
    29  	MPTCP_PM_ATTR_ADDR		nlnest[MPTCP_PM_ATTR_ADDR, array[mptcp_pm_addr_policy, 0:7]]
    30  	MPTCP_PM_ATTR_RCV_ADD_ADDRS	nlattr[MPTCP_PM_ATTR_RCV_ADD_ADDRS, int32[0:8]]
    31  	MPTCP_PM_ATTR_SUBFLOWS		nlattr[MPTCP_PM_ATTR_SUBFLOWS, int32[0:8]]
    32  	MPTCP_PM_ATTR_TOKEN		nlattr[MPTCP_PM_ATTR_TOKEN, int32]
    33  	MPTCP_PM_ATTR_LOC_ID		nlattr[MPTCP_PM_ATTR_LOC_ID, int8]
    34  	MPTCP_PM_ATTR_ADDR_REMOTE	nlnest[MPTCP_PM_ATTR_ADDR_REMOTE, array[mptcp_pm_addr_policy, 0:7]]
    35  ] [varlen]
    36  
    37  mptcp_pm_addr_policy [
    38  	MPTCP_PM_ADDR_ATTR_FAMILY	nlattr[MPTCP_PM_ADDR_ATTR_FAMILY, flags[mptcp_families, int16]]
    39  	MPTCP_PM_ADDR_ATTR_ID		nlattr[MPTCP_PM_ADDR_ATTR_ID, int8]
    40  	MPTCP_PM_ADDR_ATTR_ADDR4	nlattr[MPTCP_PM_ADDR_ATTR_ADDR4, ipv4_addr]
    41  	MPTCP_PM_ADDR_ATTR_ADDR6	nlattr[MPTCP_PM_ADDR_ATTR_ADDR6, ipv6_addr]
    42  	MPTCP_PM_ADDR_ATTR_PORT		nlattr[MPTCP_PM_ADDR_ATTR_PORT, sock_port]
    43  	MPTCP_PM_ADDR_ATTR_FLAGS	nlattr[MPTCP_PM_ADDR_ATTR_FLAGS, flags[mptcp_pm_addr_flags, int32]]
    44  	MPTCP_PM_ADDR_ATTR_IF_IDX	nlattr[MPTCP_PM_ADDR_ATTR_IF_IDX, ifindex]
    45  ] [varlen]
    46  
    47  mptcp_families = AF_INET, AF_INET6
    48  mptcp_pm_addr_flags = MPTCP_PM_ADDR_FLAG_SIGNAL, MPTCP_PM_ADDR_FLAG_SUBFLOW, MPTCP_PM_ADDR_FLAG_BACKUP, MPTCP_PM_ADDR_FLAG_FULLMESH, MPTCP_PM_ADDR_FLAG_IMPLICIT