aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/socket.txt
Commit message (Collapse)AuthorAgeFilesLines
* sys/linux: don't use len/flags/const/proc types in out fieldsDmitry Vyukov2022-01-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all uses of len/flags/const/proc types in explicitly marked out fields. Use of these types for out fields does not make sense: a len[b, int32] (out) b flags[foo, int32] (out) Since kernel fills these fields, that's unnecessary details or bugs in descriptions. In particular all of these are actually bugs: ioctl$TUNSETQUEUE(fd fd_tun, cmd const[TUNSETQUEUE], arg ptr[in, ifreq_t[flags[tun_queue_flags, int16]]]) ioctl$TUNSETIFF(fd fd_tun, cmd const[TUNSETIFF], arg ptr[in, ifreq_t[flags[tun_setiff_flags, int16]]]) ioctl$SIOCSIFHWADDR(fd fd_tun, cmd const[SIOCSIFHWADDR], arg ptr[in, ifreq_t[mac_addr]]) ioctl$sock_inet_SIOCSIFADDR(fd sock, cmd const[SIOCSIFADDR], arg ptr[inout, ifreq_t[sockaddr_in]]) ioctl$sock_inet_SIOCSIFBRDADDR(fd sock, cmd const[SIOCSIFBRDADDR], arg ptr[inout, ifreq_t[sockaddr_in]]) ioctl$sock_inet_SIOCSIFNETMASK(fd sock, cmd const[SIOCSIFNETMASK], arg ptr[inout, ifreq_t[sockaddr_in]]) ioctl$sock_inet_SIOCSIFDSTADDR(fd sock, cmd const[SIOCSIFDSTADDR], arg ptr[inout, ifreq_t[sockaddr_in]]) ioctl$sock_inet_SIOCSIFPFLAGS(fd sock, cmd const[SIOCSIFPFLAGS], arg ptr[inout, ifreq_t[int32]]) ioctl$SIOCSIFMTU(fd sock_pppl2tp, cmd const[SIOCSIFMTU], arg ptr[in, ifreq_t[int32]]) ioctl$sock_SIOCETHTOOL(fd sock, cmd const[SIOCETHTOOL], arg ptr[inout, ifreq_t[ptr[inout, ethtool_cmd_u]]]) We pretend that we pass in some flags or addresses, but the ifreq field was marked as (out), so we actually did not pass anything in.
* sys/linux: regenerate consts, remove ipxDmitry Vyukov2021-10-131-4/+2
| | | | | | Regenerate const files on the latest upstream tree. Remove IPX support since it was removed from the kernel in 7a2e838d28 ("staging: ipx: delete it from the tree").
* sys/linux: add ieee802154 descriptionsDmitry Vyukov2021-02-121-1/+2
|
* sys/linux: enhance ifreq_dev_t definition by setting attribute directionsAleksandr Nogikh2020-09-221-3/+3
| | | | | This modification allows to remove [opt] modified for all uses of ifreq_dev_t and ifreq_t
* all: integrate with mac80211_hwsimAleksandr Nogikh2020-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two virtual wireless devices are instantiated during network devices initialization. A new flag (-wifi) is added that controls whether these virtual wifi devices are instantiated and configured during proc initialization. Also, two new pseudo syscalls are added: 1. syz_80211_inject_frame(mac_addr, packet, packet_len) -- injects an arbitrary packet into the wireless stack. It is injected as if it originated from the device identitied by mac_addr. 2. syz_80211_join_ibss(interface_name, ssid, ssid_len, mode) -- puts a specific network interface into IBSS state and joins an IBSS network. Arguments of syz_80211_join_ibss: 1) interface_name -- null-terminated string that identifies a wireless interface 2) ssid, ssid_len -- SSID of an IBSS network to join to 3) mode -- mode of syz_80211_join_ibss operation (see below) Modes of operation: JOIN_IBSS_NO_SCAN (0x0) -- channel scan is not performed and syz_80211_join_ibss waits until the interface reaches IF_OPER_UP. JOIN_IBSS_BG_SCAN (0x1) -- channel scan is performed (takes ~ 9 seconds), syz_80211_join_ibss does not await IF_OPER_UP. JOIN_IBSS_BG_NO_SCAN (0x2) -- channel scan is not performed, syz_80211_join_ibss does not await IF_OPER_UP. Local testing ensured that these syscalls are indeed able to set up an operating network and inject packets into mac80211.
* sys/linux: add descriptions for qrtr socketNecip Fazil Yildiran2020-06-231-2/+4
| | | | | Added descriptions to test Qualcomm's IPC router protocol for sockets. Update #533.
* pkg/compiler: refactor attribute handlingDmitry Vyukov2020-04-191-2/+2
| | | | | | | | | | | | Introduce common infrastructure for describing and parsing attribute instead of custom per-attribute code scattered across several locations. Change align attribute syntax from the weird align_N to align[N]. This also allows to use literal constants as N. Introduce notion of builtin constants. Currently we have only PTR_SIZE, which is needed to replace align_ptr with align[PTR_SIZE].
* pkg/compiler: check that const values fit into base typeDmitry Vyukov2020-03-171-2/+2
| | | | | const[0x12345678, int8] is always an error, detect these cases. Found some bugs in mptcp, socket proto and fuchsia fidl descriptions.
* pkg/compiler: ensure consistency of syscall argument typesDmitry Vyukov2020-03-171-2/+2
| | | | | | | | | | | | | | | | | | Ensure that we don't have conflicting sizes for the same argument of the same syscall, e.g.: foo$1(a int16) foo$2(a int32) This is useful for several reasons: - we will be able avoid morphing syscalls into other syscalls - we will be able to figure out more precise sizes for args (lots of them are implicitly intptr, which is the largest type on most important arches) - found few bugs in linux descriptions Update #477 Update #502
* wireguard: use wg0, wg1, wg2Jason A. Donenfeld2020-02-101-1/+1
| | | | | This matches more closely what people are used to dealing with. We also add one additional device for interesting multi-interface effects.
* sys/linux: add some wireguard descriptionsDmitry Vyukov2020-01-311-1/+1
| | | | Update #806
* sys/linux: add ethtool netlink descriptionsDmitry Vyukov2020-01-281-16/+22
|
* sys/linux: add more device descriptions (geneve, lowpan, ipoib, cfhsi)Dmitry Vyukov2020-01-191-1/+1
|
* sys/linux: add some batadv descriptionsDmitry Vyukov2020-01-181-1/+1
|
* executor: create macvtap, macsec devicesDmitry Vyukov2020-01-181-1/+1
|
* sys/linux: add NFNL_SUBSYS_QUEUE descriptionsDmitry Vyukov2020-01-091-1/+1
|
* executor: setup vlan/macvlan/ipvlan devicesDmitry Vyukov2020-01-031-1/+1
|
* sys/linux: add basic AF_PHONET descriptionsDmitry Vyukov2020-01-031-0/+2
|
* sys/linux: fix SIOCGIFINDEXDmitry Vyukov2020-01-031-1/+1
| | | | | | | Mark ifindex as opt in SIOCGIFINDEX. Otherwise it's considered inout and SIOCGIFINDEX can't be used to produce ifindex'es on its own. It requires an input ifindex first and only then it can output own ifindex.
* executor: connect virt_wifi to vethDmitry Vyukov2020-01-031-1/+1
| | | | | | virt_wifi docs say that the enslaved device won't be usable on itself. It's probably not a good idea to make lo unusable. Enslave a dedicated veth instead.
* sys/linux: add IPPROTO_L2TP descriptionsDmitry Vyukov2019-12-311-0/+3
|
* sys/linux: add virt_wifi and xfrm devicesDmitry Vyukov2019-12-301-1/+1
| | | | + some netlink descriptions
* sys/linux: support new split sound ioctlsDmitry Vyukov2019-12-181-1/+1
| | | | | | 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.
* sys/linux: various descriptions fixesAndrey Konovalov2019-12-181-1/+1
|
* sys/linux/socket.txt: add more description for socket ioctlsShiyu Sun2019-11-281-5/+58
|
* sys/linux/socket.txt: add devlink pci related netdevJiri Pirko2019-11-141-2/+3
| | | | | | Add netdev name related to pci netdev and fix comment for netdevsim0. Signed-off-by: Jiri Pirko <jiri@mellanox.com>
* sys/linux/socket.txt: update timestamp optionsHangbin Liu2019-07-301-4/+8
| | | | | | | | | Update socket timeval, timestamp options and flags. v2: separate SO_{TIMESTAMP, TIMESTAMPNS}_{OLD, NEW} as they only need enable/disable option value. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
* sys/linux: fix alignment of cmsghdr_sockDmitry Vyukov2019-05-101-3/+3
| | | | All cmsg's must be intptr aligned within the array.
* sys/linux: update descriptions of sendmsg/sendmmsgKaipeng Zeng2019-05-101-1/+39
| | | | Fix the descriptions of cmsghdr. Add sendmsg$sock and sendmmsg$sock for __sock_cmsg_send.
* sys/linux: regenerate and fix const filesDmitry Vyukov2019-03-141-4/+4
| | | | | | | | 1. Move fsverity descriptions to a separate file which is not regenerated automatically. It was dropped from linux-next. 2. Fix tlk_device.txt name in syz-extract. 3. Update some socket consts e.g. s/SO_TIMESTAMPING/SO_TIMESTAMPING_OLD/. 4. Regenerate const files on current upstream head.
* sys/linux: add AF_RXRPC descriptionsDmitry Vyukov2018-12-301-0/+1
|
* sys/linux: add AF_ISDN descriptionsDmitry Vyukov2018-12-291-0/+2
|
* executor: create more net devices on linuxDmitry Vyukov2018-12-261-2/+2
|
* sys/linux: add basic AF_CAIF descriptionsDmitry Vyukov2018-12-241-0/+1
|
* sys/linux: add basic X25 descriptionsDmitry Vyukov2018-12-241-1/+4
|
* sys/linux: extend AX25/ROSE/NETROM descriptionsDmitry Vyukov2018-12-241-2/+7
|
* sys: consistently mark all paddings as const[0]Dmitry Vyukov2018-12-101-2/+2
|
* sys/linux: add AF_TIPC descriptionsDmitry Vyukov2018-12-091-0/+2
|
* sys/linux: socketpair returns sockets not just fd'sDmitry Vyukov2018-12-091-1/+6
|
* sys/linux: improve recvmsg descriptionsMichael Tuexen2018-12-081-3/+3
|
* reordering unions for trace2syzShankara Pailoor2018-11-251-1/+1
|
* sys/linux: adding constants for trace2syz to socketsshankarapailoor2018-10-301-1/+1
|
* sys/linux: fix SIOCGIFCONF constDmitry Vyukov2018-10-291-1/+1
|
* pkg/compiler: check for unused declarationsDmitry Vyukov2018-06-301-1/+1
| | | | | Error on unused structs/unions/resources/flags. Finds tons of bugs.
* sys/linux: add AF_XDP supportDmitry Vyukov2018-06-071-0/+2
|
* executor: add two slave interfaces for bridge,bond,teamHangbin Liu2018-04-131-1/+1
| | | | | | | | Bridge device is used for forwarding. Bond/team device is used for load balance and fail over. So it would make more sense to add two slave interfaces for these devices. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
* sys/linux: add veth devices to devnamesDmitry Vyukov2018-04-111-1/+1
| | | | Also comment new veth code for future me.
* executor: create team deviceDmitry Vyukov2018-04-061-3/+5
|
* sys/linux: make ifreq template, fix some usagesDmitry Vyukov2018-03-051-19/+7
|
* sys/linux: use size attributes on structsDmitry Vyukov2018-03-051-36/+31
| | | | | | | | | | | 1. Add size attribte on sockaddr. 2. Remove sockaddr's that are larger than 16 bytes from sockaddr. 3. Add size attribute on sockaddr_storage which wasn't actually 128 bytes. 4. Add size attribute to ifreq. 5. Fix ifmap field types as uncovered by the size attributes. 6. Fix sockaddr_storage_tcp from struct to union which is should be. 7. Make sockaddr_un_file fixed size as it should be. 8. Fix some explicit paddings that were only correct for 64 bits.