Home
last modified time | relevance | path

Searched refs:ip (Results 1 – 25 of 55) sorted by relevance

123

/webrtc/stun/src/
H A Daddr.rs23 pub ip: IpAddr, field
29 let family = match self.ip { in fmt()
34 write!(f, "{}:{}", self.ip, self.port) in fmt()
36 write!(f, "[{}]:{}", self.ip, self.port) in fmt()
44 ip: IpAddr::V4(Ipv4Addr::from(0)), in default()
79 let mut ip = [0; IPV6LEN]; in get_from_as() localVariable
82 self.ip = IpAddr::V6(Ipv6Addr::from(ip)); in get_from_as()
84 let mut ip = [0; IPV4LEN]; in get_from_as() localVariable
87 self.ip = IpAddr::V4(Ipv4Addr::from(ip)); in get_from_as()
95 let family = match self.ip { in add_to_as()
[all …]
H A Dxoraddr.rs70 pub ip: IpAddr, field
77 ip: IpAddr::V4(Ipv4Addr::from(0)), in default()
85 let family = match self.ip { in fmt()
90 write!(f, "{}:{}", self.ip, self.port) in fmt()
92 write!(f, "[{}]:{}", self.ip, self.port) in fmt()
118 let (family, ip_len, ip) = match self.ip { in add_to_as()
163 let mut ip = [0; IPV6LEN]; in get_from_as() localVariable
164 xor_bytes(&mut ip, &v[4..], &xor_value); in get_from_as()
165 self.ip = IpAddr::V6(Ipv6Addr::from(ip)); in get_from_as()
167 let mut ip = [0; IPV4LEN]; in get_from_as() localVariable
[all …]
/webrtc/stun/src/addr/
H A Daddr_test.rs8 ip: "122.12.34.5".parse().unwrap(), in test_mapped_address()
21 assert_eq!(got.ip, addr.ip, "got bad IP: {}", got.ip); in test_mapped_address()
70 ip: "::".parse().unwrap(), in test_mapped_address_v6()
82 assert_eq!(got.ip, addr.ip, "got bad IP: {}", got.ip); in test_mapped_address_v6()
109 ip: "122.12.34.5".parse().unwrap(), in test_alternate_server()
121 assert_eq!(got.ip, addr.ip, "got bad IP: {}", got.ip); in test_alternate_server()
149 ip: "122.12.34.5".parse().unwrap(), in test_other_address()
161 assert_eq!(got.ip, addr.ip, "got bad IP: {}", got.ip); in test_other_address()
/webrtc/ice/src/udp_mux/
H A Dsocket_addr_ext.rs37 let ip: [u8; 4] = addr.ip().octets(); in encode() localVariable
41 buffer[1..5].copy_from_slice(&ip); in encode()
48 let ip: [u8; 16] = addr.ip().octets(); in encode() localVariable
54 buffer[1..17].copy_from_slice(&ip); in encode()
113 ip, port, flowinfo, scope_id, in decode()
131 let encoded_len = ip.encode(&mut buffer); in test_ipv4()
141 assert_eq!(decoded, Ok(ip)); in test_ipv4()
156 let encoded_len = ip.encode(&mut buffer); in test_ipv6()
198 assert_eq!(decoded, Ok(ip)); in test_ipv6()
206 let result = ip.encode(&mut buffer); in test_encode_ipv4_with_short_buffer()
[all …]
/webrtc/turn/src/proto/
H A Dpeeraddr.rs19 pub ip: IpAddr, field
26 ip: IpAddr::V4(Ipv4Addr::from(0)), in default()
34 match self.ip { in fmt()
35 IpAddr::V4(_) => write!(f, "{}:{}", self.ip, self.port), in fmt()
36 IpAddr::V6(_) => write!(f, "[{}]:{}", self.ip, self.port), in fmt()
45 ip: self.ip, in add_to()
57 self.ip = a.ip; in get_from()
H A Drelayaddr.rs18 pub ip: IpAddr, field
25 ip: IpAddr::V4(Ipv4Addr::from(0)), in default()
33 match self.ip { in fmt()
34 IpAddr::V4(_) => write!(f, "{}:{}", self.ip, self.port), in fmt()
35 IpAddr::V6(_) => write!(f, "[{}]:{}", self.ip, self.port), in fmt()
44 ip: self.ip, in add_to()
56 self.ip = a.ip; in get_from()
H A Daddr.rs11 ip: IpAddr, field
18 ip: IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), in default()
26 write!(f, "{}:{}", self.ip, self.port) in fmt()
38 let ip = n.ip(); in from_socket_addr() localVariable
41 Addr { ip, port } in from_socket_addr()
46 self.ip == other.ip in equal_ip()
/webrtc/stun/src/xoraddr/
H A Dxoraddr_test.rs44 ip: "0.0.0.0".parse().unwrap(), in test_xormapped_address_get_from()
49 addr.ip.to_string(), in test_xormapped_address_get_from()
52 addr.ip in test_xormapped_address_get_from()
112 ip: "0.0.0.0".parse().unwrap(), in test_xormapped_address_get_from_invalid()
118 addr.ip = expected_ip; in test_xormapped_address_get_from_invalid()
152 addr.ip, expected_ip, in test_xormapped_address_add_to()
154 addr.ip, expected_ip in test_xormapped_address_add_to()
191 got_addr.ip, expected_ip, in test_xormapped_address_add_to_ipv6()
193 got_addr.ip, expected_ip in test_xormapped_address_add_to_ipv6()
238 for (addr, ip) in tests { in test_xormapped_address_string()
[all …]
/webrtc/util/src/vnet/
H A Dconn_map.rs32 if addr.ip().is_unspecified() { in insert()
38 if laddr.ip().is_unspecified() || laddr.ip() == addr.ip() { in insert()
55 if addr.ip().is_unspecified() { in find()
71 if laddr.ip().is_unspecified() || laddr.ip() == addr.ip() { in find()
84 if !addr.ip().is_unspecified() { in delete()
87 if laddr.ip().is_unspecified() { in delete()
92 if laddr.ip() == addr.ip() { in delete()
H A Dnet.rs204 match ip.to_string().as_str() { in has_ipaddr()
216 if loc_ip == ip { in has_ipaddr()
231 if ip.is_unspecified() { in allocate_local_addr()
233 } else if self.has_ipaddr(ip) { in allocate_local_addr()
234 ips.push(ip); in allocate_local_addr()
281 let ip: IpAddr = match host.parse() { in resolve_addr() localVariable
282 Ok(ip) => ip, in resolve_addr()
298 ip in resolve_addr()
328 if !self.has_ipaddr(local_addr.ip()) { in bind()
425 static_ips.push(ip); in new()
[all …]
H A Drouter.rs177 let ip = ifc_addr.addr(); in set_router() localVariable
178 mapped_ips.push(ip); in set_router()
257 static_ips.push(ip); in new()
263 static_ips.push(ip); in new()
538 ips.push(ip); in add_nic()
542 for ip in &ips { in add_nic()
543 if !self.ipv4net.contains(ip) { in add_nic()
549 ip, in add_nic()
573 let mut ip = ipv4.octets(); in assign_ip_address() localVariable
574 ip[3] = self.last_id; in assign_ip_address()
[all …]
H A Dresolver.rs41 let ip = IpAddr::from_str(&ip_addr)?; in add_host() localVariable
42 self.hosts.insert(name, ip); in add_host()
51 if let Some(ip) = self.hosts.get(&host_name) { in lookup()
52 let ip2 = *ip; in lookup()
H A Dinterface.rs32 let octets = mask.ip().octets(); in convert()
42 let octets = mask.ip().octets(); in convert()
56 let s = format!("{}/{}", addr.ip(), prefix); in convert()
H A Dchunk.rs214 self.chunk_ip.source_ip = addr.ip(); in set_source_addr()
221 self.chunk_ip.destination_ip = addr.ip(); in set_destination_addr()
232 source_ip: src_addr.ip(), in new()
233 destination_ip: dst_addr.ip(), in new()
322 self.chunk_ip.source_ip = addr.ip(); in set_source_addr()
329 self.chunk_ip.destination_ip = addr.ip(); in set_destination_addr()
340 source_ip: src_addr.ip(), in new()
341 destination_ip: dst_addr.ip(), in new()
/webrtc/turn/src/proto/addr/
H A Daddr_test.rs12 u.ip() == a.ip || u.port() != a.port || u.to_string() != a.to_string(), 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/ice/src/candidate/
H A Dcandidate_peer_reflexive.rs22 let ip: IpAddr = match self.base_config.address.parse() { in new_candidate_peer_reflexive() localVariable
23 Ok(ip) => ip, in new_candidate_peer_reflexive()
26 let network_type = determine_network_type(&self.base_config.network, &ip)?; in new_candidate_peer_reflexive()
39 resolved_addr: SyncMutex::new(create_addr(network_type, ip, self.base_config.port)), in new_candidate_peer_reflexive()
H A Dcandidate_server_reflexive.rs21 let ip: IpAddr = match self.base_config.address.parse() { in new_candidate_server_reflexive() localVariable
22 Ok(ip) => ip, in new_candidate_server_reflexive()
25 let network_type = determine_network_type(&self.base_config.network, &ip)?; in new_candidate_server_reflexive()
38 resolved_addr: SyncMutex::new(create_addr(network_type, ip, self.base_config.port)), in new_candidate_server_reflexive()
H A Dcandidate_relay.rs30 let ip: IpAddr = match self.base_config.address.parse() { in new_candidate_relay() localVariable
31 Ok(ip) => ip, in new_candidate_relay()
34 let network_type = determine_network_type(&self.base_config.network, &ip)?; in new_candidate_relay()
42 resolved_addr: SyncMutex::new(create_addr(network_type, ip, self.base_config.port)), in new_candidate_relay()
/webrtc/turn/src/client/
H A Dpermission.rs51 self.perm_map.insert(addr.ip().to_string(), p); in insert()
55 self.perm_map.get(&addr.ip().to_string()) in find()
59 self.perm_map.remove(&addr.ip().to_string()); in delete()
65 if let Ok(ip) = k.parse() { in addrs()
66 a.push(SocketAddr::new(ip, 0)); in addrs()
/webrtc/util/src/vnet/nat/
H A Dnat_test.rs67 SocketAddr::new(dst.ip(), dst.port()), in test_nat_mapping_behavior_full_cone_nat()
82 SocketAddr::new(dst.ip(), dst.port()), in test_nat_mapping_behavior_full_cone_nat()
91 SocketAddr::new(dst.ip(), 7777), in test_nat_mapping_behavior_full_cone_nat()
137 SocketAddr::new(dst.ip(), dst.port()), in test_nat_mapping_behavior_addr_restricted_cone_nat()
152 SocketAddr::new(dst.ip(), dst.port()), in test_nat_mapping_behavior_addr_restricted_cone_nat()
161 SocketAddr::new(dst.ip(), 7777), in test_nat_mapping_behavior_addr_restricted_cone_nat()
216 SocketAddr::new(dst.ip(), dst.port()), in test_nat_mapping_behavior_port_restricted_cone_nat()
231 SocketAddr::new(dst.ip(), dst.port()), in test_nat_mapping_behavior_port_restricted_cone_nat()
240 SocketAddr::new(dst.ip(), 7777), in test_nat_mapping_behavior_port_restricted_cone_nat()
458 SocketAddr::new(dst.ip(), dst.port()), in test_nat_mapping_timeout_outbound_detects_timeout()
[all …]
/webrtc/util/src/vnet/resolver/
H A Dresolver_test.rs12 let ip = IpAddr::from_str(ip_addr)?; in test_resolver_standalone() localVariable
15 assert_eq!(resolved, ip, "should match"); in test_resolver_standalone()
22 let ip = IpAddr::from_str(ip_addr)?; in test_resolver_standalone() localVariable
28 assert_eq!(resolved, ip, "should match"); in test_resolver_standalone()
/webrtc/util/src/vnet/chunk/
H A Dchunk_test.rs34 assert_eq!(c.get_source_ip(), src.ip(), "ip should match"); in test_chunk_udp()
35 assert_eq!(c.get_destination_ip(), dst.ip(), "ip should match"); in test_chunk_udp()
56 assert_eq!(cloned.get_source_ip(), src.ip(), "ip should match"); in test_chunk_udp()
57 assert_eq!(cloned.get_destination_ip(), dst.ip(), "ip should match"); in test_chunk_udp()
/webrtc/ice/src/agent/
H A Dagent_gather.rs229 for ip in ips { in gather_candidates_local()
230 let mut mapped_ip = ip; in gather_candidates_local()
241 ip in gather_candidates_local()
289 ip, in gather_candidates_local()
404 .find_map(|ip| match mapper.find_external_ip(&ip.to_string()) { in gather_candidates_local_udp_mux()
405 Ok(ip) => Some(ip), in gather_candidates_local_udp_mux()
409 ip, in gather_candidates_local_udp_mux()
420 Some(ip) => ip, in gather_candidates_local_udp_mux()
506 Ok(ip) => ip, in gather_candidates_srflx_mapped()
659 let (ip, port) = (xoraddr.ip, xoraddr.port); in gather_candidates_srflx()
[all …]
H A Dagent_gather_test.rs57 for ip in &local_ips { in test_vnet_gather_dynamic_ip_address()
58 if ip.is_loopback() { in test_vnet_gather_dynamic_ip_address()
61 if !ipnet.contains(ip) { in test_vnet_gather_dynamic_ip_address()
91 for ip in local_ips { in test_vnet_gather_listen_udp()
199 laddrs[0].ip().to_string(), in test_vnet_gather_with_nat_1to1_as_host_candidates()
202 laddrs[0].ip() in test_vnet_gather_with_nat_1to1_as_host_candidates()
205 laddrs[1].ip().to_string(), in test_vnet_gather_with_nat_1to1_as_host_candidates()
208 laddrs[1].ip() in test_vnet_gather_with_nat_1to1_as_host_candidates()
218 laddrs[0].ip().to_string(), in test_vnet_gather_with_nat_1to1_as_host_candidates()
221 laddrs[0].ip(), in test_vnet_gather_with_nat_1to1_as_host_candidates()
[all …]
/webrtc/util/src/vnet/net/
H A Dnet_test.rs64 laddr.ip().to_string(), in test_net_native_bind()
81 laddr.ip().to_string(), in test_net_native_dail()
118 if addr.ip().is_loopback() { in test_net_native_unexpected_operations()
394 udp_addr.ip(), in test_net_virtual_resolve_addr()
435 laddr.ip().to_string().as_str(), in test_net_virtual_bind_specific_port()
438 laddr.ip() in test_net_virtual_bind_specific_port()
453 laddr.ip().to_string().as_str(), in test_net_virtual_dail_lo0()
456 laddr.ip() in test_net_virtual_dail_lo0()
485 laddr.ip().to_string().as_str(), in test_net_virtual_dail_eth0()
488 laddr.ip() in test_net_virtual_dail_eth0()
[all …]

123