/third_party/rust/crates/rustix/src/net/ |
H A D | ip.rs | 7 //! This defines `IpAddr`, `Ipv4Addr`, and `Ipv6Addr`. Ideally, these should be 19 /// This enum can contain either an [`Ipv4Addr`] or an [`Ipv6Addr`], see their 25 /// use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; 28 /// let localhost_v6 = IpAddr::V6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1)); 44 V6(#[cfg_attr(staged_api, stable(feature = "ip_addr", since = "1.7.0"))] Ipv6Addr), 117 /// Use [`Ipv6Addr::to_ipv4`] to convert an IPv4-compatible IPv6 address to the canonical IPv4 address. 135 /// Use [`Ipv6Addr::to_ipv4`] to convert an IPv4-mapped IPv6 address to the canonical IPv4 address. 137 /// [`Ipv6Addr::to_ipv4_mapped`] to avoid this. 143 /// `Ipv6Addr` provides a [`FromStr`] implementation. There are many ways to represent 154 /// use std::net::Ipv6Addr; 162 pub struct Ipv6Addr { global() structure names 1186 impl Ipv6Addr { global() impls [all...] |
H A D | addr.rs | 12 use crate::net::ip::{IpAddr, Ipv4Addr, Ipv6Addr}; 94 /// [`IPv6` address]: Ipv6Addr 99 /// use std::net::{Ipv6Addr, SocketAddrV6}; 101 /// let socket = SocketAddrV6::new(Ipv6Addr::new(0x2001, 0xdb8, 0, 0, 0, 0, 0, 1), 8080, 0, 0); 104 /// assert_eq!(socket.ip(), &Ipv6Addr::new(0x2001, 0xdb8, 0, 0, 0, 0, 0, 1)); 110 ip: Ipv6Addr, 263 /// use std::net::{IpAddr, Ipv6Addr, SocketAddr}; 265 /// let socket = SocketAddr::new(IpAddr::V6(Ipv6Addr::new(0, 0, 0, 0, 0, 65535, 0, 1)), 8080); 383 /// [`IPv6` address]: Ipv6Addr 388 /// use std::net::{SocketAddrV6, Ipv6Addr}; [all...] |
H A D | mod.rs | 36 pub use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6}; 42 ip::{IpAddr, Ipv4Addr, Ipv6Addr, Ipv6MulticastScope},
|
H A D | sockopt.rs | 9 use crate::net::{Ipv4Addr, Ipv6Addr, SocketType}; 541 multiaddr: &Ipv6Addr, in set_ipv6_add_membership() 596 multiaddr: &Ipv6Addr, in set_ipv6_drop_membership()
|
/third_party/rust/crates/nix/src/sys/socket/ |
H A D | addr.rs | 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, in from_std() 519 InetAddr::V6(ref sa) => IpAddr::V6(Ipv6Addr(sa.sin6_addr)), 539 Ipv6Addr(sa.sin6_addr).to_std(), in 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)), in from_std() 651 // Use pass by reference for symmetry with Ipv6Addr 694 pub struct Ipv6Addr(pub libc::in6_addr); global() structure names 714 impl Ipv6Addr { global() impls [all...] |
H A D | mod.rs | 49 InetAddr, IpAddr, Ipv4Addr, Ipv6Addr, LinkAddr, SockaddrIn, SockaddrIn6, 59 InetAddr, IpAddr, Ipv4Addr, Ipv6Addr, SockaddrIn, SockaddrIn6, 549 pub const fn new(group: net::Ipv6Addr) -> Self {
|
/third_party/rust/crates/rustix/tests/net/ |
H A D | v6.rs | 8 accept, bind_v6, connect_v6, getsockname, listen, recv, send, socket, AddressFamily, Ipv6Addr, 24 let name = SocketAddrV6::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), 0, 0, 0); in server() 59 let addr = SocketAddrV6::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), port, 0, 0); in client()
|
H A D | poll.rs | 7 accept, bind_v6, connect_v6, getsockname, listen, recv, send, socket, AddressFamily, Ipv6Addr, 23 let name = SocketAddrV6::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), 0, 0, 0); in server() 71 let addr = SocketAddrV6::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), port, 0, 0); in client()
|
H A D | addr.rs | 6 Ipv4Addr, Ipv6Addr, SocketAddrAny, SocketAddrStorage, SocketAddrV4, SocketAddrV6, in encode_decode() 16 let orig = SocketAddrV6::new(Ipv6Addr::new(2, 3, 5, 6, 8, 9, 11, 12), 33, 34, 36); in encode_decode()
|
H A D | connect_bind_send.rs | 2 AddressFamily, Ipv6Addr, Protocol, RecvFlags, SendFlags, SocketAddrAny, SocketAddrV4, 42 let localhost = IpAddr::V6(Ipv6Addr::LOCALHOST); in net_v6_connect_any() 117 let localhost = IpAddr::V6(Ipv6Addr::LOCALHOST); in net_v6_connect() 192 let localhost = Ipv6Addr::LOCALHOST; in net_v6_bind_any() 269 let localhost = IpAddr::V6(Ipv6Addr::LOCALHOST); in net_v6_sendto() 349 let localhost = IpAddr::V6(Ipv6Addr::LOCALHOST); in net_v6_sendto_any() 438 let localhost = IpAddr::V6(Ipv6Addr::LOCALHOST); in net_v6_acceptfrom()
|
/third_party/rust/crates/rustix/src/backend/linux_raw/net/ |
H A D | read_sockaddr.rs | 7 use crate::net::{Ipv4Addr, Ipv6Addr, SocketAddrAny, SocketAddrUnix, SocketAddrV4, SocketAddrV6}; 78 Ipv6Addr::from(decode.sin6_addr.in6_u.u6_addr8), 146 Ipv6Addr::from(decode.sin6_addr.in6_u.u6_addr8),
|
H A D | syscalls.rs | 755 use crate::net::{Ipv4Addr, Ipv6Addr, SocketType}; 1165 multiaddr: &Ipv6Addr, 1185 multiaddr: &Ipv6Addr, 1218 fn to_ipv6mr(multiaddr: &Ipv6Addr, interface: u32) -> c::ipv6_mreq { in to_ipv6mr() 1226 fn to_ipv6mr_multiaddr(multiaddr: &Ipv6Addr) -> c::in6_addr { in to_ipv6mr_multiaddr()
|
/third_party/rust/crates/rustix/src/backend/libc/net/ |
H A D | read_sockaddr.rs | 8 use crate::net::{Ipv4Addr, Ipv6Addr, SocketAddrAny, SocketAddrV4, SocketAddrV6}; 129 Ipv6Addr::from(s6_addr), 222 Ipv6Addr::from(in6_addr_s6_addr(decode.sin6_addr)), in inner_read_sockaddr_os()
|
H A D | syscalls.rs | 397 use crate::net::{Ipv4Addr, Ipv6Addr, SocketType}; 736 multiaddr: &Ipv6Addr, 783 multiaddr: &Ipv6Addr, 841 fn to_ipv6mr(multiaddr: &Ipv6Addr, interface: u32) -> c::ipv6_mreq { in to_ipv6mr() 849 fn to_ipv6mr_multiaddr(multiaddr: &Ipv6Addr) -> c::in6_addr { in to_ipv6mr_multiaddr()
|
/third_party/rust/crates/serde/test_suite/tests/ |
H A D | test_ser.rs | 696 &"::1".parse::<net::Ipv6Addr>().unwrap().readable(), in test_net_ipv6addr_readable() 749 &net::Ipv6Addr::from(*b"1234567890123456").compact(), in test_net_ipv6addr_compact() 803 &net::SocketAddrV6::new(net::Ipv6Addr::from(*b"1234567890123456"), 1234, 0, 0).compact(), in test_net_socketaddr_compact()
|
H A D | test_de.rs | 2122 "::1".parse::<net::Ipv6Addr>().unwrap().readable(), in test_net_ipv6addr_readable() 2175 net::Ipv6Addr::from(*b"1234567890123456").compact(), in test_net_ipv6addr_compact() 2244 net::SocketAddrV6::new(net::Ipv6Addr::from(*b"1234567890123456"), 1234, 0, 0).compact(), in test_net_socketaddr_compact()
|
/third_party/rust/crates/nix/test/sys/ |
H A D | test_socket.rs | 12 use std::net::{self, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6}; 139 let ip: Ipv6Addr = "fe80::1".parse().unwrap(); in test_inetv6_addr_roundtrip_sockaddr_storage_to_addr() 706 let addr = std::net::Ipv6Addr::from_str("::1").unwrap(); in udp_inet6() 2489 std::net::Ipv6Addr::LOCALHOST.octets() in test_recverr_v6()
|
/third_party/rust/crates/serde/serde/src/ser/ |
H A D | impls.rs | 873 impl Serialize for net::Ipv6Addr {
|
/third_party/rust/crates/serde/serde/src/de/ |
H A D | impls.rs | 1623 net::Ipv6Addr, "IPv6 address", 16
|