github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/socket_netlink_sock_diag.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 include <linux/net.h> 5 include <uapi/linux/netlink.h> 6 include <uapi/linux/sock_diag.h> 7 include <uapi/linux/inet_diag.h> 8 9 resource sock_diag[sock_netlink] 10 11 socket$nl_sock_diag(domain const[AF_NETLINK], type const[SOCK_RAW], proto const[NETLINK_SOCK_DIAG]) sock_diag 12 13 sendmsg$SOCK_DIAG_BY_FAMILY(fd sock_diag, msg ptr[in, msghdr_netlink[netlink_msg[SOCK_DIAG_BY_FAMILY, sock_diag_req, tcpdiag_policy]]], f flags[send_flags]) 14 sendmsg$SOCK_DESTROY(fd sock_diag, msg ptr[in, msghdr_netlink[netlink_msg[SOCK_DESTROY, sock_diag_req, tcpdiag_policy]]], f flags[send_flags]) 15 sendmsg$TCPDIAG_GETSOCK(fd sock_diag, msg ptr[in, msghdr_netlink[netlink_msg[TCPDIAG_GETSOCK, inet_diag_req, tcpdiag_policy]]], f flags[send_flags]) 16 sendmsg$DCCPDIAG_GETSOCK(fd sock_diag, msg ptr[in, msghdr_netlink[netlink_msg[DCCPDIAG_GETSOCK, inet_diag_req, tcpdiag_policy]]], f flags[send_flags]) 17 18 # TODO: this may actually be inet_diag_req_v2 for inet protocols. 19 sock_diag_req { 20 sdiag_family flags[socket_domain, int8] 21 sdiag_protocol int8 22 } 23 24 inet_diag_req { 25 idiag_family flags[socket_domain, int8] 26 idiag_src_len int8 27 idiag_dst_len int8 28 idiag_ext int8 29 id inet_diag_sockid 30 idiag_states int32 31 idiag_dbs int32 32 } 33 34 inet_diag_sockid { 35 idiag_sport sock_port 36 idiag_dport sock_port 37 # TODO: this may be ipv4/ipv6 addr 38 idiag_src array[int32, 4] 39 idiag_dst array[int32, 4] 40 idiag_if ifindex[opt] 41 idiag_cookie array[int32, 2] 42 } 43 44 tcpdiag_policy [ 45 INET_DIAG_REQ_BYTECODE nlattr[INET_DIAG_REQ_BYTECODE, array[int8]] 46 ] [varlen]