Examples of IPInterfaceProperties


Examples of cli.System.Net.NetworkInformation.IPInterfaceProperties

    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());
          }
      }
      try {
          if (false) throw new cli.System.PlatformNotSupportedException();
    searchlist = strAppend(searchlist, props.get_DnsSuffix());
      }
      catch (cli.System.PlatformNotSupportedException _) {
      }
  }
  os_searchlist = searchlist;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.