Lines Matching refs:Ipv6Addr
52 /// Convert a std::net::Ipv6Addr into the libc form.
54 pub(crate) const fn ipv6addr_to_libc(addr: &net::Ipv6Addr) -> libc::in6_addr {
55 static_assertions::assert_eq_size!(net::Ipv6Addr, libc::in6_addr);
485 sin6_addr: Ipv6Addr::from_std(addr.ip()).0,
519 InetAddr::V6(ref sa) => IpAddr::V6(Ipv6Addr(sa.sin6_addr)),
539 Ipv6Addr(sa.sin6_addr).to_std(),
576 V6(Ipv6Addr),
595 IpAddr::V6(Ipv6Addr::new(a, b, c, d, e, f, g, h))
601 net::IpAddr::V6(ref std) => IpAddr::V6(Ipv6Addr::from_std(std)),
651 // Use pass by reference for symmetry with Ipv6Addr::from_std
683 * ===== Ipv6Addr =====
689 note = "Use std::net::Ipv6Addr instead"
694 pub struct Ipv6Addr(pub libc::in6_addr);
714 impl Ipv6Addr {
717 pub const fn new(a: u16, b: u16, c: u16, d: u16, e: u16, f: u16, g: u16, h: u16) -> Ipv6Addr {
718 Ipv6Addr(libc::in6_addr{s6_addr: to_u8_array!(a,b,c,d,e,f,g,h)})
721 pub fn from_std(std: &net::Ipv6Addr) -> Ipv6Addr {
723 Ipv6Addr::new(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7])
731 pub const fn to_std(&self) -> net::Ipv6Addr {
733 net::Ipv6Addr::new(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7])
738 impl fmt::Display for Ipv6Addr {
1386 pub fn ip(&self) -> net::Ipv6Addr {
1387 net::Ipv6Addr::from(self.0.sin6_addr.s6_addr)
1477 net::Ipv6Addr::from(addr.0.sin6_addr.s6_addr),
2974 let s = std::net::Ipv6Addr::new(1, 2, 3, 4, 5, 6, 7, 8);