• Home
  • Raw
  • Download

Lines Matching refs:AddressFamily

34 pub enum AddressFamily {  enum
222 impl AddressFamily { impl
228 pub fn from_i32(family: i32) -> Option<AddressFamily> { in from_i32() argument
230 libc::AF_UNIX => Some(AddressFamily::Unix), in from_i32()
231 libc::AF_INET => Some(AddressFamily::Inet), in from_i32()
232 libc::AF_INET6 => Some(AddressFamily::Inet6), in from_i32()
234 libc::AF_NETLINK => Some(AddressFamily::Netlink), in from_i32()
236 libc::AF_SYSTEM => Some(AddressFamily::System), in from_i32()
238 libc::AF_PACKET => Some(AddressFamily::Packet), in from_i32()
245 libc::AF_LINK => Some(AddressFamily::Link), in from_i32()
247 libc::AF_VSOCK => Some(AddressFamily::Vsock), in from_i32()
264 sin_family: AddressFamily::Inet as sa_family_t, in from_std()
272 sin6_family: AddressFamily::Inet6 as sa_family_t, in from_std()
287 sin_family: AddressFamily::Inet as sa_family_t, in new()
295 sin6_family: AddressFamily::Inet6 as sa_family_t, in new()
520 sun_family: AddressFamily::Unix as sa_family_t, in new()
549 sun_family: AddressFamily::Unix as sa_family_t, in new_abstract()
684 pub fn family(&self) -> AddressFamily { in family() argument
686 SockAddr::Inet(InetAddr::V4(..)) => AddressFamily::Inet, in family()
687 SockAddr::Inet(InetAddr::V6(..)) => AddressFamily::Inet6, in family()
688 SockAddr::Unix(..) => AddressFamily::Unix, in family()
690 SockAddr::Netlink(..) => AddressFamily::Netlink, in family()
692 SockAddr::Alg(..) => AddressFamily::Alg, in family()
694 SockAddr::SysControl(..) => AddressFamily::System, in family()
696 SockAddr::Link(..) => AddressFamily::Packet, in family()
703 SockAddr::Link(..) => AddressFamily::Link, in family()
705 SockAddr::Vsock(..) => AddressFamily::Vsock, in family()
727 match AddressFamily::from_i32(i32::from((*addr).sa_family)) { in from_libc_sockaddr()
728 Some(AddressFamily::Unix) => None, in from_libc_sockaddr()
729 Some(AddressFamily::Inet) => Some(SockAddr::Inet( in from_libc_sockaddr()
731 Some(AddressFamily::Inet6) => Some(SockAddr::Inet( in from_libc_sockaddr()
734 Some(AddressFamily::Netlink) => Some(SockAddr::Netlink( in from_libc_sockaddr()
737 Some(AddressFamily::System) => Some(SockAddr::SysControl( in from_libc_sockaddr()
740 Some(AddressFamily::Packet) => Some(SockAddr::Link( in from_libc_sockaddr()
748 Some(AddressFamily::Link) => { in from_libc_sockaddr()
757 Some(AddressFamily::Vsock) => Some(SockAddr::Vsock( in from_libc_sockaddr()
882 use crate::sys::socket::addr::AddressFamily;
892 addr.nl_family = AddressFamily::Netlink as sa_family_t; in new()
980 use crate::sys::socket::addr::AddressFamily;
1009 sc_family: AddressFamily::System as c_uchar, in new()
1052 use super::{fmt, AddressFamily};
1060 pub fn family(&self) -> AddressFamily { in family() argument
1062 AddressFamily::Packet in family()
1124 use super::{fmt, AddressFamily};
1137 pub fn family(&self) -> AddressFamily { in family() argument
1139 AddressFamily::Link in family()
1211 use crate::sys::socket::addr::AddressFamily;
1243 addr.svm_family = AddressFamily::Vsock as sa_family_t; in new()
1317 assert_eq!(sock_addr.family(), AddressFamily::Link); in test_macos_tap_datalink_addr()