sys/linux/socket_qipcrtr: enhance desc for qipcrtr

Utilization of special values for port and node ids.
Added desc for sendmsg and recvmsg.
This commit is contained in:
Necip Fazil Yildiran 2020-06-23 08:53:22 +03:00 committed by Dmitry Vyukov
parent 0c8fbbfce1
commit 39240c9e93
7 changed files with 56 additions and 4 deletions

View File

@ -3,17 +3,23 @@
include <linux/socket.h>
include <linux/net.h>
include <asm/ioctls.h>
include <linux/termios.h>
include <linux/qrtr.h>
# QIPCRTR sockets
resource sock_qrtr[sock]
# 1 stands for qrtr_local_nid, -1 stands for QRTR_EP_NID_AUTO
qrtr_nodes = QRTR_NODE_BCAST, -1, 0, 1, 2, 3, 4
# 0x4000 and 0x7fff stands for QRTR_MIN_EPH_SOCKET and QRTR_MAX_EPH_SOCKET, respectively
qrtr_ports = QRTR_PORT_CTRL, 0x3fff, 0x4000, 0x4001, 0x7ffe, 0x7fff, 0x8000, 0, 1, 2
sockaddr_qrtr {
sq_family const[AF_QIPCRTR, int16]
sq_node int32
sq_port int32
sq_node flags[qrtr_nodes, int32]
sq_port flags[qrtr_ports, int32]
}
socket$qrtr(domain const[AF_QIPCRTR], type const[SOCK_DGRAM], proto const[0]) sock_qrtr
@ -29,4 +35,26 @@ ioctl$sock_qrtr_TIOCOUTQ(fd sock_qrtr, cmd const[TIOCOUTQ], arg ptr[out, int64])
ioctl$sock_qrtr_TIOCINQ(fd sock_qrtr, cmd const[TIOCINQ], arg ptr[out, int64])
ioctl$sock_qrtr_SIOCGIFADDR(fd sock_qrtr, cmd const[SIOCGIFADDR], arg ptr[inout, ifreq_t[sockaddr_qrtr]])
# TODO: sendmsg$qrtr, recvmsg$qrtr, msghdr_qrtr
# sendmsg, recvmsg, [send|recv]_msghdr
sendmsg$qrtr(fd sock_qrtr, msg ptr[in, send_msghdr_qrtr], msglen len[msg])
recvmsg$qrtr(fd sock_qrtr, msg ptr[inout, recv_msghdr_qrtr], msglen len[msg], f flags[recv_flags])
send_msghdr_qrtr {
addr ptr[in, sockaddr_qrtr, opt]
addrlen len[addr, int32]
vec ptr[in, array[iovec_in]]
vlen len[vec, intptr]
ctrl ptr[in, array[cmsghdr], opt]
ctrllen bytesize[ctrl, intptr]
f flags[send_flags, int32]
}
recv_msghdr_qrtr {
addr ptr[out, sockaddr_qrtr, opt]
addrlen len[addr, int32]
vec ptr[in, array[iovec_out]]
vlen len[vec, intptr]
ctrl ptr[out, array[cmsghdr], opt]
ctrllen bytesize[ctrl, intptr]
f flags[recv_flags, int32]
}

View File

@ -1,5 +1,7 @@
# AUTOGENERATED FILE
AF_QIPCRTR = 42
QRTR_NODE_BCAST = 4294967295
QRTR_PORT_CTRL = 4294967294
SIOCGIFADDR = 35093
SOCK_DGRAM = 2
TIOCINQ = 21531
@ -9,4 +11,6 @@ __NR_connect = 362
__NR_getpeername = 368
__NR_getsockname = 367
__NR_ioctl = 54
__NR_recvmsg = 372
__NR_sendmsg = 370
__NR_socket = 359

View File

@ -1,5 +1,7 @@
# AUTOGENERATED FILE
AF_QIPCRTR = 42
QRTR_NODE_BCAST = 4294967295
QRTR_PORT_CTRL = 4294967294
SIOCGIFADDR = 35093
SOCK_DGRAM = 2
TIOCINQ = 21531
@ -9,4 +11,6 @@ __NR_connect = 42
__NR_getpeername = 52
__NR_getsockname = 51
__NR_ioctl = 16
__NR_recvmsg = 47
__NR_sendmsg = 46
__NR_socket = 41

View File

@ -1,5 +1,7 @@
# AUTOGENERATED FILE
AF_QIPCRTR = 42
QRTR_NODE_BCAST = 4294967295
QRTR_PORT_CTRL = 4294967294
SIOCGIFADDR = 35093
SOCK_DGRAM = 2
TIOCINQ = 21531
@ -9,4 +11,6 @@ __NR_connect = 283
__NR_getpeername = 287
__NR_getsockname = 286
__NR_ioctl = 54
__NR_recvmsg = 297
__NR_sendmsg = 296
__NR_socket = 281

View File

@ -1,5 +1,7 @@
# AUTOGENERATED FILE
AF_QIPCRTR = 42
QRTR_NODE_BCAST = 4294967295
QRTR_PORT_CTRL = 4294967294
SIOCGIFADDR = 35093
SOCK_DGRAM = 2
TIOCINQ = 21531
@ -9,4 +11,6 @@ __NR_connect = 203
__NR_getpeername = 205
__NR_getsockname = 204
__NR_ioctl = 29
__NR_recvmsg = 212
__NR_sendmsg = 211
__NR_socket = 198

View File

@ -1,5 +1,7 @@
# AUTOGENERATED FILE
AF_QIPCRTR = 42
QRTR_NODE_BCAST = 4294967295
QRTR_PORT_CTRL = 4294967294
SIOCGIFADDR = 35093
SOCK_DGRAM = 1
TIOCINQ = 18047
@ -9,4 +11,6 @@ __NR_connect = 5041
__NR_getpeername = 5051
__NR_getsockname = 5050
__NR_ioctl = 5015
__NR_recvmsg = 5046
__NR_sendmsg = 5045
__NR_socket = 5040

View File

@ -1,5 +1,7 @@
# AUTOGENERATED FILE
AF_QIPCRTR = 42
QRTR_NODE_BCAST = 4294967295
QRTR_PORT_CTRL = 4294967294
SIOCGIFADDR = 35093
SOCK_DGRAM = 2
TIOCINQ = 1074030207
@ -9,4 +11,6 @@ __NR_connect = 328
__NR_getpeername = 332
__NR_getsockname = 331
__NR_ioctl = 54
__NR_recvmsg = 342
__NR_sendmsg = 341
__NR_socket = 326