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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/DNS.pmod:477:       array(string) nameservers = ({});    array domains = ({});    void create(void|string|array(string) server, void|int|array(string) domain)    {    if(!server)    {    string domain;      #if __NT__ -  +     domain=get_tcpip_param("Domain"); -  nameservers = replace(get_tcpip_param("NameServer"),","," ") / " "; -  nameservers-=({""}); -  domains=replace(get_tcpip_param("SearchList"),","," ") / " "; -  domains-=({""}); +  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)    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