/// <summary>Retrieve all addresses of a host by it's address.</summary> /// <remarks> /// Retrieve all addresses of a host by it's address. NetBIOS hosts can /// have many names for a given IP address. The name and IP address make the /// NetBIOS address. This provides a way to retrieve the other names for a /// host with the same IP address. /// </remarks> /// <param name="addr">the address to query</param> /// <exception cref="UnknownHostException">if address cannot be resolved</exception> public static NbtAddress[] GetAllByAddress(NbtAddress addr) { try { NbtAddress[] addrs = Client.GetNodeStatus(addr); CacheAddressArray(addrs); return(addrs); } catch (UnknownHostException) { throw new UnknownHostException("no name with type 0x" + Hexdump.ToHexString(addr. HostName.HexCode, 2) + (((addr.HostName.Scope == null) || (addr.HostName.Scope.Length == 0)) ? " with no scope" : " with scope " + addr.HostName.Scope) + " for host " + addr.GetHostAddress()); } }
/// <summary>Retrieve all addresses of a host by it's address.</summary> /// <remarks> /// Retrieve all addresses of a host by it's address. NetBIOS hosts can /// have many names for a given IP address. The name and IP address make the /// NetBIOS address. This provides a way to retrieve the other names for a /// host with the same IP address. /// </remarks> /// <param name="addr">the address to query</param> /// <exception cref="UnknownHostException">if address cannot be resolved</exception> public static NbtAddress[] GetAllByAddress(NbtAddress addr) { try { NbtAddress[] addrs = Client.GetNodeStatus(addr); CacheAddressArray(addrs); return addrs; } catch (UnknownHostException) { throw new UnknownHostException("no name with type 0x" + Hexdump.ToHexString(addr. HostName.HexCode, 2) + (((addr.HostName.Scope == null) || (addr.HostName.Scope.Length == 0)) ? " with no scope" : " with scope " + addr.HostName.Scope) + " for host " + addr.GetHostAddress()); } }