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;