Skip to content

Commit 77c4aae

Browse files
authored
Reorganize sockopts code and add several more socket options (#855)
Reorganize the sockopts code: - Split the `sockopt` modules out of the syscalls.rs files into their own files - Instead of duplicating all the documentation links for each socket option function, add a module-level documentation comment with all the links and just have the function documentation link to that. - Reorganize the sockopt tests so that the socket and tcp options are tested on both ipv4 and ipv6 sockets. - Adjust the bindings to reduce the amount of `as _` casting needed. And, implement several more sockopt functions: - Add `*_ifindex` variations of `IP_ADD_MEMBERSHIP` and `IP_DROP_MEMBERSHIP` - Implement `IP_DROP_SOURCE_MEMBERSHIP`, `TCP_USER_TIMEOUT`, `IP_TOS`, `IPV6_RECVTCLASS`, `IP_RECVTOS`, `IP_ADD_SOURCE_MEMBERSHIP`, and `SO_OOBINLINE`.
1 parent abd6686 commit 77c4aae

9 files changed

Lines changed: 2399 additions & 3089 deletions

File tree

src/backend/libc/net/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ pub(crate) mod ext;
44
pub(crate) mod msghdr;
55
pub(crate) mod read_sockaddr;
66
pub(crate) mod send_recv;
7+
#[cfg(not(any(target_os = "redox", target_os = "wasi")))]
8+
pub(crate) mod sockopt;
79
pub(crate) mod syscalls;
810
pub(crate) mod write_sockaddr;

0 commit comments

Comments
 (0)