mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-23 19:39:40 +00:00
sys: add sctp support
This commit is contained in:
parent
9c148d824a
commit
28b3d1e1ab
2
Makefile
2
Makefile
@ -36,7 +36,7 @@ upgrade:
|
||||
|
||||
generate:
|
||||
go run sysgen/*.go -linux=$(LINUX) sys/sys.txt sys/socket.txt sys/tty.txt sys/perf.txt \
|
||||
sys/key.txt sys/bpf.txt sys/fuse.txt sys/dri.txt sys/kdbus.txt
|
||||
sys/key.txt sys/bpf.txt sys/fuse.txt sys/dri.txt sys/kdbus.txt sys/sctp.txt
|
||||
|
||||
format:
|
||||
go fmt ./...
|
||||
|
@ -346,6 +346,8 @@ call_t syscalls[] = {
|
||||
{"getpeername", 52},
|
||||
{"getsockopt", 55},
|
||||
{"setsockopt", 54},
|
||||
{"ioctl$SIOCOUTQ", 16},
|
||||
{"ioctl$SIOCINQ", 16},
|
||||
{"setsockopt$sock_void", 54},
|
||||
{"getsockopt$sock_int", 55},
|
||||
{"setsockopt$sock_int", 54},
|
||||
@ -399,14 +401,10 @@ call_t syscalls[] = {
|
||||
{"connect$unix", 42},
|
||||
{"accept$unix", 43},
|
||||
{"accept4$unix", 288},
|
||||
{"ioctl$SIOCOUTQ", 16},
|
||||
{"ioctl$SIOCINQ", 16},
|
||||
{"sendto$unix", 44},
|
||||
{"sendmsg$unix", 46},
|
||||
{"sendmmsg$unix", 307},
|
||||
{"recvfrom$unix", 45},
|
||||
{"recvmsg$unix", 47},
|
||||
{"recvmmsg$unix", 299},
|
||||
{"getsockname$unix", 51},
|
||||
{"getpeername$unix", 52},
|
||||
{"socket$alg", 41},
|
||||
@ -416,8 +414,6 @@ call_t syscalls[] = {
|
||||
{"accept$alg", 43},
|
||||
{"sendmsg$alg", 46},
|
||||
{"sendmmsg$alg", 307},
|
||||
{"recvmsg$alg", 47},
|
||||
{"recvmmsg$alg", 299},
|
||||
{"socket$nfc_llcp", 41},
|
||||
{"bind$nfc_llcp", 49},
|
||||
{"connect$nfc_llcp", 42},
|
||||
@ -671,6 +667,52 @@ call_t syscalls[] = {
|
||||
{"ioctl$kdbus_list", 16},
|
||||
{"ioctl$kdbus_match_add", 16},
|
||||
{"ioctl$kdbus_match_remove", 16},
|
||||
{"socket$sctp", 41},
|
||||
{"socket$sctp6", 41},
|
||||
{"socketpair$sctp", 53},
|
||||
{"bind$sctp", 49},
|
||||
{"connect$sctp", 42},
|
||||
{"accept$sctp", 43},
|
||||
{"accept4$sctp", 288},
|
||||
{"sendto$sctp", 44},
|
||||
{"sendmsg$sctp", 46},
|
||||
{"sendmmsg$sctp", 307},
|
||||
{"recvfrom$sctp", 45},
|
||||
{"getsockname$sctp", 51},
|
||||
{"getpeername$sctp", 52},
|
||||
{"setsockopt$SCTP_SOCKOPT_BINDX_ADD", 54},
|
||||
{"setsockopt$SCTP_SOCKOPT_BINDX_REM", 54},
|
||||
{"setsockopt$SCTP_SOCKOPT_CONNECTX_OLD", 54},
|
||||
{"setsockopt$SCTP_SOCKOPT_CONNECTX", 54},
|
||||
{"setsockopt$SCTP_DISABLE_FRAGMENTS", 54},
|
||||
{"setsockopt$SCTP_EVENTS", 54},
|
||||
{"setsockopt$SCTP_AUTOCLOSE", 54},
|
||||
{"setsockopt$SCTP_PEER_ADDR_PARAMS", 54},
|
||||
{"setsockopt$SCTP_DELAYED_SACK", 54},
|
||||
{"setsockopt$SCTP_PARTIAL_DELIVERY_POINT", 54},
|
||||
{"setsockopt$SCTP_INITMSG", 54},
|
||||
{"setsockopt$SCTP_DEFAULT_SEND_PARAM", 54},
|
||||
{"setsockopt$SCTP_DEFAULT_SNDINFO", 54},
|
||||
{"setsockopt$SCTP_PRIMARY_ADDR", 54},
|
||||
{"setsockopt$SCTP_SET_PEER_PRIMARY_ADDR", 54},
|
||||
{"setsockopt$SCTP_NODELAY", 54},
|
||||
{"setsockopt$SCTP_RTOINFO", 54},
|
||||
{"setsockopt$SCTP_ASSOCINFO", 54},
|
||||
{"setsockopt$SCTP_I_WANT_MAPPED_V4_ADDR", 54},
|
||||
{"setsockopt$SCTP_MAXSEG", 54},
|
||||
{"setsockopt$SCTP_ADAPTATION_LAYER", 54},
|
||||
{"setsockopt$SCTP_CONTEXT", 54},
|
||||
{"setsockopt$SCTP_FRAGMENT_INTERLEAVE", 54},
|
||||
{"setsockopt$SCTP_MAX_BURST", 54},
|
||||
{"setsockopt$SCTP_AUTH_CHUNK", 54},
|
||||
{"setsockopt$SCTP_HMAC_IDENT", 54},
|
||||
{"setsockopt$SCTP_AUTH_KEY", 54},
|
||||
{"setsockopt$SCTP_AUTH_ACTIVE_KEY", 54},
|
||||
{"setsockopt$SCTP_AUTH_DELETE_KEY", 54},
|
||||
{"setsockopt$SCTP_AUTO_ASCONF", 54},
|
||||
{"setsockopt$SCTP_PEER_ADDR_THLDS", 54},
|
||||
{"setsockopt$SCTP_RECVRCVINFO", 54},
|
||||
{"setsockopt$SCTP_RECVNXTINFO", 54},
|
||||
|
||||
};
|
||||
#endif
|
||||
@ -1009,6 +1051,8 @@ call_t syscalls[] = {
|
||||
{"getpeername", 205},
|
||||
{"getsockopt", 209},
|
||||
{"setsockopt", 208},
|
||||
{"ioctl$SIOCOUTQ", 29},
|
||||
{"ioctl$SIOCINQ", 29},
|
||||
{"setsockopt$sock_void", 208},
|
||||
{"getsockopt$sock_int", 209},
|
||||
{"setsockopt$sock_int", 208},
|
||||
@ -1062,14 +1106,10 @@ call_t syscalls[] = {
|
||||
{"connect$unix", 203},
|
||||
{"accept$unix", 202},
|
||||
{"accept4$unix", 242},
|
||||
{"ioctl$SIOCOUTQ", 29},
|
||||
{"ioctl$SIOCINQ", 29},
|
||||
{"sendto$unix", 206},
|
||||
{"sendmsg$unix", 211},
|
||||
{"sendmmsg$unix", 269},
|
||||
{"recvfrom$unix", 207},
|
||||
{"recvmsg$unix", 212},
|
||||
{"recvmmsg$unix", 243},
|
||||
{"getsockname$unix", 204},
|
||||
{"getpeername$unix", 205},
|
||||
{"socket$alg", 198},
|
||||
@ -1079,8 +1119,6 @@ call_t syscalls[] = {
|
||||
{"accept$alg", 202},
|
||||
{"sendmsg$alg", 211},
|
||||
{"sendmmsg$alg", 269},
|
||||
{"recvmsg$alg", 212},
|
||||
{"recvmmsg$alg", 243},
|
||||
{"socket$nfc_llcp", 198},
|
||||
{"bind$nfc_llcp", 200},
|
||||
{"connect$nfc_llcp", 203},
|
||||
@ -1334,6 +1372,52 @@ call_t syscalls[] = {
|
||||
{"ioctl$kdbus_list", 29},
|
||||
{"ioctl$kdbus_match_add", 29},
|
||||
{"ioctl$kdbus_match_remove", 29},
|
||||
{"socket$sctp", 198},
|
||||
{"socket$sctp6", 198},
|
||||
{"socketpair$sctp", 199},
|
||||
{"bind$sctp", 200},
|
||||
{"connect$sctp", 203},
|
||||
{"accept$sctp", 202},
|
||||
{"accept4$sctp", 242},
|
||||
{"sendto$sctp", 206},
|
||||
{"sendmsg$sctp", 211},
|
||||
{"sendmmsg$sctp", 269},
|
||||
{"recvfrom$sctp", 207},
|
||||
{"getsockname$sctp", 204},
|
||||
{"getpeername$sctp", 205},
|
||||
{"setsockopt$SCTP_SOCKOPT_BINDX_ADD", 208},
|
||||
{"setsockopt$SCTP_SOCKOPT_BINDX_REM", 208},
|
||||
{"setsockopt$SCTP_SOCKOPT_CONNECTX_OLD", 208},
|
||||
{"setsockopt$SCTP_SOCKOPT_CONNECTX", 208},
|
||||
{"setsockopt$SCTP_DISABLE_FRAGMENTS", 208},
|
||||
{"setsockopt$SCTP_EVENTS", 208},
|
||||
{"setsockopt$SCTP_AUTOCLOSE", 208},
|
||||
{"setsockopt$SCTP_PEER_ADDR_PARAMS", 208},
|
||||
{"setsockopt$SCTP_DELAYED_SACK", 208},
|
||||
{"setsockopt$SCTP_PARTIAL_DELIVERY_POINT", 208},
|
||||
{"setsockopt$SCTP_INITMSG", 208},
|
||||
{"setsockopt$SCTP_DEFAULT_SEND_PARAM", 208},
|
||||
{"setsockopt$SCTP_DEFAULT_SNDINFO", 208},
|
||||
{"setsockopt$SCTP_PRIMARY_ADDR", 208},
|
||||
{"setsockopt$SCTP_SET_PEER_PRIMARY_ADDR", 208},
|
||||
{"setsockopt$SCTP_NODELAY", 208},
|
||||
{"setsockopt$SCTP_RTOINFO", 208},
|
||||
{"setsockopt$SCTP_ASSOCINFO", 208},
|
||||
{"setsockopt$SCTP_I_WANT_MAPPED_V4_ADDR", 208},
|
||||
{"setsockopt$SCTP_MAXSEG", 208},
|
||||
{"setsockopt$SCTP_ADAPTATION_LAYER", 208},
|
||||
{"setsockopt$SCTP_CONTEXT", 208},
|
||||
{"setsockopt$SCTP_FRAGMENT_INTERLEAVE", 208},
|
||||
{"setsockopt$SCTP_MAX_BURST", 208},
|
||||
{"setsockopt$SCTP_AUTH_CHUNK", 208},
|
||||
{"setsockopt$SCTP_HMAC_IDENT", 208},
|
||||
{"setsockopt$SCTP_AUTH_KEY", 208},
|
||||
{"setsockopt$SCTP_AUTH_ACTIVE_KEY", 208},
|
||||
{"setsockopt$SCTP_AUTH_DELETE_KEY", 208},
|
||||
{"setsockopt$SCTP_AUTO_ASCONF", 208},
|
||||
{"setsockopt$SCTP_PEER_ADDR_THLDS", 208},
|
||||
{"setsockopt$SCTP_RECVRCVINFO", 208},
|
||||
{"setsockopt$SCTP_RECVNXTINFO", 208},
|
||||
|
||||
};
|
||||
#endif
|
||||
|
@ -340,6 +340,7 @@ const (
|
||||
IPC_STAT = 2
|
||||
IPPROTO_IP = 0
|
||||
IPPROTO_IPV6 = 41
|
||||
IPPROTO_SCTP = 132
|
||||
IPPROTO_TCP = 6
|
||||
IPPROTO_UDP = 17
|
||||
IPV6_2292DSTOPTS = 4
|
||||
@ -920,8 +921,52 @@ const (
|
||||
SCHED_IDLE = 5
|
||||
SCHED_OTHER = 0
|
||||
SCHED_RR = 2
|
||||
SCM_CREDENTIALS = 2
|
||||
SCM_RIGHTS = 1
|
||||
SCO_CONNINFO = 2
|
||||
SCO_OPTIONS = 1
|
||||
SCTP_ABORT = 4
|
||||
SCTP_ADAPTATION_LAYER = 7
|
||||
SCTP_ADDR_OVER = 2
|
||||
SCTP_ASSOCINFO = 1
|
||||
SCTP_AUTH_ACTIVE_KEY = 24
|
||||
SCTP_AUTH_CHUNK = 21
|
||||
SCTP_AUTH_DELETE_KEY = 25
|
||||
SCTP_AUTH_KEY = 23
|
||||
SCTP_AUTOCLOSE = 4
|
||||
SCTP_AUTO_ASCONF = 30
|
||||
SCTP_CONTEXT = 17
|
||||
SCTP_DEFAULT_SEND_PARAM = 10
|
||||
SCTP_DEFAULT_SNDINFO = 34
|
||||
SCTP_DELAYED_SACK = 16
|
||||
SCTP_DISABLE_FRAGMENTS = 8
|
||||
SCTP_EOF = 512
|
||||
SCTP_EVENTS = 11
|
||||
SCTP_FRAGMENT_INTERLEAVE = 18
|
||||
SCTP_HMAC_IDENT = 22
|
||||
SCTP_INIT = 0
|
||||
SCTP_INITMSG = 2
|
||||
SCTP_I_WANT_MAPPED_V4_ADDR = 12
|
||||
SCTP_MAXSEG = 13
|
||||
SCTP_MAX_BURST = 20
|
||||
SCTP_NODELAY = 3
|
||||
SCTP_NXTINFO = 4
|
||||
SCTP_PARTIAL_DELIVERY_POINT = 19
|
||||
SCTP_PEER_ADDR_PARAMS = 9
|
||||
SCTP_PEER_ADDR_THLDS = 31
|
||||
SCTP_PRIMARY_ADDR = 6
|
||||
SCTP_RCVINFO = 3
|
||||
SCTP_RECVNXTINFO = 33
|
||||
SCTP_RECVRCVINFO = 32
|
||||
SCTP_RTOINFO = 0
|
||||
SCTP_SET_PEER_PRIMARY_ADDR = 5
|
||||
SCTP_SNDINFO = 2
|
||||
SCTP_SNDRCV = 1
|
||||
SCTP_SOCKOPT_BINDX_ADD = 100
|
||||
SCTP_SOCKOPT_BINDX_REM = 101
|
||||
SCTP_SOCKOPT_CONNECTX = 110
|
||||
SCTP_SOCKOPT_CONNECTX_OLD = 107
|
||||
SCTP_UNORDERED = 1
|
||||
SECCOMP_FILTER_FLAG_TSYNC = 1
|
||||
SECCOMP_MODE_DISABLED = 0
|
||||
SECCOMP_MODE_FILTER = 2
|
||||
@ -989,6 +1034,7 @@ const (
|
||||
SOL_NFC = 280
|
||||
SOL_RFCOMM = 18
|
||||
SOL_SCO = 17
|
||||
SOL_SCTP = 132
|
||||
SOL_SOCKET = 1
|
||||
SO_ACCEPTCONN = 30
|
||||
SO_ATTACH_BPF = 50
|
||||
@ -1039,6 +1085,14 @@ const (
|
||||
SPLICE_F_MORE = 4
|
||||
SPLICE_F_MOVE = 1
|
||||
SPLICE_F_NONBLOCK = 2
|
||||
SPP_HB_DEMAND = 4
|
||||
SPP_HB_DISABLE = 2
|
||||
SPP_HB_ENABLE = 1
|
||||
SPP_HB_TIME_IS_ZERO = 128
|
||||
SPP_PMTUD_DISABLE = 16
|
||||
SPP_PMTUD_ENABLE = 8
|
||||
SPP_SACKDELAY_DISABLE = 64
|
||||
SPP_SACKDELAY_ENABLE = 32
|
||||
STICKY_TIMEOUTS = 67108864
|
||||
SYNC_FILE_RANGE_WAIT_AFTER = 4
|
||||
SYNC_FILE_RANGE_WAIT_BEFORE = 1
|
||||
|
@ -107,6 +107,8 @@ func calcStaticPriorities() [][]float32 {
|
||||
noteUsage(1.0, "signalno")
|
||||
case sys.IntInaddr:
|
||||
noteUsage(1.0, "inaddr")
|
||||
case sys.IntInport:
|
||||
noteUsage(1.0, "inport")
|
||||
default:
|
||||
panic("unknown int kind")
|
||||
}
|
||||
|
19
prog/rand.go
19
prog/rand.go
@ -144,8 +144,18 @@ var sockFamilies = []uint16{AF_UNIX, AF_INET, AF_INET6, AF_IPX, AF_NETLINK, AF_X
|
||||
|
||||
func (r *randGen) inaddr(s *state) uint32 {
|
||||
// TODO: extract addresses of network interfaces.
|
||||
var addr uint32
|
||||
r.choose(
|
||||
// Note: assuming little-endian host
|
||||
return uint32(127<<0 + 0<<8 + 0<<16 + 1<<24)
|
||||
5, func() { addr = 127<<0 + 0<<8 + 0<<16 + 1<<24 },
|
||||
3, func() { addr = 0 }, // INADDR_ANY
|
||||
1, func() { addr = ^uint32(0) }, // INADDR_NONE/INADDR_BROADCAST
|
||||
)
|
||||
return addr
|
||||
}
|
||||
|
||||
func (r *randGen) inport(s *state) uint16 {
|
||||
return uint16(r.Intn(20))<<8 + 0xab
|
||||
}
|
||||
|
||||
func (r *randGen) in6addr(s *state) (arg *Arg, calls []*Call) {
|
||||
@ -173,17 +183,16 @@ func (r *randGen) inaddrany(s *state) (arg *Arg, calls []*Call) {
|
||||
|
||||
func (r *randGen) sockaddr(s *state) []byte {
|
||||
fa := sockFamilies[r.Intn(len(sockFamilies))]
|
||||
port := 13269 + uint16(r.Intn(20))
|
||||
buf := new(bytes.Buffer)
|
||||
binary.Write(buf, binary.LittleEndian, fa) // this is actually host byte order
|
||||
switch fa {
|
||||
case AF_UNIX:
|
||||
buf.WriteString(r.filename(s))
|
||||
case AF_INET:
|
||||
binary.Write(buf, binary.BigEndian, port)
|
||||
binary.Write(buf, binary.LittleEndian, r.inport(s))
|
||||
binary.Write(buf, binary.LittleEndian, r.inaddr(s))
|
||||
case AF_INET6:
|
||||
binary.Write(buf, binary.BigEndian, port)
|
||||
binary.Write(buf, binary.LittleEndian, r.inport(s))
|
||||
binary.Write(buf, binary.BigEndian, uint32(r.Int63())) // flow info
|
||||
binary.Write(buf, binary.BigEndian, uint64(0)) // addr: loopback
|
||||
binary.Write(buf, binary.BigEndian, uint64(1)) // addr: loopback
|
||||
@ -710,6 +719,8 @@ func (r *randGen) generateArg(s *state, typ sys.Type, dir ArgDir, sizes map[stri
|
||||
v %= 130
|
||||
case sys.IntInaddr:
|
||||
v = uintptr(r.inaddr(s))
|
||||
case sys.IntInport:
|
||||
v = uintptr(r.inport(s))
|
||||
}
|
||||
return constArg(v), nil, nil
|
||||
case sys.FilenameType:
|
||||
|
@ -98,6 +98,7 @@ const (
|
||||
FdBtCmtp
|
||||
FdBtBnep
|
||||
FdUnix
|
||||
FdSctp
|
||||
|
||||
IPCMsq
|
||||
IPCSem
|
||||
@ -126,7 +127,7 @@ func ResourceSubkinds(kind ResourceKind) []ResourceSubkind {
|
||||
FdTimer, FdEpoll, FdDir, FdMq, FdInotify, FdFanotify, FdTty,
|
||||
FdDRI, FdFuse, FdKdbus, FdBpfMap, FdBpfProg, FdPerf, FdUserFault,
|
||||
FdAlg, FdAlgConn, FdNfcRaw, FdNfcLlcp, FdBtHci, FdBtSco, FdBtL2cap,
|
||||
FdBtRfcomm, FdBtHidp, FdBtCmtp, FdBtBnep, FdUnix}
|
||||
FdBtRfcomm, FdBtHidp, FdBtCmtp, FdBtBnep, FdUnix, FdSctp}
|
||||
case ResIPC:
|
||||
return []ResourceSubkind{IPCMsq, IPCSem, IPCShm}
|
||||
case ResIOCtx, ResKey, ResInotifyDesc, ResPid, ResUid, ResGid, ResTimerid, ResIocbPtr:
|
||||
@ -352,6 +353,7 @@ const (
|
||||
IntPlain IntKind = iota
|
||||
IntSignalno
|
||||
IntInaddr
|
||||
IntInport
|
||||
)
|
||||
|
||||
type IntType struct {
|
||||
|
252
sys/sctp.txt
Normal file
252
sys/sctp.txt
Normal file
@ -0,0 +1,252 @@
|
||||
# Copyright 2015 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.
|
||||
|
||||
include <linux/sctp.h>
|
||||
|
||||
socket$sctp(domain const[AF_INET], type flags[sctp_socket_type], proto const[IPPROTO_SCTP]) fd[sctp]
|
||||
socket$sctp6(domain const[AF_INET6], type flags[sctp_socket_type], proto const[IPPROTO_SCTP]) fd[sctp]
|
||||
socketpair$sctp(domain const[AF_INET], type flags[sctp_socket_type], proto const[IPPROTO_SCTP], fds ptr[out, sctp_pair])
|
||||
bind$sctp(fd fd[sctp], addr ptr[in, sockaddr_sctp], addrlen len[addr])
|
||||
connect$sctp(fd fd[sctp], addr ptr[in, sockaddr_sctp], addrlen len[addr])
|
||||
accept$sctp(fd fd[sctp], peer ptr[out, sockaddr_sctp, opt], peerlen ptr[inout, len[peer, int32]]) fd[sctp]
|
||||
accept4$sctp(fd fd[sctp], peer ptr[out, sockaddr_sctp, opt], peerlen ptr[inout, len[peer, int32]], flags flags[accept_flags]) fd[sctp]
|
||||
sendto$sctp(fd fd[sctp], buf buffer[in], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_sctp, opt], addrlen len[addr])
|
||||
sendmsg$sctp(fd fd[sctp], msg ptr[in, msghdr_sctp], f flags[send_flags])
|
||||
sendmmsg$sctp(fd fd[sctp], mmsg ptr[in, array[msghdr_sctp]], vlen len[mmsg], f flags[send_flags])
|
||||
recvfrom$sctp(fd fd[sctp], buf buffer[out], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_sctp, opt], addrlen len[addr])
|
||||
getsockname$sctp(fd fd[sctp], addr ptr[out, sockaddr_sctp], addrlen ptr[inout, len[addr, int32]])
|
||||
getpeername$sctp(fd fd[sctp], peer ptr[out, sockaddr_sctp], peerlen ptr[inout, len[peer, int32]])
|
||||
|
||||
# TODO: len will be length of the val array, but we need total memory size.
|
||||
setsockopt$SCTP_SOCKOPT_BINDX_ADD(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_SOCKOPT_BINDX_ADD], val ptr[in, array[sockaddr_sctp]], len len[val])
|
||||
setsockopt$SCTP_SOCKOPT_BINDX_REM(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_SOCKOPT_BINDX_REM], val ptr[in, array[sockaddr_sctp]], len len[val])
|
||||
setsockopt$SCTP_SOCKOPT_CONNECTX_OLD(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_SOCKOPT_CONNECTX_OLD], val ptr[in, sockaddr_sctp], len len[val])
|
||||
setsockopt$SCTP_SOCKOPT_CONNECTX(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_SOCKOPT_CONNECTX], val ptr[in, sockaddr_sctp], len len[val])
|
||||
setsockopt$SCTP_DISABLE_FRAGMENTS(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_DISABLE_FRAGMENTS], val ptr[in, int32], len len[val])
|
||||
setsockopt$SCTP_EVENTS(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_EVENTS], val ptr[in, sctp_event_subscribe], len len[val])
|
||||
setsockopt$SCTP_AUTOCLOSE(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_AUTOCLOSE], val ptr[in, int32], len len[val])
|
||||
setsockopt$SCTP_PEER_ADDR_PARAMS(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_PEER_ADDR_PARAMS], val ptr[in, sctp_paddrparams], len len[val])
|
||||
setsockopt$SCTP_DELAYED_SACK(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_DELAYED_SACK], val ptr[in, sctp_delayed_sack], len len[val])
|
||||
setsockopt$SCTP_PARTIAL_DELIVERY_POINT(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_PARTIAL_DELIVERY_POINT], val ptr[in, int32], len len[val])
|
||||
setsockopt$SCTP_INITMSG(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_INITMSG], val ptr[in, sctp_initmsg], len len[val])
|
||||
setsockopt$SCTP_DEFAULT_SEND_PARAM(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_DEFAULT_SEND_PARAM], val ptr[in, sctp_sndrcvinfo], len len[val])
|
||||
setsockopt$SCTP_DEFAULT_SNDINFO(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_DEFAULT_SNDINFO], val ptr[in, sctp_sndinfo], len len[val])
|
||||
setsockopt$SCTP_PRIMARY_ADDR(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_PRIMARY_ADDR], val ptr[in, sctp_prim], len len[val])
|
||||
setsockopt$SCTP_SET_PEER_PRIMARY_ADDR(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_SET_PEER_PRIMARY_ADDR], val ptr[in, sctp_prim], len len[val])
|
||||
setsockopt$SCTP_NODELAY(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_NODELAY], val ptr[in, int32], len len[val])
|
||||
setsockopt$SCTP_RTOINFO(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_RTOINFO], val ptr[in, sctp_rtoinfo], len len[val])
|
||||
setsockopt$SCTP_ASSOCINFO(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_ASSOCINFO], val ptr[in, sctp_assocparams], len len[val])
|
||||
setsockopt$SCTP_I_WANT_MAPPED_V4_ADDR(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_I_WANT_MAPPED_V4_ADDR], val ptr[in, int32], len len[val])
|
||||
setsockopt$SCTP_MAXSEG(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_MAXSEG], val ptr[in, sctp_maxseg], len len[val])
|
||||
setsockopt$SCTP_ADAPTATION_LAYER(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_ADAPTATION_LAYER], val ptr[in, int32], len len[val])
|
||||
setsockopt$SCTP_CONTEXT(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_CONTEXT], val ptr[in, sctp_assoc_value], len len[val])
|
||||
setsockopt$SCTP_FRAGMENT_INTERLEAVE(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_FRAGMENT_INTERLEAVE], val ptr[in, int32], len len[val])
|
||||
setsockopt$SCTP_MAX_BURST(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_MAX_BURST], val ptr[in, sctp_max_burst], len len[val])
|
||||
setsockopt$SCTP_AUTH_CHUNK(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_AUTH_CHUNK], val ptr[in, int8], len len[val])
|
||||
setsockopt$SCTP_HMAC_IDENT(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_HMAC_IDENT], val ptr[in, sctp_hmacalgo], len len[val])
|
||||
setsockopt$SCTP_AUTH_KEY(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_AUTH_KEY], val ptr[in, sctp_authkey], len len[val])
|
||||
setsockopt$SCTP_AUTH_ACTIVE_KEY(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_AUTH_ACTIVE_KEY], val ptr[in, sctp_authkeyid], len len[val])
|
||||
setsockopt$SCTP_AUTH_DELETE_KEY(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_AUTH_DELETE_KEY], val ptr[in, sctp_authkeyid], len len[val])
|
||||
setsockopt$SCTP_AUTO_ASCONF(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_AUTO_ASCONF], val ptr[in, int32], len len[val])
|
||||
setsockopt$SCTP_PEER_ADDR_THLDS(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_PEER_ADDR_THLDS], val ptr[in, sctp_paddrthlds], len len[val])
|
||||
setsockopt$SCTP_RECVRCVINFO(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_RECVRCVINFO], val ptr[in, int32], len len[val])
|
||||
setsockopt$SCTP_RECVNXTINFO(fd fd[sctp], level const[SOL_SCTP], opt const[SCTP_RECVNXTINFO], val ptr[in, int32], len len[val])
|
||||
|
||||
sctp_socket_type = SOCK_STREAM, SOCK_SEQPACKET
|
||||
sctp_sndrcv_flags = SCTP_UNORDERED, SCTP_ADDR_OVER, SCTP_ABORT, SCTP_EOF
|
||||
sctp_spp_flags = SPP_HB_ENABLE, SPP_HB_DISABLE, SPP_HB_DEMAND, SPP_HB_TIME_IS_ZERO, SPP_PMTUD_ENABLE, SPP_PMTUD_DISABLE, SPP_SACKDELAY_ENABLE, SPP_SACKDELAY_DISABLE
|
||||
|
||||
sctp_pair {
|
||||
fd0 fd[sctp]
|
||||
fd1 fd[sctp]
|
||||
}
|
||||
|
||||
sockaddr_sctp [
|
||||
in sockaddr_in
|
||||
in6 sockaddr_in6
|
||||
]
|
||||
|
||||
# TODO: this is sockaddr_sctp in sockaddr_storage
|
||||
sockaddr_sctp_padded {
|
||||
addr0 int64
|
||||
addr1 int64
|
||||
addr2 int64
|
||||
addr3 int64
|
||||
addr4 int64
|
||||
addr5 int64
|
||||
addr6 int64
|
||||
addr7 int64
|
||||
}
|
||||
|
||||
msghdr_sctp {
|
||||
addr ptr[in, sockaddr_sctp]
|
||||
addrlen len[addr, int32]
|
||||
vec ptr[in, array[iovec_in]]
|
||||
vlen len[vec, intptr]
|
||||
ctrl ptr[in, array[cmsghdr_sctp], opt]
|
||||
ctrllen len[ctrl, intptr]
|
||||
f flags[send_flags, int32]
|
||||
}
|
||||
|
||||
cmsghdr_sctp [
|
||||
init cmsghdr_sctp_init
|
||||
sndrcv cmsghdr_sctp_sndrcv
|
||||
sndinfo cmsghdr_sctp_sndinfo
|
||||
]
|
||||
|
||||
cmsghdr_sctp_init {
|
||||
len len[parent, intptr]
|
||||
level const[IPPROTO_SCTP, int32]
|
||||
type const[SCTP_INIT, int32]
|
||||
msg sctp_initmsg
|
||||
}
|
||||
|
||||
sctp_initmsg {
|
||||
nostr int16
|
||||
minstr int16
|
||||
maxatt int16
|
||||
maxinit int16
|
||||
}
|
||||
|
||||
cmsghdr_sctp_sndrcv {
|
||||
len len[parent, intptr]
|
||||
level const[IPPROTO_SCTP, int32]
|
||||
type const[SCTP_SNDRCV, int32]
|
||||
msg sctp_sndrcvinfo
|
||||
}
|
||||
|
||||
sctp_sndrcvinfo {
|
||||
stream int16
|
||||
ssn int16
|
||||
flags flags[sctp_sndrcv_flags, int16]
|
||||
ppid int32
|
||||
context int32
|
||||
ttl int32
|
||||
tsn int32
|
||||
cumtsn int32
|
||||
assoc int32
|
||||
}
|
||||
|
||||
cmsghdr_sctp_sndinfo {
|
||||
len len[parent, intptr]
|
||||
level const[IPPROTO_SCTP, int32]
|
||||
type const[SCTP_SNDINFO, int32]
|
||||
msg sctp_sndinfo
|
||||
}
|
||||
|
||||
sctp_sndinfo {
|
||||
sid int16
|
||||
flags flags[sctp_sndrcv_flags, int16]
|
||||
ppid int32
|
||||
context int32
|
||||
assoc int32
|
||||
}
|
||||
|
||||
sctp_delayed_sack [
|
||||
sack sctp_sack_info
|
||||
assoc sctp_assoc_value
|
||||
]
|
||||
|
||||
sctp_sack_info {
|
||||
assoc int32
|
||||
delay int32
|
||||
freq int32
|
||||
}
|
||||
|
||||
sctp_maxseg [
|
||||
assoc sctp_assoc_value
|
||||
int int32
|
||||
]
|
||||
|
||||
sctp_max_burst [
|
||||
assoc sctp_assoc_value
|
||||
int int32
|
||||
]
|
||||
|
||||
sctp_assoc_value {
|
||||
assoc int32
|
||||
value int32
|
||||
}
|
||||
|
||||
|
||||
sctp_event_subscribe {
|
||||
ev0 int8
|
||||
ev1 int8
|
||||
ev2 int8
|
||||
ev3 int8
|
||||
ev4 int8
|
||||
ev5 int8
|
||||
ev6 int8
|
||||
ev7 int8
|
||||
ev8 int8
|
||||
ev9 int8
|
||||
}
|
||||
|
||||
# TODO: this struct is __attribute__((packed, aligned(4)))
|
||||
sctp_paddrparams {
|
||||
assoc int32
|
||||
addr sockaddr_sctp_padded
|
||||
interv int32
|
||||
maxrxt int16
|
||||
pathmtu int32
|
||||
sackdel int32
|
||||
spp int32
|
||||
flags flags[sctp_spp_flags, int32]
|
||||
}
|
||||
|
||||
sctp_authkey {
|
||||
assoc int32
|
||||
keynum int16
|
||||
keylen len[key, int16]
|
||||
key array[int8]
|
||||
}
|
||||
|
||||
# TODO: __attribute__((packed, aligned(4)))
|
||||
sctp_prim {
|
||||
assoc int32
|
||||
addr sockaddr_sctp_padded
|
||||
}
|
||||
|
||||
sctp_rtoinfo {
|
||||
assoc int32
|
||||
init int32
|
||||
max int32
|
||||
min int32
|
||||
}
|
||||
|
||||
sctp_assocparams {
|
||||
assoc int32
|
||||
maxrxt int16
|
||||
ndest int16
|
||||
prwnd int32
|
||||
lrwnd int32
|
||||
life int32
|
||||
}
|
||||
|
||||
sctp_hmacalgo {
|
||||
nident len[ident, int32]
|
||||
ident array[int16]
|
||||
}
|
||||
|
||||
sctp_authkeyid {
|
||||
assoc int32
|
||||
keyn int16
|
||||
}
|
||||
|
||||
sctp_paddrthlds {
|
||||
assoc int32
|
||||
addr sockaddr_sctp_padded
|
||||
maxrxt int16
|
||||
pfthld int16
|
||||
}
|
||||
|
||||
define SCTP_RECVRCVINFO 32
|
||||
define SCTP_RECVNXTINFO 33
|
||||
define SCTP_DEFAULT_SNDINFO 34
|
||||
define SOL_SCTP 132
|
||||
define SCTP_INIT 0
|
||||
define SCTP_SNDRCV 1
|
||||
define SCTP_SNDINFO 2
|
||||
define SCTP_RCVINFO 3
|
||||
define SCTP_NXTINFO 4
|
||||
|
@ -20,6 +20,8 @@ getsockname(fd fd[sock], addr ptr[out, sockaddr], addrlen ptr[inout, len[addr, i
|
||||
getpeername(fd fd[sock], peer ptr[out, sockaddr], peerlen ptr[inout, len[peer, int32]])
|
||||
getsockopt(fd fd[sock], level int32, optname int32, optval ptr[out, ioctl_arg], optlen ptr[inout, len[optval, int32]])
|
||||
setsockopt(fd fd[sock], level int32, optname int32, optval ptr[in, ioctl_arg], optlen len[optval])
|
||||
ioctl$SIOCOUTQ(fd fd[sock], cmd const[SIOCOUTQ], arg ptr[out, int32])
|
||||
ioctl$SIOCINQ(fd fd[sock], cmd const[SIOCINQ], arg ptr[out, int32])
|
||||
|
||||
# SOL_SOCKET
|
||||
setsockopt$sock_void(fd fd[sock], level const[SOL_SOCKET], optname flags[sockopt_opt_sock_void], optval const[0], optlen const[0])
|
||||
@ -96,16 +98,28 @@ ip_mtu_discover = IP_PMTUDISC_DONT, IP_PMTUDISC_WANT, IP_PMTUDISC_DO, IP_PMTUDIS
|
||||
sockopt_opt_ipv6_int = IPV6_ADDRFORM, IPV6_MTU, IPV6_MULTICAST_HOPS, IPV6_MULTICAST_IF, IPV6_MULTICAST_LOOP, IPV6_RECVPKTINFO, IPV6_RECVERR, IPV6_ROUTER_ALERT, IPV6_UNICAST_HOPS, IPV6_V6ONLY, IPV6_RTHDR, IPV6_AUTHHDR, IPV6_DSTOPTS, IPV6_HOPOPTS, IPV6_FLOWINFO, IPV6_HOPLIMIT, IPV6_CHECKSUM, IPV6_2292PKTINFO, IPV6_2292HOPOPTS, IPV6_2292DSTOPTS, IPV6_2292RTHDR, IPV6_2292HOPLIMIT
|
||||
sockopt_opt_ipv6_mreq = IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP, IPV6_JOIN_ANYCAST, IPV6_LEAVE_ANYCAST
|
||||
|
||||
sockaddr_in {
|
||||
family const[AF_INET, int16]
|
||||
port in_port
|
||||
addr in_addr
|
||||
}
|
||||
|
||||
sockaddr_in6 {
|
||||
family const[AF_INET6, int16]
|
||||
port in_port
|
||||
flow int32
|
||||
addr in6_addr
|
||||
scope int32
|
||||
}
|
||||
|
||||
send_msghdr {
|
||||
addr ptr[in, sockaddr]
|
||||
addrlen len[addr, int32]
|
||||
vec ptr[in, array[iovec_in]]
|
||||
vlen len[vec, intptr]
|
||||
ctrl ptr[in, cmsghdr]
|
||||
ctrl ptr[in, array[cmsghdr]]
|
||||
ctrllen len[ctrl, intptr]
|
||||
f flags[send_flags, int32]
|
||||
# TODO: this field should be deleted
|
||||
len int32
|
||||
}
|
||||
|
||||
recv_msghdr {
|
||||
@ -116,15 +130,13 @@ recv_msghdr {
|
||||
ctrl buffer[out]
|
||||
ctrllen len[ctrl, intptr]
|
||||
f int32
|
||||
# TODO: this field should be deleted
|
||||
len int32
|
||||
}
|
||||
|
||||
cmsghdr {
|
||||
len intptr
|
||||
len len[parent, intptr]
|
||||
level int32
|
||||
type int32
|
||||
# TODO: this is followed by an embed array of aux data, and len is length of the whole message
|
||||
data array[int8]
|
||||
}
|
||||
|
||||
define SOF_TIMESTAMPING_OPT_ID (1<<7)
|
||||
@ -144,15 +156,11 @@ bind$unix(fd fd[unix], addr ptr[in, sockaddr_un], addrlen len[addr])
|
||||
connect$unix(fd fd[unix], addr ptr[in, sockaddr_un], addrlen len[addr])
|
||||
accept$unix(fd fd[unix], peer ptr[out, sockaddr_un, opt], peerlen ptr[inout, len[peer, int32]]) fd[unix]
|
||||
accept4$unix(fd fd[unix], peer ptr[out, sockaddr_un, opt], peerlen ptr[inout, len[peer, int32]], flags flags[accept_flags]) fd[unix]
|
||||
ioctl$SIOCOUTQ(fd fd[unix], cmd const[SIOCOUTQ], arg ptr[out, int32])
|
||||
ioctl$SIOCINQ(fd fd[unix], cmd const[SIOCINQ], arg ptr[out, int32])
|
||||
|
||||
sendto$unix(fd fd[unix], buf buffer[in], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_un, opt], addrlen len[addr])
|
||||
sendmsg$unix(fd fd[unix], msg ptr[in, send_msghdr], f flags[send_flags])
|
||||
sendmmsg$unix(fd fd[unix], mmsg ptr[in, array[send_msghdr]], vlen len[mmsg], f flags[send_flags])
|
||||
sendmsg$unix(fd fd[unix], msg ptr[in, msghdr_un], f flags[send_flags])
|
||||
sendmmsg$unix(fd fd[unix], mmsg ptr[in, array[msghdr_un]], vlen len[mmsg], f flags[send_flags])
|
||||
recvfrom$unix(fd fd[unix], buf buffer[out], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_un, opt], addrlen len[addr])
|
||||
recvmsg$unix(fd fd[unix], msg ptr[in, recv_msghdr], f flags[recv_flags])
|
||||
recvmmsg$unix(fd fd[unix], mmsg ptr[in, array[recv_msghdr]], vlen len[mmsg], f flags[recv_flags])
|
||||
getsockname$unix(fd fd[unix], addr ptr[out, sockaddr_un], addrlen ptr[inout, len[addr, int32]])
|
||||
getpeername$unix(fd fd[unix], peer ptr[out, sockaddr_un], peerlen ptr[inout, len[peer, int32]])
|
||||
|
||||
@ -185,7 +193,7 @@ sockaddr_un_abstract {
|
||||
id int32
|
||||
}
|
||||
|
||||
send_msghdr_un {
|
||||
msghdr_un {
|
||||
addr ptr[in, sockaddr_un]
|
||||
addrlen len[addr, int32]
|
||||
vec ptr[in, array[iovec_in]]
|
||||
@ -195,29 +203,20 @@ send_msghdr_un {
|
||||
f flags[send_flags, int32]
|
||||
}
|
||||
|
||||
recv_msghdr_un {
|
||||
addr ptr[out, sockaddr_un]
|
||||
addrlen len[addr, int32]
|
||||
vec ptr[in, array[iovec_out]]
|
||||
vlen len[vec, intptr]
|
||||
ctrl buffer[out]
|
||||
ctrllen len[ctrl, intptr]
|
||||
f int32
|
||||
}
|
||||
|
||||
cmsghdr_un [
|
||||
rights cmsghdr_rights
|
||||
cred cmsghdr_rights
|
||||
rights cmsghdr_un_rights
|
||||
cred cmsghdr_un_cred
|
||||
]
|
||||
|
||||
cmsghdr_rights {
|
||||
cmsghdr_un_rights {
|
||||
len len[parent, intptr]
|
||||
level const[SOL_SOCKET, int32]
|
||||
type const[SCM_RIGHTS, int32]
|
||||
fds array[fd]
|
||||
# TODO: this struct must be padded to intptr (see CMSG_ALIGN)
|
||||
}
|
||||
|
||||
cmsghdr_cred {
|
||||
cmsghdr_un_cred {
|
||||
len len[parent, intptr]
|
||||
level const[SOL_SOCKET, int32]
|
||||
type const[SCM_CREDENTIALS, int32]
|
||||
@ -226,6 +225,9 @@ cmsghdr_cred {
|
||||
gid gid
|
||||
}
|
||||
|
||||
define SCM_RIGHTS 1
|
||||
define SCM_CREDENTIALS 2
|
||||
|
||||
|
||||
|
||||
|
||||
@ -236,10 +238,8 @@ bind$alg(fd fd[alg], addr ptr[in, sockaddr_alg], addrlen len[addr])
|
||||
setsockopt$ALG_SET_KEY(fd fd[alg], level const[SOL_ALG], opt const[ALG_SET_KEY], key buffer[in], keylen len[key])
|
||||
setsockopt$ALG_SET_AEAD_AUTHSIZE(fd fd[alg], level const[SOL_ALG], opt const[ALG_SET_AEAD_AUTHSIZE], val const[0], size intptr)
|
||||
accept$alg(fd fd[alg], peer ptr[out, sockaddr_alg, opt], peerlen ptr[inout, len[peer, int32]]) fd[algconn]
|
||||
sendmsg$alg(fd fd[algconn], msg ptr[in, alg_send_msghdr], f flags[send_flags])
|
||||
sendmmsg$alg(fd fd[algconn], mmsg ptr[in, array[alg_send_msghdr]], vlen len[mmsg], f flags[send_flags])
|
||||
recvmsg$alg(fd fd[algconn], msg ptr[in, alg_recv_msghdr], f flags[recv_flags])
|
||||
recvmmsg$alg(fd fd[algconn], mmsg ptr[in, array[alg_recv_msghdr]], vlen len[mmsg], f flags[recv_flags])
|
||||
sendmsg$alg(fd fd[algconn], msg ptr[in, msghdr_alg], f flags[send_flags])
|
||||
sendmmsg$alg(fd fd[algconn], mmsg ptr[in, array[msghdr_alg]], vlen len[mmsg], f flags[send_flags])
|
||||
|
||||
sockaddr_alg {
|
||||
family const[AF_ALG, int16]
|
||||
@ -249,48 +249,39 @@ sockaddr_alg {
|
||||
name salg_name
|
||||
}
|
||||
|
||||
alg_send_msghdr {
|
||||
msghdr_alg {
|
||||
addr const[0, intptr]
|
||||
addrlen const[0, int32]
|
||||
vec ptr[in, array[iovec_in]]
|
||||
vlen len[vec, intptr]
|
||||
ctrl ptr[in, array[alg_cmsghdr], opt]
|
||||
ctrl ptr[in, array[cmsghdr_alg], opt]
|
||||
ctrllen len[ctrl, intptr]
|
||||
f flags[send_flags, int32]
|
||||
}
|
||||
|
||||
alg_recv_msghdr {
|
||||
addr const[0, intptr]
|
||||
addrlen const[0, int32]
|
||||
vec ptr[in, array[iovec_out]]
|
||||
vlen len[vec, intptr]
|
||||
ctrl buffer[out]
|
||||
ctrllen len[ctrl, intptr]
|
||||
f int32
|
||||
}
|
||||
|
||||
alg_cmsghdr [
|
||||
iv alg_cmsghdr_iv
|
||||
op alg_cmsghdr_op
|
||||
assoc alg_cmsghdr_assoc
|
||||
cmsghdr_alg [
|
||||
iv cmsghdr_alg_iv
|
||||
op cmsghdr_alg_op
|
||||
assoc cmsghdr_alg_assoc
|
||||
]
|
||||
|
||||
alg_cmsghdr_iv {
|
||||
cmsghdr_alg_iv {
|
||||
len len[parent, intptr]
|
||||
level const[SOL_ALG, int32]
|
||||
type const[ALG_SET_IV, int32]
|
||||
ivlen len[iv, int32]
|
||||
iv array[int8]
|
||||
# TODO: this struct must be padded to intptr (see CMSG_ALIGN)
|
||||
}
|
||||
|
||||
alg_cmsghdr_op {
|
||||
cmsghdr_alg_op {
|
||||
len len[parent, intptr]
|
||||
level const[SOL_ALG, int32]
|
||||
type const[ALG_SET_OP, int32]
|
||||
op int32
|
||||
}
|
||||
|
||||
alg_cmsghdr_assoc {
|
||||
cmsghdr_alg_assoc {
|
||||
len len[parent, intptr]
|
||||
level const[SOL_ALG, int32]
|
||||
type const[ALG_SET_AEAD_ASSOCLEN, int32]
|
||||
|
780
sys/sys.go
780
sys/sys.go
File diff suppressed because one or more lines are too long
@ -60,6 +60,7 @@ include <sys/personality.h>
|
||||
include <sys/wait.h>
|
||||
include <sys/user.h>
|
||||
include <sys/socket.h>
|
||||
include <sys/un.h>
|
||||
include <sys/ioctl.h>
|
||||
|
||||
include <linux/futex.h>
|
||||
@ -77,6 +78,7 @@ include <linux/hw_breakpoint.h>
|
||||
include <linux/if_alg.h>
|
||||
include <linux/nfc.h>
|
||||
include <linux/sockios.h>
|
||||
include <linux/socket.h>
|
||||
include <linux/net_tstamp.h>
|
||||
|
||||
include <asm/prctl.h>
|
||||
@ -931,9 +933,9 @@ xfrm_user_tmpl {
|
||||
xfrm_selector {
|
||||
daddr in_addr_any
|
||||
saddr in_addr_any
|
||||
dport int16
|
||||
dport in_port
|
||||
dmask int16
|
||||
sport int16
|
||||
sport in_port
|
||||
smask int16
|
||||
fam int16
|
||||
len_d int8
|
||||
|
@ -2,4 +2,4 @@
|
||||
package sys
|
||||
|
||||
// Maps internal syscall ID onto kernel syscall number.
|
||||
var numbers = []int{2, 2, 257, 85, 3, 0, 17, 19, 295, 1, 18, 20, 296, 8, 32, 33, 292, 22, 293, 276, 275, 278, 40, 4, 6, 5, 7, 271, 23, 270, 213, 291, 233, 232, 281, 282, 289, 284, 290, 283, 286, 287, 323, 16, 16, 16, 16, 16, 16, 9, 11, 25, 216, 10, 26, 28, 221, 187, 237, 279, 256, 238, 239, 27, 149, 325, 150, 151, 152, 319, 272, 312, 202, 273, 274, 219, 16, 16, 16, 16, 16, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 206, 207, 208, 209, 210, 125, 126, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, 317, 240, 242, 243, 244, 245, 241, 68, 69, 70, 71, 64, 65, 220, 66, 29, 30, 31, 67, 133, 259, 90, 91, 268, 92, 94, 93, 260, 285, 269, 132, 235, 261, 280, 104, 108, 105, 106, 102, 107, 109, 121, 111, 39, 186, 113, 114, 117, 119, 118, 120, 122, 123, 115, 116, 135, 253, 294, 254, 255, 300, 301, 86, 265, 266, 88, 87, 263, 89, 267, 82, 264, 316, 83, 258, 84, 76, 77, 73, 74, 75, 162, 306, 277, 212, 78, 217, 303, 304, 165, 165, 166, 155, 139, 139, 139, 137, 138, 134, 175, 313, 176, 246, 177, 103, 63, 99, 136, 163, 98, 97, 160, 302, 172, 173, 252, 252, 251, 251, 308, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 201, 228, 227, 305, 229, 230, 222, 224, 225, 223, 226, 13, 14, 15, 127, 128, 130, 129, 297, 131, 234, 200, 34, 37, 35, 36, 38, 60, 231, 247, 61, 100, 205, 211, 154, 154, 154, 154, 310, 311, 218, 140, 141, 145, 144, 148, 143, 142, 204, 203, 315, 314, 24, 318, 324, 41, 53, 43, 288, 49, 50, 42, 48, 44, 46, 307, 45, 47, 299, 51, 52, 55, 54, 54, 55, 54, 54, 55, 54, 55, 54, 55, 54, 54, 54, 55, 54, 55, 55, 54, 55, 54, 55, 54, 55, 54, 55, 55, 54, 55, 54, 55, 54, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 41, 53, 49, 42, 43, 288, 16, 16, 44, 46, 307, 45, 47, 299, 51, 52, 41, 49, 54, 54, 43, 46, 307, 47, 299, 41, 49, 42, 43, 54, 54, 55, 46, 307, 41, 42, 41, 49, 16, 54, 54, 54, 55, 41, 49, 42, 55, 55, 41, 49, 42, 54, 55, 54, 55, 54, 55, 41, 49, 42, 54, 55, 55, 41, 16, 16, 16, 16, 41, 16, 16, 16, 16, 41, 16, 16, 16, 16, 16, 16, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 2, 1000001, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 298, 16, 16, 16, 16, 16, 16, 16, 16, 16, 248, 249, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 1000003, 1000004, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1000002, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16}
|
||||
var numbers = []int{2, 2, 257, 85, 3, 0, 17, 19, 295, 1, 18, 20, 296, 8, 32, 33, 292, 22, 293, 276, 275, 278, 40, 4, 6, 5, 7, 271, 23, 270, 213, 291, 233, 232, 281, 282, 289, 284, 290, 283, 286, 287, 323, 16, 16, 16, 16, 16, 16, 9, 11, 25, 216, 10, 26, 28, 221, 187, 237, 279, 256, 238, 239, 27, 149, 325, 150, 151, 152, 319, 272, 312, 202, 273, 274, 219, 16, 16, 16, 16, 16, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 206, 207, 208, 209, 210, 125, 126, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, 317, 240, 242, 243, 244, 245, 241, 68, 69, 70, 71, 64, 65, 220, 66, 29, 30, 31, 67, 133, 259, 90, 91, 268, 92, 94, 93, 260, 285, 269, 132, 235, 261, 280, 104, 108, 105, 106, 102, 107, 109, 121, 111, 39, 186, 113, 114, 117, 119, 118, 120, 122, 123, 115, 116, 135, 253, 294, 254, 255, 300, 301, 86, 265, 266, 88, 87, 263, 89, 267, 82, 264, 316, 83, 258, 84, 76, 77, 73, 74, 75, 162, 306, 277, 212, 78, 217, 303, 304, 165, 165, 166, 155, 139, 139, 139, 137, 138, 134, 175, 313, 176, 246, 177, 103, 63, 99, 136, 163, 98, 97, 160, 302, 172, 173, 252, 252, 251, 251, 308, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 201, 228, 227, 305, 229, 230, 222, 224, 225, 223, 226, 13, 14, 15, 127, 128, 130, 129, 297, 131, 234, 200, 34, 37, 35, 36, 38, 60, 231, 247, 61, 100, 205, 211, 154, 154, 154, 154, 310, 311, 218, 140, 141, 145, 144, 148, 143, 142, 204, 203, 315, 314, 24, 318, 324, 41, 53, 43, 288, 49, 50, 42, 48, 44, 46, 307, 45, 47, 299, 51, 52, 55, 54, 16, 16, 54, 55, 54, 54, 55, 54, 55, 54, 55, 54, 54, 54, 55, 54, 55, 55, 54, 55, 54, 55, 54, 55, 54, 55, 55, 54, 55, 54, 55, 54, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 41, 53, 49, 42, 43, 288, 44, 46, 307, 45, 51, 52, 41, 49, 54, 54, 43, 46, 307, 41, 49, 42, 43, 54, 54, 55, 46, 307, 41, 42, 41, 49, 16, 54, 54, 54, 55, 41, 49, 42, 55, 55, 41, 49, 42, 54, 55, 54, 55, 54, 55, 41, 49, 42, 54, 55, 55, 41, 16, 16, 16, 16, 41, 16, 16, 16, 16, 41, 16, 16, 16, 16, 16, 16, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 2, 1000001, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 298, 16, 16, 16, 16, 16, 16, 16, 16, 16, 248, 249, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 1000003, 1000004, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1000002, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 41, 41, 53, 49, 42, 43, 288, 44, 46, 307, 45, 51, 52, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54}
|
||||
|
@ -2,4 +2,4 @@
|
||||
package sys
|
||||
|
||||
// Maps internal syscall ID onto kernel syscall number.
|
||||
var numbers = []int{-1, -1, 56, -1, 57, 63, 67, 65, 69, 64, 68, 66, 70, 62, 23, -1, 24, -1, 59, 77, 76, 75, 71, -1, -1, 80, -1, 73, -1, 72, -1, 20, 21, -1, 22, -1, 74, -1, 19, 85, 86, 87, -1, 29, 29, 29, 29, 29, 29, 222, 215, 216, 234, 226, 227, 233, 223, 213, 235, 239, 238, 237, 236, 232, 228, -1, 229, 230, 231, -1, 97, 272, 98, 99, 100, 128, 29, 29, 29, 29, 29, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 0, 1, 4, 2, 3, 90, 91, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, -1, 277, 180, 182, 183, 184, 185, 181, 186, 189, 188, 187, 190, 193, 192, 191, 194, 196, 195, 197, -1, 33, -1, 52, 53, -1, -1, 55, 54, 47, 48, -1, -1, -1, 88, 176, 177, 146, 144, 174, 175, 154, 155, -1, 172, 178, 145, 143, 147, 149, 148, 150, 151, 152, 158, 159, 92, -1, 26, 27, 28, 262, 263, -1, 37, 36, -1, -1, 35, -1, 78, -1, 38, 276, -1, 34, -1, 45, 46, 32, 82, 83, 81, 267, 84, 18, -1, 61, 264, 265, 40, 40, 39, 41, -1, -1, -1, 43, 44, -1, 105, 273, 106, 104, -1, 116, 160, 179, -1, 89, 165, 163, 164, 261, -1, -1, 31, 31, 30, 30, 268, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, 113, 112, 266, 114, 115, 107, 108, 109, 110, 111, 134, 135, 139, 136, 137, 133, 138, 240, 132, 131, 130, -1, -1, 101, 102, 103, 93, 94, 95, 260, 153, -1, -1, -1, -1, -1, -1, 270, 271, 96, 141, 140, 120, 119, 127, 121, 118, 123, 122, 275, 274, 124, -1, -1, 198, 199, 202, 242, 200, 201, 203, 210, 206, 211, 269, 207, 212, 243, 204, 205, 209, 208, 208, 209, 208, 208, 209, 208, 209, 208, 209, 208, 208, 208, 209, 208, 209, 209, 208, 209, 208, 209, 208, 209, 208, 209, 209, 208, 209, 208, 209, 208, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 198, 199, 200, 203, 202, 242, 29, 29, 206, 211, 269, 207, 212, 243, 204, 205, 198, 200, 208, 208, 202, 211, 269, 212, 243, 198, 200, 203, 202, 208, 208, 209, 211, 269, 198, 203, 198, 200, 29, 208, 208, 208, 209, 198, 200, 203, 209, 209, 198, 200, 203, 208, 209, 208, 209, 208, 209, 198, 200, 203, 208, 209, 209, 198, 29, 29, 29, 29, 198, 29, 29, 29, 29, 198, 29, 29, 29, 29, 29, 29, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, -1, 1000001, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 241, 29, 29, 29, 29, 29, 29, 29, 29, 29, 217, 218, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1000003, 1000004, 29, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 1000002, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -1, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29}
|
||||
var numbers = []int{-1, -1, 56, -1, 57, 63, 67, 65, 69, 64, 68, 66, 70, 62, 23, -1, 24, -1, 59, 77, 76, 75, 71, -1, -1, 80, -1, 73, -1, 72, -1, 20, 21, -1, 22, -1, 74, -1, 19, 85, 86, 87, -1, 29, 29, 29, 29, 29, 29, 222, 215, 216, 234, 226, 227, 233, 223, 213, 235, 239, 238, 237, 236, 232, 228, -1, 229, 230, 231, -1, 97, 272, 98, 99, 100, 128, 29, 29, 29, 29, 29, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 0, 1, 4, 2, 3, 90, 91, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, -1, 277, 180, 182, 183, 184, 185, 181, 186, 189, 188, 187, 190, 193, 192, 191, 194, 196, 195, 197, -1, 33, -1, 52, 53, -1, -1, 55, 54, 47, 48, -1, -1, -1, 88, 176, 177, 146, 144, 174, 175, 154, 155, -1, 172, 178, 145, 143, 147, 149, 148, 150, 151, 152, 158, 159, 92, -1, 26, 27, 28, 262, 263, -1, 37, 36, -1, -1, 35, -1, 78, -1, 38, 276, -1, 34, -1, 45, 46, 32, 82, 83, 81, 267, 84, 18, -1, 61, 264, 265, 40, 40, 39, 41, -1, -1, -1, 43, 44, -1, 105, 273, 106, 104, -1, 116, 160, 179, -1, 89, 165, 163, 164, 261, -1, -1, 31, 31, 30, 30, 268, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, 113, 112, 266, 114, 115, 107, 108, 109, 110, 111, 134, 135, 139, 136, 137, 133, 138, 240, 132, 131, 130, -1, -1, 101, 102, 103, 93, 94, 95, 260, 153, -1, -1, -1, -1, -1, -1, 270, 271, 96, 141, 140, 120, 119, 127, 121, 118, 123, 122, 275, 274, 124, -1, -1, 198, 199, 202, 242, 200, 201, 203, 210, 206, 211, 269, 207, 212, 243, 204, 205, 209, 208, 29, 29, 208, 209, 208, 208, 209, 208, 209, 208, 209, 208, 208, 208, 209, 208, 209, 209, 208, 209, 208, 209, 208, 209, 208, 209, 209, 208, 209, 208, 209, 208, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 198, 199, 200, 203, 202, 242, 206, 211, 269, 207, 204, 205, 198, 200, 208, 208, 202, 211, 269, 198, 200, 203, 202, 208, 208, 209, 211, 269, 198, 203, 198, 200, 29, 208, 208, 208, 209, 198, 200, 203, 209, 209, 198, 200, 203, 208, 209, 208, 209, 208, 209, 198, 200, 203, 208, 209, 209, 198, 29, 29, 29, 29, 198, 29, 29, 29, 29, 198, 29, 29, 29, 29, 29, 29, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, -1, 1000001, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 241, 29, 29, 29, 29, 29, 29, 29, 29, 29, 217, 218, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1000003, 1000004, 29, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 1000002, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -1, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 198, 198, 199, 200, 203, 202, 242, 206, 211, 269, 207, 204, 205, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208}
|
||||
|
@ -278,6 +278,11 @@ func generateArg(name, typ string, a []string, structs map[string]Struct, unname
|
||||
failf("wrong number of arguments for %v arg %v, want %v, got %v", typ, name, want, len(a))
|
||||
}
|
||||
fmt.Fprintf(out, "IntType{%v, TypeSize: 4, Kind: IntInaddr}", common())
|
||||
case "in_port":
|
||||
if want := 0; len(a) != want {
|
||||
failf("wrong number of arguments for %v arg %v, want %v, got %v", typ, name, want, len(a))
|
||||
}
|
||||
fmt.Fprintf(out, "IntType{%v, TypeSize: 2, Kind: IntInport}", common())
|
||||
case "filename":
|
||||
if want := 0; len(a) != want {
|
||||
failf("wrong number of arguments for %v arg %v, want %v, got %v", typ, name, want, len(a))
|
||||
@ -404,6 +409,8 @@ func fmtFdKind(s string) string {
|
||||
return "FdBtBnep"
|
||||
case "unix":
|
||||
return "FdUnix"
|
||||
case "sctp":
|
||||
return "FdSctp"
|
||||
default:
|
||||
failf("bad fd type %v", s)
|
||||
return ""
|
||||
|
Loading…
Reference in New Issue
Block a user