Home
last modified time | relevance | path

Searched refs:Ipv4Addr (Results 1 - 20 of 20) sorted by relevance

/third_party/rust/crates/rustix/src/net/
H A Dip.rs7 //! 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};
27 /// let localhost_v4 = IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1));
41 V4(#[cfg_attr(staged_api, stable(feature = "ip_addr", since = "1.7.0"))] Ipv4Addr),
58 /// `Ipv4Addr` provides a [`FromStr`] implementation. The four octets are in decimal
69 /// use std::net::Ipv4Addr;
71 /// let localhost = Ipv4Addr::new(127, 0, 0, 1);
74 /// assert!("012.004.002.000".parse::<Ipv4Addr>().is_err()); // all octets are in octal
75 /// assert!("0000000.0.0.0".parse::<Ipv4Addr>()
80 pub struct Ipv4Addr { global() structure names
466 impl Ipv4Addr { global() impls
[all...]
H A Dsockopt.rs9 use crate::net::{Ipv4Addr, Ipv6Addr, SocketType};
512 multiaddr: &Ipv4Addr, in set_ip_add_membership()
513 interface: &Ipv4Addr, in set_ip_add_membership()
567 multiaddr: &Ipv4Addr, in set_ip_drop_membership()
568 interface: &Ipv4Addr, in set_ip_drop_membership()
H A Daddr.rs12 use crate::net::ip::{IpAddr, Ipv4Addr, Ipv6Addr};
30 /// use std::net::{IpAddr, Ipv4Addr, SocketAddr};
32 /// let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);
61 /// [`IPv4` address]: Ipv4Addr
66 /// use std::net::{Ipv4Addr, SocketAddrV4};
68 /// let socket = SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 8080);
71 /// assert_eq!(socket.ip(), &Ipv4Addr::new(127, 0, 0, 1));
77 ip: Ipv4Addr,
124 /// use std::net::{IpAddr, Ipv4Addr, SocketAddr};
126 /// let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr
[all...]
H A Dmod.rs36 pub use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6};
42 ip::{IpAddr, Ipv4Addr, Ipv6Addr, Ipv6MulticastScope},
/third_party/rust/crates/nix/src/sys/socket/
H A Daddr.rs41 /// Convert a std::net::Ipv4Addr into the libc form.
43 pub(crate) const fn ipv4addr_to_libc(addr: net::Ipv4Addr) -> libc::in_addr {
44 static_assertions::assert_eq_size!(net::Ipv4Addr, libc::in_addr);
472 sin_addr: Ipv4Addr::from_std(addr.ip()).0, in from_std()
518 InetAddr::V4(ref sa) => IpAddr::V4(Ipv4Addr(sa.sin_addr)),
535 Ipv4Addr(sa.sin_addr).to_std(), in to_std()
575 V4(Ipv4Addr),
586 IpAddr::V4(Ipv4Addr::new(a, b, c, d))
600 net::IpAddr::V4(ref std) => IpAddr::V4(Ipv4Addr::from_std(std)), in from_std()
625 * ===== Ipv4Addr
636 pub struct Ipv4Addr(pub libc::in_addr); global() structure names
640 impl Ipv4Addr { global() impls
[all...]
H A Dmod.rs49 InetAddr, IpAddr, Ipv4Addr, Ipv6Addr, LinkAddr, SockaddrIn, SockaddrIn6,
59 InetAddr, IpAddr, Ipv4Addr, Ipv6Addr, SockaddrIn, SockaddrIn6,
525 /// If `interface` is `None`, then `Ipv4Addr::any()` will be used for the interface.
526 pub fn new(group: net::Ipv4Addr, interface: Option<net::Ipv4Addr>) in new()
530 None => net::Ipv4Addr::UNSPECIFIED, in new()
/third_party/rust/crates/quote/tests/ui/
H A Dnot-repeatable.rs3 struct Ipv4Addr; structure names
6 let ip = Ipv4Addr; in main()
H A Dnot-quotable.rs2 use std::net::Ipv4Addr;
5 let ip = Ipv4Addr::LOCALHOST; in main()
/third_party/rust/crates/rustix/tests/net/
H A Dv4.rs8 accept, bind_v4, connect_v4, getsockname, listen, recv, send, socket, AddressFamily, Ipv4Addr,
20 let name = SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 0); in server()
55 let addr = SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), port); in client()
H A Daddr.rs6 Ipv4Addr, Ipv6Addr, SocketAddrAny, SocketAddrStorage, SocketAddrV4, SocketAddrV6, in encode_decode()
10 let orig = SocketAddrV4::new(Ipv4Addr::new(2, 3, 5, 6), 33); in encode_decode()
H A Dconnect_bind_send.rs5 use std::net::{IpAddr, Ipv4Addr, SocketAddr};
10 let localhost = IpAddr::V4(Ipv4Addr::LOCALHOST); in net_v4_connect_any()
81 let localhost = IpAddr::V4(Ipv4Addr::LOCALHOST); in net_v4_connect()
160 let localhost = Ipv4Addr::LOCALHOST; in net_v4_bind_any()
231 let localhost = IpAddr::V4(Ipv4Addr::LOCALHOST); in net_v4_sendto()
314 let localhost = IpAddr::V4(Ipv4Addr::LOCALHOST); in net_v4_sendto_any()
391 let localhost = IpAddr::V4(Ipv4Addr::LOCALHOST); in net_v4_acceptfrom()
/third_party/rust/crates/rustix/tests/io/
H A Depoll.rs7 accept, bind_v4, connect_v4, getsockname, listen, socket, AddressFamily, Ipv4Addr, Protocol,
18 bind_v4(&listen_sock, &SocketAddrV4::new(Ipv4Addr::LOCALHOST, 0)).unwrap(); in server()
72 let addr = SocketAddrV4::new(Ipv4Addr::LOCALHOST, port); in client()
/third_party/rust/crates/rustix/src/backend/linux_raw/net/
H A Dread_sockaddr.rs7 use crate::net::{Ipv4Addr, Ipv6Addr, SocketAddrAny, SocketAddrUnix, SocketAddrV4, SocketAddrV6};
68 Ipv4Addr::from(u32::from_be(decode.sin_addr.s_addr)),
138 Ipv4Addr::from(u32::from_be(decode.sin_addr.s_addr)),
H A Dsyscalls.rs755 use crate::net::{Ipv4Addr, Ipv6Addr, SocketType};
1155 multiaddr: &Ipv4Addr,
1156 interface: &Ipv4Addr,
1175 multiaddr: &Ipv4Addr,
1176 interface: &Ipv4Addr,
1203 fn to_imr(multiaddr: &Ipv4Addr, interface: &Ipv4Addr) -> c::ip_mreq { in to_imr()
1211 fn to_imr_addr(addr: &Ipv4Addr) -> c::in_addr { in to_imr_addr()
/third_party/rust/crates/rustix/src/backend/libc/net/
H A Dsyscalls.rs397 use crate::net::{Ipv4Addr, Ipv6Addr, SocketType};
726 multiaddr: &Ipv4Addr,
727 interface: &Ipv4Addr,
773 multiaddr: &Ipv4Addr,
774 interface: &Ipv4Addr,
828 fn to_imr(multiaddr: &Ipv4Addr, interface: &Ipv4Addr) -> c::ip_mreq { in to_imr()
836 fn to_imr_addr(addr: &Ipv4Addr) -> c::in_addr { in to_imr_addr()
H A Dread_sockaddr.rs8 use crate::net::{Ipv4Addr, Ipv6Addr, SocketAddrAny, SocketAddrV4, SocketAddrV6};
111 Ipv4Addr::from(u32::from_be(in_addr_s_addr(decode.sin_addr))),
214 Ipv4Addr::from(u32::from_be(in_addr_s_addr(decode.sin_addr))), in inner_read_sockaddr_os()
/third_party/rust/crates/serde/test_suite/tests/
H A Dtest_ser.rs688 &"1.2.3.4".parse::<net::Ipv4Addr>().unwrap().readable(), in test_net_ipv4addr_readable()
737 &net::Ipv4Addr::from(*b"1234").compact(), in test_net_ipv4addr_compact()
792 &net::SocketAddrV4::new(net::Ipv4Addr::from(*b"1234"), 1234).compact(), in test_net_socketaddr_compact()
H A Dtest_de.rs2114 "1.2.3.4".parse::<net::Ipv4Addr>().unwrap().readable(), in test_net_ipv4addr_readable()
2163 net::Ipv4Addr::from(*b"1234").compact(), in test_net_ipv4addr_compact()
2233 net::SocketAddrV4::new(net::Ipv4Addr::from(*b"1234"), 1234).compact(), in test_net_socketaddr_compact()
/third_party/rust/crates/serde/serde/src/ser/
H A Dimpls.rs848 impl Serialize for net::Ipv4Addr {
/third_party/rust/crates/serde/serde/src/de/
H A Dimpls.rs1617 net::Ipv4Addr, "IPv4 address", 4

Completed in 18 milliseconds