returns a List of all the nodes (from root to best matching) for the given address

@param iaddr
@return
425100
public List<IPRangeNode> getChain(InetAddress iaddr) {

	List<IPRangeNode> result = new ArrayList();

	result.add(root);

	IPRangeNode node = isV4(iaddr) ? ipv4 : ipv6;
	node.findFast(iaddr, result);

	return result;
    }
320074
@Nonnull
	public String getNodeId(final InetSocketAddress socketAddress) throws IllegalArgumentException {
		if ( socketAddress == null ) {
			throw new IllegalArgumentException("SocketAddress must not be null.");
		}
		final String result = _address2Ids.get( socketAddress );
		if ( result == null ) {
			throw new IllegalArgumentException("SocketAddress " + socketAddress + " not known (registered addresses: " + _address2Ids.keySet() + ").");
		}
		return result;
	}
12276
public static Collection<InetAddress> getAddresses(Map<String, Map<String, InetAddressInfo>> inetAddressMap) throws Exception {
        Set<InetAddress> addrs=new HashSet<>();

        for(Map.Entry<String, Map<String, InetAddressInfo>> inetAddressMapEntry : inetAddressMap.entrySet()) {
            Map<String, InetAddressInfo> protocolInetAddressMap=inetAddressMapEntry.getValue();
            for(Map.Entry<String, InetAddressInfo> protocolInetAddressMapEntry : protocolInetAddressMap.entrySet()) {
                InetAddressInfo inetAddressInfo=protocolInetAddressMapEntry.getValue();
                // add InetAddressInfo to sets based on IP version
                List<InetAddress> addresses=inetAddressInfo.getInetAddresses();
                for(InetAddress address : addresses) {
                    if(address == null)
                        throw new RuntimeException("failed converting address info to IP address: " + inetAddressInfo);
                    addrs.add(address);
                }
            }
        }
        return addrs;
    }
873436
public java.util.List<Address> getAddresses() {
        if (addresses == null) {
            addresses = new com.amazonaws.internal.SdkInternalList<Address>();
        }
        return addresses;
    }
1256189
static InetAddress getNIFirstAddress(int niIndex) throws SocketException {
        if (niIndex > 0) {
            NetworkInterface networkInterface = NetworkInterface.getByIndex(niIndex);
            Enumeration<InetAddress> addressesEnum = networkInterface.getInetAddresses();
            if (addressesEnum.hasMoreElements()) {
                return addressesEnum.nextElement();
            }
        }
        return InetAddress.anyLocalAddress();
    }
352999
def getaddresses(fieldvalues):
    """"""
    all = COMMASPACE.join(fieldvalues)
    a = _AddressList(all)
    return a.addresslist
591436
private static List<Integer> stripNodeIds(List<Node> nodeList) {
        List<Integer> nodeidList = new ArrayList<Integer>();
        if(nodeList != null) {
            for(Node node: nodeList) {
                nodeidList.add(node.getId());
            }
        }
        return nodeidList;
    }
1150179
def get_peers(self):
        
        node = NodeLeader.Instance()
        result = {"connected": [], "unconnected": [], "bad": []}
        connected_peers = []

        for peer in node.Peers:
            result['connected'].append({"address": peer.host,
                                        "port": peer.port})
            connected_peers.append("{}:{}".format(peer.host, peer.port))

        for addr in node.DEAD_ADDRS:
            host, port = addr.rsplit(':', 1)
            result['bad'].append({"address": host, "port": port})

        # "UnconnectedPeers" is never used. So a check is needed to
        # verify that a given address:port does not belong to a connected peer
        for addr in node.KNOWN_ADDRS:
            host, port = addr.rsplit(':', 1)
            if addr not in connected_peers:
                result['unconnected'].append({"address": host,
                                              "port": int(port)})

        return result
265967
@Override
  public List<NameAssignment> lookup(final Iterable<Identifier> identifiers) {
    LOG.log(Level.FINE, "identifiers");
    final List<NameAssignment> nas = new ArrayList<>();
    for (final Identifier id : identifiers) {
      final InetSocketAddress addr = idToAddrMap.get(id);
      LOG.log(Level.FINEST, "id : {0} addr: {1}", new Object[]{id, addr});
      if (addr != null) {
        nas.add(new NameAssignmentTuple(id, addr));
      }
    }
    return nas;
  }
1323510
public static List<InetSocketAddress> getRPCAddresses(String suffix,
      Configuration conf, Collection<String> serviceIds, String... keys) 
          throws IOException {
    // Use default address as fall back
    String defaultAddress = null;
    try {
      defaultAddress = conf.get(FileSystem.FS_DEFAULT_NAME_KEY + suffix);
      if (defaultAddress != null) {
        defaultAddress = NameNode.getDefaultAddress(conf);
      }
    } catch (IllegalArgumentException e) {
      defaultAddress = null;
    }
    
    for (int i = 0; i < keys.length; i++) {
      keys[i] += suffix;
    }
    
    List<InetSocketAddress> addressList = DFSUtil.getAddresses(conf,
        serviceIds, defaultAddress,
        keys);
    if (addressList == null) {
      String keyStr = "";
      for (String key: keys) {
        keyStr += key + " ";
      }
      throw new IOException("Incorrect configuration: namenode address "
          + keyStr
          + " is not configured.");
    }
    return addressList;
  }
368286
public static void getTopicLinkIds(final Node node, final Set<String> linkIds) {
        // If the node is null then there isn't anything to find, so just return.
        if (node == null) {
            return;
        }

        if (node.getNodeName().equals("xref") || node.getNodeName().equals("link")) {
            final NamedNodeMap attributes = node.getAttributes();
            if (attributes != null) {
                final Node idAttribute = attributes.getNamedItem("linkend");
                if (idAttribute != null) {
                    final String idAttributeValue = idAttribute.getNodeValue();
                    linkIds.add(idAttributeValue);
                }
            }
        }

        final NodeList elements = node.getChildNodes();
        for (int i = 0; i < elements.getLength(); ++i) {
            getTopicLinkIds(elements.item(i), linkIds);
        }
    }
998959
public static ModelNode getParentAddress(final ModelNode address) {
        if (address.getType() != ModelType.LIST) {
            throw new IllegalArgumentException("The address type must be a list.");
        }
        final ModelNode result = new ModelNode();
        final List<Property> addressParts = address.asPropertyList();
        if (addressParts.isEmpty()) {
            throw new IllegalArgumentException("The address is empty.");
        }
        for (int i = 0; i < addressParts.size() - 1; ++i) {
            final Property property = addressParts.get(i);
            result.add(property.getName(), property.getValue());
        }
        return result;
    }
802116
public static Set<InetAddress> getAddresses() {
        Set<InetAddress> allAddresses = new LinkedHashSet<>();
        Map<String, Set<InetAddress>> interfaceAddressMap = getNetworkInterfaceAddresses(false);
        for (Map.Entry<String, Set<InetAddress>> entry : interfaceAddressMap.entrySet()) {
            Set<InetAddress> addresses = entry.getValue();
            if (!addresses.isEmpty()) {
                for (InetAddress address : addresses) {
                    allAddresses.add(address);
                }
            }
        }
        return allAddresses;
    }
585918
private List<InetAddress> findAddresses() throws HarvestException {
		// Stores found addresses
		List<InetAddress> found = new ArrayList<InetAddress>(3);

		// Retrieve list of available network interfaces
		Enumeration<NetworkInterface> interfaces = getNetworkInterfaces();
		while (interfaces.hasMoreElements()) {
			NetworkInterface iface = interfaces.nextElement();

			// Evaluate network interface
			if (!useNetworkInterface(iface)) {
				continue;
			}

			// Retrieve list of available addresses from the network interface
			Enumeration<InetAddress> addresses = iface.getInetAddresses();

			while (addresses.hasMoreElements()) {
				InetAddress address = addresses.nextElement();

				// loopback addresses are discarded
				if (address.isLoopbackAddress()) {
					continue;
				}

				// Ignore IPv6 addresses for now
				if (address instanceof Inet4Address) {
					found.add(address);
				}
			}
		}
		return found;
	}
115654
private boolean inHostsList(DatanodeID node, String ipAddr) {
    Set<String> hostsList = hostsReader.getHosts();
    try {
      if (hostsList.isEmpty()
          || (ipAddr != null && hostsList.contains(ipAddr))
          || hostsList.contains(node.getHost())
          || hostsList.contains(node.getName())
          || ((node instanceof DatanodeInfo) && (hostsList.contains(((DatanodeInfo) node)
              .getHostName()) 
          || hostsList.contains(((DatanodeInfo) node).getHostName() + ":"
              + node.getPort()))) 
          // this is for the mixed mode in which the hostnames in the includes file
          // are followed with a "." and the datanodes are using IP addresses
          // during registration
          || (ipAddr != null && 
              hostsList.contains(InetAddress.getByName(ipAddr).getHostName() 
              + "."))) {
        return true;
      }
      
      // for several calls we pass ipAddr = null, but the datanode name
      // is an IP address, for this we need to do best effort reverse DNS 
      // resolution
      String host = getHostNameForIp(node.getHost());
      if (host != null) {
        return hostsList.contains(host + ".") || hostsList.contains(host);
      }
      
      // host is not in the list
      return false;
    } catch (UnknownHostException e) {
      LOG.error(e);
    }
    return false;
  }
1359035
public Set<Address> getAddresses(T physicalAddress)
   {
      Set<Address> result = new HashSet<Address>();

      for (Entry<Address, T> entry : nodes.entrySet())
      {
         if (entry.getValue() == null || entry.getValue().equals(physicalAddress))
         {
            result.add(entry.getKey());
         }
      }

      if (trace)
         log.tracef("Addresses: %s", result);

      return Collections.unmodifiableSet(result);
   }
867061
public BootstrapDiscoveryBuilder withNodes(Address... nodes) {
    return withNodes(Stream.of(nodes)
        .map(address -> Node.builder()
            .withAddress(address)
            .build())
        .collect(Collectors.toSet()));
  }