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 [man-pages] specify, that the ioctl calls "can be used on any
socket's file descriptor regardless of the
family or type".
# References
- [Linux]
[man-pages]: https://man7.org/linux/man-pages/man7/netdevice.7.html
[Linux]: https://man7.org/linux/man-pages/man7/netdevice.7.html |
3136 |
send_recv |
|
|
socket.rs |
|
31496 |
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. |
3415 |
socketpair.rs |
|
1349 |
sockopt.rs |
|
50519 |
types.rs |
Types and constants for `rustix::net`. |
60793 |
wsa.rs |
|
1696 |