Enum nix::sys::socket::AddressFamily
source · #[repr(i32)]
#[non_exhaustive]
pub enum AddressFamily {
Show 22 variants
Unix,
Inet,
Inet6,
Ipx,
AppleTalk,
Decnet,
Sna,
Bluetooth,
Isdn,
ImpLink,
Pup,
Chaos,
Iso,
Datakit,
Ccitt,
Dli,
Lat,
Hylink,
Link,
Coip,
Cnt,
Natm,
}
socket
only.Expand description
These constants specify the protocol family to be used
in socket
and socketpair
References
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unix
Local communication (see unix(7)
)
Inet
IPv4 Internet protocols (see ip(7)
)
Inet6
IPv6 Internet protocols (see ipv6(7)
)
Ipx
IPX - Novell protocols
AppleTalk
AppleTalk
Decnet
DECet protocol sockets.
Sna
IBM SNA
Bluetooth
Bluetooth low-level socket protocol
Isdn
New “modular ISDN” driver interface protocol
ImpLink
ARPANet IMP addresses
Pup
PUP protocols, e.g. BSP
Chaos
MIT CHAOS protocols
Iso
Datakit
Bell Labs virtual circuit switch ?
Ccitt
CCITT protocols, X.25 etc
Dli
DEC Direct data link interface
Lat
Hylink
NSC Hyperchannel
Link
Link layer interface
Coip
connection-oriented IP, aka ST II
Cnt
Computer Network Technology
Natm
Native ATM access
Implementations§
source§impl AddressFamily
impl AddressFamily
sourcepub const fn from_i32(family: i32) -> Option<AddressFamily>
pub const fn from_i32(family: i32) -> Option<AddressFamily>
Create a new AddressFamily
from an integer value retrieved from libc
, usually from
the sa_family
field of a sockaddr
.
Currently only supports these address families: Unix, Inet (v4 & v6), Netlink, Link/Packet and System. Returns None for unsupported or unknown address families.
Trait Implementations§
source§impl Clone for AddressFamily
impl Clone for AddressFamily
source§fn clone(&self) -> AddressFamily
fn clone(&self) -> AddressFamily
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more