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   // RFC 1035      //! module Protocols   //! submodule DNS    - //! $Id: DNS.pmod,v 1.51 2000/09/28 03:38:49 hubbe Exp $ + //! $Id: DNS.pmod,v 1.52 2000/10/17 17:18:50 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:492: Inside #if __NT__
   if(!domain || !sizeof(domain))    domain = get_tcpip_param("DhcpDomain");       nameservers += get_tcpip_param("NameServer", "") / " ";    nameservers += get_tcpip_param("DhcpNameServer", "") / " ";    nameservers -= ({ "" });       domains += (get_tcpip_param("SearchList", "") / " ") - ({ "" });   #else    string resolv_conf; -  foreach(({"/etc/resolv.conf", "/amitcp/db/resolv.conf"}), string resolv_loc) +  foreach(({"/etc/resolv.conf", "/amitcp/db/resolv.conf"}), +  string resolv_loc)    if ((resolv_conf = Stdio.read_file(resolv_loc)))    break;       if (!resolv_conf) {    /* 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"; + #if 0    throw(({ "Protocols.DNS.client(): No /etc/resolv.conf!\n",    backtrace() })); -  + #endif /* 0 */    }       foreach(resolv_conf/"\n", string line)    {    string rest;    sscanf(line,"%s#",line);    sscanf(line,"%*[\r \t]%s",line);    line=reverse(line);    sscanf(line,"%*[\r \t]%s",line);    line=reverse(line);