Home
last modified time | relevance | path

Searched refs:IpAddr (Results 1 – 17 of 17) sorted by relevance

/third_party/rust/crates/rustix/src/net/
Dip.rs38 pub enum IpAddr { enum
221 impl IpAddr { implementation
244 IpAddr::V4(ip) => ip.is_unspecified(), in is_unspecified()
245 IpAddr::V6(ip) => ip.is_unspecified(), in is_unspecified()
271 IpAddr::V4(ip) => ip.is_loopback(), in is_loopback()
272 IpAddr::V6(ip) => ip.is_loopback(), in is_loopback()
300 IpAddr::V4(ip) => ip.is_global(), in is_global()
301 IpAddr::V6(ip) => ip.is_global(), in is_global()
327 IpAddr::V4(ip) => ip.is_multicast(), in is_multicast()
328 IpAddr::V6(ip) => ip.is_multicast(), in is_multicast()
[all …]
Daddr.rs12 use crate::net::ip::{IpAddr, Ipv4Addr, Ipv6Addr};
136 pub const fn new(ip: IpAddr, port: u16) -> SocketAddr { in new() argument
138 IpAddr::V4(a) => SocketAddr::V4(SocketAddrV4::new(a, port)), in new()
139 IpAddr::V6(a) => SocketAddr::V6(SocketAddrV6::new(a, port, 0, 0)), in new()
159 pub const fn ip(&self) -> IpAddr { in ip() argument
161 SocketAddr::V4(ref a) => IpAddr::V4(*a.ip()), in ip()
162 SocketAddr::V6(ref a) => IpAddr::V6(*a.ip()), in ip()
178 pub fn set_ip(&mut self, new_ip: IpAddr) { in set_ip() argument
181 (&mut SocketAddr::V4(ref mut a), IpAddr::V4(new_ip)) => a.set_ip(new_ip), in set_ip()
182 (&mut SocketAddr::V6(ref mut a), IpAddr::V6(new_ip)) => a.set_ip(new_ip), in set_ip()
[all …]
Dmod.rs36 pub use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6};
42 ip::{IpAddr, Ipv4Addr, Ipv6Addr, Ipv6MulticastScope},
/third_party/rust/crates/rust-openssl/openssl/src/ssl/
Dconnector.rs14 use std::net::IpAddr;
183 if self.sni && domain.parse::<IpAddr>().is_err() { in into_ssl()
416 use std::net::IpAddr;
503 match domain.parse::<IpAddr>() {
505 .parse::<IpAddr>()
568 fn matches_ip(expected: &IpAddr, actual: &[u8]) -> bool {
570 IpAddr::V4(ref addr) => actual == addr.octets(),
571 IpAddr::V6(ref addr) => actual == addr.octets(),
/third_party/rust/crates/rustix/tests/net/
Dconnect_bind_send.rs5 use std::net::{IpAddr, Ipv4Addr, SocketAddr};
10 let localhost = IpAddr::V4(Ipv4Addr::LOCALHOST); in net_v4_connect_any()
42 let localhost = IpAddr::V6(Ipv6Addr::LOCALHOST); in net_v6_connect_any()
81 let localhost = IpAddr::V4(Ipv4Addr::LOCALHOST); in net_v4_connect()
117 let localhost = IpAddr::V6(Ipv6Addr::LOCALHOST); in net_v6_connect()
231 let localhost = IpAddr::V4(Ipv4Addr::LOCALHOST); in net_v4_sendto()
269 let localhost = IpAddr::V6(Ipv6Addr::LOCALHOST); in net_v6_sendto()
314 let localhost = IpAddr::V4(Ipv4Addr::LOCALHOST); in net_v4_sendto_any()
349 let localhost = IpAddr::V6(Ipv6Addr::LOCALHOST); in net_v6_sendto_any()
391 let localhost = IpAddr::V4(Ipv4Addr::LOCALHOST); in net_v4_acceptfrom()
[all …]
/third_party/rust/crates/rust-openssl/openssl/src/x509/
Dverify.rs4 use std::net::IpAddr;
136 pub fn set_ip(&mut self, ip: IpAddr) -> Result<(), ErrorStack> { in set_ip()
140 IpAddr::V4(addr) => { in set_ip()
144 IpAddr::V6(addr) => { in set_ip()
Dmod.rs20 use std::net::IpAddr;
2026 pub(crate) fn new_ip(ip: IpAddr) -> Result<GeneralName, ErrorStack> { in new_ip()
2028 IpAddr::V4(addr) => unsafe { in new_ip()
2031 IpAddr::V6(addr) => unsafe { in new_ip()
2173 .map(IpAddr::from) in fmt()
2174 .or_else(|_| <[u8; 4]>::try_from(ipaddress).map(IpAddr::from)); in fmt()
Dtests.rs1077 T: Into<std::net::IpAddr>, in ipaddress_as_subject_alternative_name_is_formatted_in_debug() argument
/third_party/rust/crates/nix/src/sys/socket/
Daddr.rs495 pub fn new(ip: IpAddr, port: u16) -> InetAddr {
497 IpAddr::V4(ref ip) => {
505 IpAddr::V6(ref ip) => {
516 pub const fn ip(&self) -> IpAddr {
518 InetAddr::V4(ref sa) => IpAddr::V4(Ipv4Addr(sa.sin_addr)),
519 InetAddr::V6(ref sa) => IpAddr::V6(Ipv6Addr(sa.sin6_addr)),
574 pub enum IpAddr {
581 impl IpAddr { impl
585 pub const fn new_v4(a: u8, b: u8, c: u8, d: u8) -> IpAddr {
586 IpAddr::V4(Ipv4Addr::new(a, b, c, d))
[all …]
Dmod.rs49 InetAddr, IpAddr, Ipv4Addr, Ipv6Addr, LinkAddr, SockaddrIn, SockaddrIn6,
59 InetAddr, IpAddr, Ipv4Addr, Ipv6Addr, SockaddrIn, SockaddrIn6,
/third_party/rust/crates/serde/test_suite/tests/
Dtest_roundtrip.rs12 &net::IpAddr::from(*b"1234").compact(), in ip_addr_roundtrip()
Dtest_ser.rs674 &"1.2.3.4".parse::<net::IpAddr>().unwrap().readable(), in test_net_ipaddr_readable()
731 &net::IpAddr::from(*b"1234").compact(), in test_net_ipaddr_compact()
Dtest_de.rs2055 "1.2.3.4".parse::<net::IpAddr>().unwrap().readable(), in test_net_ipaddr_readable()
2112 net::IpAddr::from(*b"1234").compact(), in test_net_ipaddr_compact()
/third_party/rust/crates/serde/serde/src/ser/
Dimpls.rs654 impl Serialize for net::IpAddr { implementation
661 net::IpAddr::V4(ref a) => a.serialize(serializer), in serialize()
662 net::IpAddr::V6(ref a) => a.serialize(serializer), in serialize()
666 net::IpAddr::V4(ref a) => { in serialize()
669 net::IpAddr::V6(ref a) => { in serialize()
/third_party/rust/crates/clap/examples/
Dtyped-derive.rs18 bind: Option<std::net::IpAddr>,
/third_party/rust/crates/serde/serde/src/de/
Dimpls.rs1554 impl<'de> Deserialize<'de> for net::IpAddr { implementation
1562 use lib::net::IpAddr; in deserialize()
1564 IpAddr IpAddrKind (V4; b"V4"; 0, V6; b"V6"; 1) in deserialize()
/third_party/rust/crates/nix/
DCHANGELOG.md248 - Deprecated `IpAddr`, `Ipv4Addr`, and `Ipv6Addr` in favor of their equivalents
879 - Added `from_std` and `to_std` methods for `sys::socket::IpAddr`