Skip to content

Conversation

@sunfishcode
Copy link
Member

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.

Instead of copying all the Reference URLs for each sockopt function,
factor common links out into the module-level documentation.
Implement TCP_USER_TIMEOUT, IP_TOS, IPV6_RECVTCLASS, IP_RECVTOS,
and IP_ADD_SOURCE_MEMBERSHIP.
Add `*_ifindex` variations of `IP_ADD_MEMBERSHIP` and
`IP_DROP_MEMBERSHIP`, and add `IP_DROP_SOURCE_MEMBERSHIP`.
Reorganize the sockopt test so that socket and tcp options are
consistently tested on both ipv4 and ipv6 sockets, and add new
tests for the new socket options.
@sunfishcode sunfishcode merged commit 77c4aae into main Sep 28, 2023
@sunfishcode sunfishcode deleted the sunfishcode/sock-options branch September 28, 2023 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants