aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/socket_netlink_generic.txt
blob: 116e3dbc0eb3696c8d1d9d05cf157e83a95ee02b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Copyright 2017 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 support.

# TODO: describe APIs of specific genetlink families.

include <linux/net.h>
include <uapi/linux/netlink.h>
include <uapi/linux/genetlink.h>

resource sock_nl_generic[sock_netlink]

socket$nl_generic(domain const[AF_NETLINK], type const[SOCK_RAW], proto const[NETLINK_GENERIC]) sock_nl_generic

sendmsg$nl_generic(fd sock_nl_generic, msg ptr[in, msghdr_nl_generic], f flags[send_flags])

type msghdr_nl_generic msghdr_netlink[netlink_msg_t[netlink_random_msg_type, genlmsghdr, nl_generic_attr]]

genlmsghdr {
	cmd		int8[0:32]
	version		const[0, int8]
	reserved	const[0, int16]
} [align_4]

type genlmsghdr_t[CMD] {
	cmd		const[CMD, int8]
	version		const[0, int8]
	reserved	const[0, int16]
} [align_4]