mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-23 11:29:46 +00:00
2f68adff0b
Some sounds ioctls are now explicitly doubled for 32/64 bits. Support that. Fix mips SOL_SOCKET issues by rearranging includes. Improve few other fields.
71 lines
2.3 KiB
Plaintext
71 lines
2.3 KiB
Plaintext
# 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_UNIX support.
|
|
|
|
include <linux/net.h>
|
|
include <linux/socket.h>
|
|
include <uapi/linux/un.h>
|
|
include <uapi/asm-generic/socket.h>
|
|
|
|
resource sock_unix[sock]
|
|
|
|
socket$unix(domain const[AF_UNIX], type flags[unix_socket_type], proto const[0]) sock_unix
|
|
socketpair$unix(domain const[AF_UNIX], type flags[unix_socket_type], proto const[0], fds ptr[out, unix_pair])
|
|
bind$unix(fd sock_unix, addr ptr[in, sockaddr_un], addrlen len[addr])
|
|
connect$unix(fd sock_unix, addr ptr[in, sockaddr_un], addrlen len[addr])
|
|
accept$unix(fd sock_unix, peer ptr[out, sockaddr_un, opt], peerlen ptr[inout, len[peer, int32]]) sock_unix
|
|
accept4$unix(fd sock_unix, peer ptr[out, sockaddr_un, opt], peerlen ptr[inout, len[peer, int32]], flags flags[accept_flags]) sock_unix
|
|
|
|
sendto$unix(fd sock_unix, buf buffer[in], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_un, opt], addrlen len[addr])
|
|
sendmsg$unix(fd sock_unix, msg ptr[in, msghdr_un], f flags[send_flags])
|
|
sendmmsg$unix(fd sock_unix, mmsg ptr[in, array[msghdr_un]], vlen len[mmsg], f flags[send_flags])
|
|
recvfrom$unix(fd sock_unix, buf buffer[out], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_un, opt], addrlen len[addr])
|
|
getsockname$unix(fd sock_unix, addr ptr[out, sockaddr_un], addrlen ptr[inout, len[addr, int32]])
|
|
getpeername$unix(fd sock_unix, peer ptr[out, sockaddr_un], peerlen ptr[inout, len[peer, int32]])
|
|
|
|
unix_socket_type = SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET
|
|
unix_socket_family = AF_UNIX, AF_UNSPEC
|
|
|
|
unix_pair {
|
|
fd0 sock_unix
|
|
fd1 sock_unix
|
|
}
|
|
|
|
sockaddr_un [
|
|
file sockaddr_un_file
|
|
abs sockaddr_un_abstract
|
|
]
|
|
|
|
sockaddr_un_file {
|
|
family flags[unix_socket_family, int16]
|
|
path string[filename, UNIX_PATH_MAX]
|
|
}
|
|
|
|
sockaddr_un_abstract {
|
|
family flags[unix_socket_family, int16]
|
|
ind const[0, int8]
|
|
id int32[20000:20004]
|
|
}
|
|
|
|
msghdr_un {
|
|
addr ptr[in, sockaddr_un]
|
|
addrlen len[addr, int32]
|
|
vec ptr[in, array[iovec_in]]
|
|
vlen len[vec, intptr]
|
|
ctrl ptr[in, array[cmsghdr_un], opt]
|
|
ctrllen bytesize[ctrl, intptr]
|
|
f flags[send_flags, int32]
|
|
}
|
|
|
|
cmsghdr_un [
|
|
rights cmsghdr_t[SOL_SOCKET, SCM_RIGHTS, array[fd]]
|
|
cred cmsghdr_t[SOL_SOCKET, SCM_CREDENTIALS, cmsg_un_cred]
|
|
] [varlen]
|
|
|
|
cmsg_un_cred {
|
|
pid pid
|
|
uid uid
|
|
gid gid
|
|
}
|