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.53 2000/12/07 17:58:47 grubba Exp $ + //! $Id: DNS.pmod,v 1.54 2000/12/08 12:15:17 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:484:       array(string) nameservers = ({});    array domains = ({});    void create(void|string|array(string) server, void|int|array(string) domain)    {    if(!server)    {   #if __NT__    domains = get_tcpip_param("Domain", "") +    get_tcpip_param("DhcpDomain", "") + -  map(get_tcpip_param("SearchList", ""), `/, " ") * ({}); +  map(get_tcpip_param("SearchList", ""), +  lambda(string s) { +  return replace(s, " ", ",")/","; +  }) * ({});       nameservers = map(get_tcpip_param("NameServer", "") + -  get_tcpip_param("DhcpNameServer", ""), `/, " ") * ({}); +  get_tcpip_param("DhcpNameServer", ""), +  lambda(string s) { +  return replace(s, " ", ",")/","; +  }) * ({});   #else    string domain;    string resolv_conf;    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?