| addr.rs |
Socket address utilities. |
11650 |
- |
| ext.rs |
|
3171 |
- |
| mod.rs |
|
356 |
- |
| msghdr.rs |
Utilities for dealing with message headers.
These take closures rather than returning a `c::msghdr` directly because
the message headers may reference stack-local data. |
5695 |
- |
| netdevice.rs |
Wrappers for netdevice ioctls. |
1564 |
- |
| read_sockaddr.rs |
The BSD sockets API requires us to read the `sa_family` field before we can
interpret the rest of a `sockaddr` produced by the kernel. |
8611 |
- |
| send_recv.rs |
/bitflags/#externally-defined-flags>
const _ = !0;
}
}
bitflags! {
/// `MSG_*` flags for use with [`recv`], [`recvfrom`], and related
/// functions.
///
/// [`recv`]: crate::net::recv
/// [`recvfrom`]: crate::net::recvfrom
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub struct RecvFlags: u32 {
/// `MSG_CMSG_CLOEXEC`
#[cfg(not(any(
apple,
solarish,
windows,
target_os = "aix",
target_os = "espidf",
target_os = "haiku",
target_os = "horizon",
target_os = "nto",
target_os = "redox",
target_os = "vita",
)))]
const CMSG_CLOEXEC = bitcast!(c::MSG_CMSG_CLOEXEC);
/// `MSG_DONTWAIT`
#[cfg(not(windows))]
const DONTWAIT = bitcast!(c::MSG_DONTWAIT);
/// `MSG_ERRQUEUE`
#[cfg(not(any(
bsd,
solarish,
windows,
target_os = "aix",
target_os = "cygwin",
target_os = "espidf",
target_os = "haiku",
target_os = "horizon",
target_os = "hurd",
target_os = "nto",
target_os = "redox",
target_os = "vita",
)))]
const ERRQUEUE = bitcast!(c::MSG_ERRQUEUE);
/// `MSG_OOB`
const OOB = bitcast!(c::MSG_OOB);
/// `MSG_PEEK`
const PEEK = bitcast!(c::MSG_PEEK);
/// `MSG_TRUNC`
// Apple, illumos, and NetBSD have `MSG_TRUNC` but it's not documented
// for use with `recv` and friends, and in practice appears to be
// ignored.
#[cfg(not(any(apple, solarish, target_os = "horizon", target_os = "netbsd")))]
const TRUNC = bitcast!(c::MSG_TRUNC);
/// `MSG_WAITALL`
const WAITALL = bitcast!(c::MSG_WAITALL);
/// <https://docs.rs/bitflags/ |
4842 |
- |
| sockopt.rs |
libc syscalls supporting `rustix::net::sockopt`. |
41787 |
- |
| syscalls.rs |
libc syscalls supporting `rustix::net`. |
11612 |
- |
| write_sockaddr.rs |
The BSD sockets API requires us to read the `sa_family` field before we can
interpret the rest of a `sockaddr` produced by the kernel. |
2112 |
- |