Enum nix::sys::socket::AddressFamily
source · #[non_exhaustive]#[repr(i32)]pub enum AddressFamily {
Show 24 variants
Unix = 1,
Inet = 2,
Inet6 = 24,
Route = 34,
Ipx = 23,
AppleTalk = 16,
Decnet = 12,
Sna = 11,
Bluetooth = 31,
Isdn = 26,
ImpLink = 3,
Pup = 4,
Chaos = 5,
Ns = 6,
Iso = 7,
Datakit = 9,
Ccitt = 10,
Dli = 13,
Lat = 14,
Hylink = 15,
Link = 18,
Coip = 20,
Cnt = 21,
Natm = 27,
}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 = 1
Local communication (see unix(7))
Inet = 2
IPv4 Internet protocols (see ip(7))
Inet6 = 24
IPv6 Internet protocols (see ipv6(7))
Route = 34
Kernel interface for interacting with the routing table
Ipx = 23
IPX - Novell protocols
AppleTalk = 16
AppleTalk
Decnet = 12
DECet protocol sockets.
Sna = 11
IBM SNA
Bluetooth = 31
Bluetooth low-level socket protocol
Isdn = 26
New “modular ISDN” driver interface protocol
ImpLink = 3
ARPANet IMP addresses
Pup = 4
PUP protocols, e.g. BSP
Chaos = 5
MIT CHAOS protocols
Ns = 6
Novell and Xerox protocol
Iso = 7
Datakit = 9
Bell Labs virtual circuit switch ?
Ccitt = 10
CCITT protocols, X.25 etc
Dli = 13
DEC Direct data link interface
Lat = 14
Hylink = 15
NSC Hyperchannel
Link = 18
Link layer interface
Coip = 20
connection-oriented IP, aka ST II
Cnt = 21
Computer Network Technology
Natm = 27
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 moresource§impl Debug for AddressFamily
impl Debug for AddressFamily
source§impl Hash for AddressFamily
impl Hash for AddressFamily
source§impl PartialEq for AddressFamily
impl PartialEq for AddressFamily
source§fn eq(&self, other: &AddressFamily) -> bool
fn eq(&self, other: &AddressFamily) -> bool
self and other values to be equal, and is used
by ==.