pike.git / lib / modules / Protocols.pmod / DNS.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/DNS.pmod:1:   // Not yet finished -- Fredrik Hubinette      //! module Protocols   //! submodule DNS   //! - //! $Id: DNS.pmod,v 1.43 2001/01/05 23:33:04 grubba Exp $ + //! $Id: DNS.pmod,v 1.44 2001/03/18 20:53:00 grubba Exp $      constant NOERROR=0;   constant FORMERR=1;   constant SERVFAIL=2;   constant NXDOMAIN=3;   constant NOTIMPL=4;   constant NXRRSET=8;      constant QUERY=0;   
pike.git/lib/modules/Protocols.pmod/DNS.pmod:241: Inside #if defined(__NT__)
   array(string) res = ({});    foreach(({    "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters",    "SYSTEM\\CurrentControlSet\\Services\\VxD\\MSTCP"    }),string key)    {    catch {    res += ({ RegGetValue(HKEY_LOCAL_MACHINE, key, val) });    };    } +  + #if constant(RegGetKeyNames) +  /* Catch if RegGetKeyNames() doesn't find the directory. */ +  catch { +  foreach(RegGetKeyNames(HKEY_LOCAL_MACHINE, +  "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\" +  "Parameters\\Interfaces"), string key) +  { +  catch { +  res += ({ RegGetValue(HKEY_LOCAL_MACHINE, +  "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\" +  "Parameters\\Interfaces\\" + key, val) }); +  }; +  } +  }; + #endif    return sizeof(res) ? res : ({ fallbackvalue });    }   #endif       static private string match_etc_hosts(string host)    {    if (!etc_hosts) {    array(string) paths;   #ifdef __NT__    paths = get_tcpip_param("DataBasePath");