| /webrtc/stun/src/ |
| H A D | addr.rs | 9 use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; 23 pub ip: IpAddr, 30 IpAddr::V4(_) => FAMILY_IPV4, in fmt() 31 IpAddr::V6(_) => FAMILY_IPV6, in fmt() 44 ip: IpAddr::V4(Ipv4Addr::from(0)), in default() 82 self.ip = IpAddr::V6(Ipv6Addr::from(ip)); in get_from_as() 87 self.ip = IpAddr::V4(Ipv4Addr::from(ip)); in get_from_as() 96 IpAddr::V4(_) => FAMILY_IPV4, in add_to_as() 97 IpAddr::V6(_) => FAMILY_IPV6, in add_to_as() 106 IpAddr::V4(ipv4) => value.extend_from_slice(&ipv4.octets()), in add_to_as() [all …]
|
| H A D | xoraddr.rs | 12 use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; 70 pub ip: IpAddr, 77 ip: IpAddr::V4(Ipv4Addr::from(0)), in default() 86 IpAddr::V4(_) => FAMILY_IPV4, in fmt() 87 IpAddr::V6(_) => FAMILY_IPV6, in fmt() 119 IpAddr::V4(ipv4) => (FAMILY_IPV4, IPV4LEN, ipv4.octets().to_vec()), in add_to_as() 120 IpAddr::V6(ipv6) => (FAMILY_IPV6, IPV6LEN, ipv6.octets().to_vec()), in add_to_as() 165 self.ip = IpAddr::V6(Ipv6Addr::from(ip)); in get_from_as() 169 self.ip = IpAddr::V4(Ipv4Addr::from(ip)); in get_from_as()
|
| /webrtc/ice/src/external_ip_mapper/ |
| H A D | mod.rs | 8 use std::net::IpAddr; 10 pub(crate) fn validate_ip_string(ip_str: &str) -> Result<IpAddr> { in validate_ip_string() argument 20 ip_sole: Option<IpAddr>, // when non-nil, this is the sole external IP for one local IP assumed 21 ip_map: HashMap<String, IpAddr>, // local-to-external IP mapping (k: local, v: external) 25 pub(crate) fn set_sole_ip(&mut self, ip: IpAddr) -> Result<()> { in set_sole_ip() 35 pub(crate) fn add_ip_mapping(&mut self, loc_ip: IpAddr, ext_ip: IpAddr) -> Result<()> { in add_ip_mapping() argument 52 pub(crate) fn find_external_ip(&self, loc_ip: IpAddr) -> Result<IpAddr> { in find_external_ip() argument 124 pub(crate) fn find_external_ip(&self, local_ip_str: &str) -> Result<IpAddr> { in find_external_ip() argument
|
| /webrtc/turn/src/proto/ |
| H A D | peeraddr.rs | 5 use std::net::{IpAddr, Ipv4Addr}; 19 pub ip: IpAddr, 26 ip: IpAddr::V4(Ipv4Addr::from(0)), in default() 35 IpAddr::V4(_) => write!(f, "{}:{}", self.ip, self.port), in fmt() 36 IpAddr::V6(_) => write!(f, "[{}]:{}", self.ip, self.port), in fmt()
|
| H A D | relayaddr.rs | 5 use std::net::{IpAddr, Ipv4Addr}; 18 pub ip: IpAddr, 25 ip: IpAddr::V4(Ipv4Addr::from(0)), in default() 34 IpAddr::V4(_) => write!(f, "{}:{}", self.ip, self.port), in fmt() 35 IpAddr::V6(_) => write!(f, "[{}]:{}", self.ip, self.port), in fmt()
|
| H A D | addr.rs | 6 use std::net::{IpAddr, Ipv4Addr, SocketAddr}; 11 ip: IpAddr, 18 ip: IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), in default()
|
| /webrtc/turn/src/proto/addr/ |
| H A D | addr_test.rs | 8 let u = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 1234); in test_addr_from_socket_addr() 23 ip: IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), in test_addr_equal_ip() 27 ip: IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), in test_addr_equal_ip() 89 ip: IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), in test_five_tuple_string() 93 ip: IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), in test_five_tuple_string()
|
| /webrtc/util/src/vnet/ |
| H A D | chunk.rs | 8 use std::net::{IpAddr, SocketAddr}; 96 fn get_source_ip(&self) -> IpAddr; // used by routee in get_source_ip() argument 97 fn get_destination_ip(&self) -> IpAddr; // used by router in get_destination_ip() argument 112 pub(crate) source_ip: IpAddr, 113 pub(crate) destination_ip: IpAddr, 127 fn get_destination_ip(&self) -> IpAddr { in get_destination_ip() argument 131 fn get_source_ip(&self) -> IpAddr { in get_source_ip() argument 170 fn get_destination_ip(&self) -> IpAddr { in get_destination_ip() argument 174 fn get_source_ip(&self) -> IpAddr { in get_source_ip() argument 277 fn get_destination_ip(&self) -> IpAddr { in get_destination_ip() argument [all …]
|
| H A D | resolver.rs | 8 use std::net::IpAddr; 17 hosts: HashMap<String, IpAddr>, 41 let ip = IpAddr::from_str(&ip_addr)?; in add_host() 50 ) -> Pin<Box<dyn Future<Output = Option<IpAddr>> + Send + 'static>> { in lookup()
|
| H A D | net.rs | 15 use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr}; 82 fn determine_source_ip(&self, loc_ip: IpAddr, dst_ip: IpAddr) -> Option<IpAddr> { in determine_source_ip() argument 88 let src_ip = if let Ok(src_ip) = IpAddr::from_str("127.0.0.1") { in determine_source_ip() 113 pub(crate) static_ips: Vec<IpAddr>, // read-only 173 async fn get_static_ips(&self) -> Vec<IpAddr> { in get_static_ips() argument 184 pub(crate) fn get_all_ipaddrs(&self, ipv6: bool) -> Vec<IpAddr> { in get_all_ipaddrs() argument 199 pub(crate) fn has_ipaddr(&self, ip: IpAddr) -> bool { in has_ipaddr() 228 pub(crate) async fn allocate_local_addr(&self, ip: IpAddr, port: u16) -> Result<()> { in allocate_local_addr() argument 281 let ip: IpAddr = match host.parse() { in resolve_addr() 424 if let Ok(ip) = IpAddr::from_str(ip_str) { in new() [all …]
|
| H A D | router.rs | 16 use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr}; 68 async fn get_static_ips(&self) -> Vec<IpAddr>; in get_static_ips() argument 96 static_ips: Vec<IpAddr>, // read-only 97 static_local_ips: HashMap<String, IpAddr>, // read-only, 150 async fn get_static_ips(&self) -> Vec<IpAddr> { in get_static_ips() argument 249 if let Ok(ip) = IpAddr::from_str(ip_pair[0]) { in new() 563 fn assign_ip_address(&mut self) -> Result<IpAddr> { in assign_ip_address() argument 572 IpAddr::V4(ipv4) => { in assign_ip_address() 575 Ok(IpAddr::V4(Ipv4Addr::from(ip))) in assign_ip_address() 577 IpAddr::V6(ipv6) => { in assign_ip_address() [all …]
|
| H A D | nat.rs | 9 use std::net::IpAddr; 64 pub(crate) mapped_ips: Vec<IpAddr>, // mapped IPv4 65 pub(crate) local_ips: Vec<IpAddr>, // local IPv4, required only when the mode is NATModeNAT1To1 95 pub(crate) mapped_ips: Vec<IpAddr>, // mapped IPv4 96 pub(crate) local_ips: Vec<IpAddr>, // local IPv4, required only when the mode is NATModeNAT1To1 138 pub(crate) fn get_paired_mapped_ip(&self, loc_ip: &IpAddr) -> Option<&IpAddr> { in get_paired_mapped_ip() argument 147 pub(crate) fn get_paired_local_ip(&self, mapped_ip: &IpAddr) -> Option<&IpAddr> { in get_paired_local_ip() argument
|
| H A D | conn.rs | 9 use std::net::{IpAddr, SocketAddr}; 23 fn determine_source_ip(&self, loc_ip: IpAddr, dst_ip: IpAddr) -> Option<IpAddr>; in determine_source_ip() argument
|
| /webrtc/util/src/vnet/resolver/ |
| H A D | resolver_test.rs | 12 let ip = IpAddr::from_str(ip_addr)?; in test_resolver_standalone() 22 let ip = IpAddr::from_str(ip_addr)?; in test_resolver_standalone() 42 let ip0 = IpAddr::from_str(ip_addr0)?; in test_resolver_cascaded() 49 let ip1 = IpAddr::from_str(ip_addr1)?; in test_resolver_cascaded()
|
| /webrtc/util/src/vnet/nat/ |
| H A D | nat_test.rs | 16 mapped_ips: vec![IpAddr::from_str(DEMO_IP)?], in test_nat_type_default() 50 mapped_ips: vec![IpAddr::from_str(DEMO_IP)?], in test_nat_mapping_behavior_full_cone_nat() 111 mapped_ips: vec![IpAddr::from_str(DEMO_IP)?], in test_nat_mapping_behavior_addr_restricted_cone_nat() 190 mapped_ips: vec![IpAddr::from_str(DEMO_IP)?], in test_nat_mapping_behavior_port_restricted_cone_nat() 269 mapped_ips: vec![IpAddr::from_str(DEMO_IP)?], in test_nat_mapping_behavior_symmetric_nat_addr_dependent_mapping() 321 mapped_ips: vec![IpAddr::from_str(DEMO_IP)?], in test_nat_mapping_behavior_symmetric_nat_port_dependent_mapping() 373 mapped_ips: vec![IpAddr::from_str(DEMO_IP)?], in test_nat_mapping_timeout_refresh_on_outbound() 438 mapped_ips: vec![IpAddr::from_str(DEMO_IP)?], in test_nat_mapping_timeout_outbound_detects_timeout() 525 mapped_ips: vec![IpAddr::from_str(DEMO_IP)?, IpAddr::from_str("1.2.3.5")?], in test_nat1to1_bahavior_more_mapping() 526 local_ips: vec![IpAddr::from_str("10.0.0.1")?, IpAddr::from_str("10.0.0.2")?], in test_nat1to1_bahavior_more_mapping() [all …]
|
| /webrtc/ice/src/network_type/ |
| H A D | network_type_test.rs | 6 let ipv4: IpAddr = "192.168.0.1".parse().unwrap(); in test_network_type_parsing_success() 7 let ipv6: IpAddr = "fe80::a3:6ff:fec4:5454".parse().unwrap(); in test_network_type_parsing_success() 30 let ipv6: IpAddr = "fe80::a3:6ff:fec4:5454".parse().unwrap(); in test_network_type_parsing_failure()
|
| H A D | mod.rs | 8 use std::net::IpAddr; 129 pub(crate) fn determine_network_type(network: &str, ip: &IpAddr) -> Result<NetworkType> { in determine_network_type()
|
| /webrtc/turn/src/relay/ |
| H A D | relay_static.rs | 5 use std::net::IpAddr; 12 pub relay_address: IpAddr,
|
| H A D | relay_range.rs | 5 use std::net::IpAddr; 11 pub relay_address: IpAddr,
|
| /webrtc/turn/src/auth/ |
| H A D | auth_test.rs | 43 use std::net::IpAddr; in test_new_long_term_auth_handler() 63 relay_address: IpAddr::from_str("127.0.0.1")?, in test_new_long_term_auth_handler()
|
| /webrtc/ice/src/util/ |
| H A D | mod.rs | 9 use std::net::{IpAddr, SocketAddr}; 15 pub fn create_addr(_network: NetworkType, ip: IpAddr, port: u16) -> SocketAddr { in create_addr() argument 95 ) -> HashSet<IpAddr> { in local_interfaces() argument
|
| /webrtc/turn/src/proto/peeraddr/ |
| H A D | peeraddr_test.rs | 9 ip: IpAddr::V4(Ipv4Addr::new(111, 11, 1, 2)), in test_peer_address()
|
| /webrtc/turn/src/proto/relayaddr/ |
| H A D | relayaddr_test.rs | 9 ip: IpAddr::V4(Ipv4Addr::new(111, 11, 1, 2)), in test_relayed_address()
|
| /webrtc/stun/src/xoraddr/ |
| H A D | xoraddr_test.rs | 109 let expected_ip: IpAddr = "213.141.156.236".parse().unwrap(); in test_xormapped_address_get_from_invalid() 139 let expected_ip: IpAddr = "213.141.156.236".parse().unwrap(); in test_xormapped_address_add_to() 171 let expected_ip: IpAddr = "fe80::dc2b:44ff:fe20:6009".parse().unwrap(); in test_xormapped_address_add_to_ipv6()
|
| /webrtc/util/src/vnet/conn/ |
| H A D | conn_test.rs | 31 fn determine_source_ip(&self, loc_ip: IpAddr, _dst_ip: IpAddr) -> Option<IpAddr> { in determine_source_ip() argument
|