diff options
| author | Michael Tüxen <tuexen@fh-muenster.de> | 2018-12-03 14:52:09 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-12-03 13:52:09 +0000 |
| commit | 03f94a45567bcce27a020b2843fc217c568e117a (patch) | |
| tree | a14abb35a5dd20c1db15e1594fd5c71b8130cf29 /sys | |
| parent | 219279048112b60772344969aaf61a6e67f08e08 (diff) | |
sys/freebsd: add UDP-Lite descriptions
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/freebsd/gen/amd64.go | 45 | ||||
| -rw-r--r-- | sys/freebsd/socket_inet_udplite.txt | 24 | ||||
| -rw-r--r-- | sys/freebsd/socket_inet_udplite_amd64.const | 10 |
3 files changed, 78 insertions, 1 deletions
diff --git a/sys/freebsd/gen/amd64.go b/sys/freebsd/gen/amd64.go index f3d47983b..98d2b35b5 100644 --- a/sys/freebsd/gen/amd64.go +++ b/sys/freebsd/gen/amd64.go @@ -30,6 +30,8 @@ var resources_amd64 = []*ResourceDesc{ {Name: "sock_tcp6", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "sock", "sock_in6", "sock_tcp6"}, Values: []uint64{18446744073709551615, 18446744073709551516}}, {Name: "sock_udp", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "sock", "sock_in", "sock_udp"}, Values: []uint64{18446744073709551615, 18446744073709551516}}, {Name: "sock_udp6", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "sock", "sock_in6", "sock_udp6"}, Values: []uint64{18446744073709551615, 18446744073709551516}}, + {Name: "sock_udplite", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "sock", "sock_in", "sock_udplite"}, Values: []uint64{18446744073709551615, 18446744073709551516}}, + {Name: "sock_udplite6", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "sock", "sock_in6", "sock_udplite6"}, Values: []uint64{18446744073709551615, 18446744073709551516}}, {Name: "sock_unix", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "sock", "sock_unix"}, Values: []uint64{18446744073709551615, 18446744073709551516}}, {Name: "tcp_seq_num", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"tcp_seq_num"}, Values: []uint64{1094861636}}, {Name: "uid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"uid"}, Values: []uint64{0, 18446744073709551615}}, @@ -927,6 +929,13 @@ var syscalls_amd64 = []*Syscall{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4, ArgDir: 1}}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}}, }}, + {NR: 118, Name: "getsockopt$inet6_udplite", CallName: "getsockopt", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_udplite6", FldName: "fd", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 136}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "udplite_option_types", FldName: "optname", TypeSize: 8}}, Vals: []uint64{4, 2}, BitMask: true}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4, ArgDir: 1}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}}, + }}, {NR: 118, Name: "getsockopt$inet_buf", CallName: "getsockopt", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}}, @@ -983,6 +992,13 @@ var syscalls_amd64 = []*Syscall{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4, ArgDir: 1}}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}}, }}, + {NR: 118, Name: "getsockopt$inet_udplite", CallName: "getsockopt", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_udplite", FldName: "fd", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 136}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "udplite_option_types", FldName: "optname", TypeSize: 8}}, Vals: []uint64{4, 2}, BitMask: true}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4, ArgDir: 1}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}}, + }}, {NR: 118, Name: "getsockopt$sock_cred", CallName: "getsockopt", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535}, @@ -1548,6 +1564,13 @@ var syscalls_amd64 = []*Syscall{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"}, }}, + {NR: 105, Name: "setsockopt$inet6_udplite", CallName: "setsockopt", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_udplite6", FldName: "fd", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 136}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "udplite_option_types", FldName: "optname", TypeSize: 8}}, Vals: []uint64{4, 2}, BitMask: true}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"}, + }}, {NR: 105, Name: "setsockopt$inet_MCAST_JOIN_GROUP", CallName: "setsockopt", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}}, @@ -1639,6 +1662,13 @@ var syscalls_amd64 = []*Syscall{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"}, }}, + {NR: 105, Name: "setsockopt$inet_udplite", CallName: "setsockopt", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_udplite", FldName: "fd", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 136}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "udplite_option_types", FldName: "optname", TypeSize: 8}}, Vals: []uint64{4, 2}, BitMask: true}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"}, + }}, {NR: 105, Name: "setsockopt$sock_cred", CallName: "setsockopt", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535}, @@ -1770,6 +1800,11 @@ var syscalls_amd64 = []*Syscall{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 8}}, Val: 2}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "proto", TypeSize: 8}}}, }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_udp6", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, + {NR: 97, Name: "socket$inet6_udplite", CallName: "socket", Args: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 28}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 8}}, Val: 2}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "proto", TypeSize: 8}}, Val: 136}, + }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_udplite6", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {NR: 97, Name: "socket$inet_icmp", CallName: "socket", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 2}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 8}}, Val: 2}, @@ -1790,6 +1825,11 @@ var syscalls_amd64 = []*Syscall{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 8}}, Val: 2}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "proto", TypeSize: 8}}}, }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_udp", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, + {NR: 97, Name: "socket$inet_udplite", CallName: "socket", Args: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 2}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 8}}, Val: 2}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "proto", TypeSize: 8}}, Val: 136}, + }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_udplite", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {NR: 97, Name: "socket$unix", CallName: "socket", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 1}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "unix_socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 5}}, @@ -1988,6 +2028,7 @@ var consts_amd64 = []ConstValue{ {Name: "IPPROTO_IP"}, {Name: "IPPROTO_IPV6", Value: 41}, {Name: "IPPROTO_TCP", Value: 6}, + {Name: "IPPROTO_UDPLITE", Value: 136}, {Name: "IPV6_2292DSTOPTS", Value: 23}, {Name: "IPV6_2292HOPLIMIT", Value: 20}, {Name: "IPV6_2292HOPOPTS", Value: 22}, @@ -2425,6 +2466,8 @@ var consts_amd64 = []ConstValue{ {Name: "TCP_KEEPINTVL", Value: 512}, {Name: "TCP_NODELAY", Value: 1}, {Name: "TIMER_ABSTIME", Value: 1}, + {Name: "UDPLITE_RECV_CSCOV", Value: 4}, + {Name: "UDPLITE_SEND_CSCOV", Value: 2}, {Name: "WCONTINUED", Value: 4}, {Name: "WEXITED", Value: 16}, {Name: "WNOHANG", Value: 1}, @@ -2433,4 +2476,4 @@ var consts_amd64 = []ConstValue{ {Name: "WUNTRACED", Value: 2}, } -const revision_amd64 = "4929654e4c6f12c8222436a5269c97497bd7efee" +const revision_amd64 = "a3944f6fbcf482566af6a7a77f6663b51b659575" diff --git a/sys/freebsd/socket_inet_udplite.txt b/sys/freebsd/socket_inet_udplite.txt new file mode 100644 index 000000000..dbafe156b --- /dev/null +++ b/sys/freebsd/socket_inet_udplite.txt @@ -0,0 +1,24 @@ +# 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_INET and AF_INET6: UDP-Lite support + +include <sys/types.h> +include <sys/socket.h> +include <netinet/in.h> +include <netinet/udplite.h> + +resource sock_udplite[sock_in] + +socket$inet_udplite(domain const[AF_INET], type const[SOCK_DGRAM], proto const[IPPROTO_UDPLITE]) sock_udplite + +resource sock_udplite6[sock_in6] + +socket$inet6_udplite(domain const[AF_INET6], type const[SOCK_DGRAM], proto const[IPPROTO_UDPLITE]) sock_udplite6 + +udplite_option_types = UDPLITE_RECV_CSCOV, UDPLITE_SEND_CSCOV + +getsockopt$inet_udplite(fd sock_udplite, level const[IPPROTO_UDPLITE], optname flags[udplite_option_types], optval ptr[out, int32], optlen ptr[inout, len[optval, int32]]) +setsockopt$inet_udplite(fd sock_udplite, level const[IPPROTO_UDPLITE], optname flags[udplite_option_types], optval ptr[in, int32], optlen len[optval]) +getsockopt$inet6_udplite(fd sock_udplite6, level const[IPPROTO_UDPLITE], optname flags[udplite_option_types], optval ptr[out, int32], optlen ptr[inout, len[optval, int32]]) +setsockopt$inet6_udplite(fd sock_udplite6, level const[IPPROTO_UDPLITE], optname flags[udplite_option_types], optval ptr[in, int32], optlen len[optval]) diff --git a/sys/freebsd/socket_inet_udplite_amd64.const b/sys/freebsd/socket_inet_udplite_amd64.const new file mode 100644 index 000000000..8a9fd1f83 --- /dev/null +++ b/sys/freebsd/socket_inet_udplite_amd64.const @@ -0,0 +1,10 @@ +# AUTOGENERATED FILE +AF_INET = 2 +AF_INET6 = 28 +IPPROTO_UDPLITE = 136 +SOCK_DGRAM = 2 +SYS_getsockopt = 118 +SYS_setsockopt = 105 +SYS_socket = 97 +UDPLITE_RECV_CSCOV = 4 +UDPLITE_SEND_CSCOV = 2 |
