Lines Matching refs:ip
199 pub(crate) fn has_ipaddr(&self, ip: IpAddr) -> bool { in has_ipaddr()
204 match ip.to_string().as_str() { in has_ipaddr()
216 if loc_ip == ip { in has_ipaddr()
228 pub(crate) async fn allocate_local_addr(&self, ip: IpAddr, port: u16) -> Result<()> { in allocate_local_addr()
231 if ip.is_unspecified() { in allocate_local_addr()
232 ips = self.get_all_ipaddrs(ip.is_ipv6()); in allocate_local_addr()
233 } else if self.has_ipaddr(ip) { in allocate_local_addr()
234 ips.push(ip); in allocate_local_addr()
254 pub(crate) async fn assign_port(&self, ip: IpAddr, start: u16, end: u16) -> Result<u16> { in assign_port()
264 let result = self.allocate_local_addr(ip, port).await; in assign_port()
281 let ip: IpAddr = match host.parse() { in resolve_addr() localVariable
282 Ok(ip) => ip, in resolve_addr()
297 if let Some(ip) = resolver.lookup(host).await { in resolve_addr()
298 ip in resolve_addr()
311 let remote_addr = SocketAddr::new(ip, port); in resolve_addr()
328 if !self.has_ipaddr(local_addr.ip()) { in bind()
334 local_addr.set_port(self.assign_port(local_addr.ip(), 5000, 5999).await?); in bind()
368 if let Some(src_ip) = vi.determine_source_ip(any_ip, rem_addr.ip()) { in dail()
424 if let Ok(ip) = IpAddr::from_str(ip_str) { in new()
425 static_ips.push(ip); in new()
429 if let Ok(ip) = IpAddr::from_str(&config.static_ip) { in new()
430 static_ips.push(ip); in new()