Package cli.System.Net.NetworkInformation

Examples of cli.System.Net.NetworkInformation.IPAddressCollection


    static void loadDNSconfig0() {
  String searchlist = "";
  String nameservers = "";
  for (NetworkInterface iface : NetworkInterface.GetAllNetworkInterfaces()) {
      IPInterfaceProperties props = iface.GetIPProperties();
      IPAddressCollection addresses = props.get_DnsAddresses();
      for (int i = 0; i < addresses.get_Count(); i++) {
          cli.System.Net.IPAddress addr = addresses.get_Item(i);
          // no IPv6 support
          if (addr.get_AddressFamily().Value == cli.System.Net.Sockets.AddressFamily.InterNetwork) {
                    nameservers = strAppend(nameservers, addr.toString());
          }
      }
View Full Code Here

TOP

Related Classes of cli.System.Net.NetworkInformation.IPAddressCollection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.