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:
-
// $Id: DNS.pmod,v 1.
92
2008/01/
05
14
:
45
:
21
grubba Exp $
+
// $Id: DNS.pmod,v 1.
93
2008/01/
31
13
:
08
:
59
grubba Exp $
// Not yet finished -- Fredrik Hubinette //! Domain Name System //! RFC 1035 #pike __REAL_VERSION__ constant NOERROR=0; constant FORMERR=1; constant SERVFAIL=2;
pike.git/lib/modules/Protocols.pmod/DNS.pmod:663:
} res += raw; } else { res = raw; } } } return res; }
+
#ifndef __NT__
static private string match_etc_hosts(string host) { if (!etc_hosts) { etc_hosts = ([ "localhost":"127.0.0.1" ]); string raw = read_etc_file("hosts"); if (raw && sizeof(raw)) { foreach(raw/"\n"-({""}), string line) { // Handle comments, and split the line on white-space
pike.git/lib/modules/Protocols.pmod/DNS.pmod:692:
// Bad /etc/hosts entry ignored. } } } } else { // Couldn't read or no /etc/hosts. } } return etc_hosts[lower_case(host)]; }
+
#endif /* !__NT__ */
// FIXME: Read hosts entry in /etc/nswitch.conf? //! @decl void create() //! @decl void create(void|string|array server, void|int|array domain) array(string) nameservers = ({}); array domains = ({}); void create(void|string|array(string) server, void|int|array(string) domain) {