mod.rs |
Network-related operations.
On Windows, one must call [`wsa_startup`] in the process before calling any
of these APIs. [`wsa_cleanup`] may be used in the process if these APIs are
no longer needed.
[`wsa_startup`]: https://docs.rs/rustix/*/x86_64-pc-windows-msvc/rustix/net/fn.wsa_startup.html
[`wsa_cleanup`]: https://docs.rs/rustix/*/x86_64-pc-windows-msvc/rustix/net/fn.wsa_cleanup.html |
996 |
netdevice.rs |
Low-level Linux network device access
The methods in this module take a socket's file descriptor to communicate
with the kernel in their ioctl call:
- glibc uses an `AF_UNIX`, `AF_INET`, or `AF_INET6` socket. The address
family itself does not matter and glibc tries the next address family if
socket creation with one fails.
- Android (bionic) uses an `AF_INET` socket.
- Both create the socket with `SOCK_DGRAM|SOCK_CLOEXEC` type/flag.
- The [manual pages] specify that the ioctl calls “can be used on any
socket's file descriptor regardless of the family or type”.
# References
- [Linux]
[manual pages]: https://man7.org/linux/man-pages/man7/netdevice.7.html
[Linux]: https://man7.org/linux/man-pages/man7/netdevice.7.html |
3145 |
send_recv |
|
|
socket.rs |
|
31533 |
socket_addr_any.rs |
A socket address for any kind of socket.
This is similar to [`std::net::SocketAddr`], but also supports Unix-domain
socket addresses on Unix.
# Safety
The `read` and `write` functions allow decoding and encoding from and to
OS-specific socket address representations in memory. |
3405 |
socketpair.rs |
|
1351 |
sockopt.rs |
|
51166 |
types.rs |
Types and constants for `rustix::net`. |
61559 |
wsa.rs |
|
1696 |