pike.git
/
lib
/
modules
/
Protocols.pmod
/
DNS.pmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Protocols.pmod/DNS.pmod:1:
// Not yet finished -- Fredrik Hubinette // RFC 1035 //! module Protocols //! submodule DNS
-
//! $Id: DNS.pmod,v 1.
60
2002
/
01
/
13
18
:
44
:
37
marcus
Exp $
+
//! $Id: DNS.pmod,v 1.
61
2004
/
09
/
15
20
:
10
:
11
grubba
Exp $
#pike __REAL_VERSION__ constant NOERROR=0; constant FORMERR=1; constant SERVFAIL=2; constant NXDOMAIN=3; constant NOTIMPL=4; constant NXRRSET=8;
pike.git/lib/modules/Protocols.pmod/DNS.pmod:514:
if (!resolv_conf) { if (system->get_netinfo_property) { // Mac OS X / Darwin (and possibly other systems) that use // NetInfo may have these values in the database. if (nameservers = system->get_netinfo_property(".", "/locations/resolver", "nameserver")) { nameservers = map(nameservers, `-, "\n");
+
} else {
+
nameservers = ({});
} if (domains = system->get_netinfo_property(".", "/locations/resolver", "domain")) { domains = map(domains, `-, "\n");
-
+
} else {
+
domains = ({});
} } else { /* FIXME: Is this a good idea? * Why not just try the fallback? * /grubba 1999-04-14 * * Now uses 127.0.0.1 as fallback. * /grubba 2000-10-17 */ resolv_conf = "nameserver 127.0.0.1";