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

     1  # Copyright 2018 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/fou support.
     5  
     6  include <linux/net.h>
     7  include <uapi/linux/netlink.h>
     8  include <uapi/linux/genetlink.h>
     9  include <uapi/linux/fou.h>
    10  
    11  resource genl_fou_family_id[int16]
    12  type msghdr_nl_fou[CMD] msghdr_netlink[netlink_msg_t[genl_fou_family_id, genlmsghdr_t[CMD], fou_nl_policy]]
    13  
    14  syz_genetlink_get_family_id$fou(name ptr[in, string["fou"]], fd sock_nl_generic) genl_fou_family_id
    15  
    16  sendmsg$FOU_CMD_ADD(fd sock_nl_generic, msg ptr[in, msghdr_nl_fou[FOU_CMD_ADD]], f flags[send_flags])
    17  sendmsg$FOU_CMD_DEL(fd sock_nl_generic, msg ptr[in, msghdr_nl_fou[FOU_CMD_DEL]], f flags[send_flags])
    18  sendmsg$FOU_CMD_GET(fd sock_nl_generic, msg ptr[in, msghdr_nl_fou[FOU_CMD_GET]], f flags[send_flags])
    19  
    20  fou_nl_policy [
    21  	FOU_ATTR_PORT			nlattr[FOU_ATTR_PORT, sock_port]
    22  	FOU_ATTR_AF			nlattr[FOU_ATTR_AF, flags[fou_families, int8]]
    23  	FOU_ATTR_IPPROTO		nlattr[FOU_ATTR_IPPROTO, flags[ipv6_types, int8]]
    24  	FOU_ATTR_TYPE			nlattr[FOU_ATTR_TYPE, flags[fou_types, int8]]
    25  	FOU_ATTR_REMCSUM_NOPARTIAL	nlattr[FOU_ATTR_REMCSUM_NOPARTIAL, void]
    26  	FOU_ATTR_LOCAL_V4		nlattr[FOU_ATTR_LOCAL_V4, ipv4_addr]
    27  	FOU_ATTR_LOCAL_V6		nlattr[FOU_ATTR_LOCAL_V6, ipv6_addr]
    28  	FOU_ATTR_PEER_V4		nlattr[FOU_ATTR_PEER_V4, ipv4_addr]
    29  	FOU_ATTR_PEER_V6		nlattr[FOU_ATTR_PEER_V6, ipv6_addr]
    30  	FOU_ATTR_PEER_PORT		nlattr[FOU_ATTR_PEER_PORT, sock_port]
    31  	FOU_ATTR_IFINDEX		nlattr[FOU_ATTR_IFINDEX, ifindex]
    32  ] [varlen]
    33  
    34  fou_families = AF_INET, AF_INET6
    35  fou_types = FOU_ENCAP_DIRECT, FOU_ENCAP_GUE