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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/DNS.pmod:1: - // $Id: DNS.pmod,v 1.80 2003/08/22 14:25:27 nilsson Exp $ + // $Id: DNS.pmod,v 1.81 2003/10/21 03:10:39 nilsson 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:510:    // This is a stub intended to simplify servers which allow recursion    }       static private void rec_data(mapping m)    {    mixed err;    mapping q;    if (err = catch {    q=decode_res(m->data);    }) { -  werror(sprintf("DNS: Failed to read UDP packet.\n" -  "%s\n", describe_backtrace(err))); +  werror("DNS: Failed to read UDP packet.\n%s\n", +  describe_backtrace(err));    if(m && m->data && sizeof(m->data)>=2)    send_reply((["rcode":1]),    mkmapping(({"id"}), array_sscanf(m->data, "%2c")), m);    }    else if(q->qr)    handle_response(q, m);    else    handle_query(q, m);    }   
pike.git/lib/modules/Protocols.pmod/DNS.pmod:710:    case "search":    rest = replace(rest, "\t", " ");    domains += ((rest/" ") - ({""}));    break;       case "nameserver":    if (!is_ip(rest)) {    // Not an IP-number!    string host = rest;    if (!(rest = match_etc_hosts(host))) { -  werror(sprintf("Protocols.DNS.client(): " -  "Can't resolv nameserver \"%s\"\n", host)); +  werror("Protocols.DNS.client(): " +  "Can't resolv nameserver \"%s\"\n", host);    break;    }    }    if (sizeof(rest)) {    nameservers += ({ rest });    }    break;    }    }   
pike.git/lib/modules/Protocols.pmod/DNS.pmod:1134:    mixed err;    if (err = catch {    if(m->port != 53 || !has_value(nameservers, m->ip)) return;    sscanf(m->data,"%2c",int id);    object r=requests[id];    if(!r) return;    m_delete(requests,id);    r->callback(r->domain,decode_res(m->data),@r->args);    destruct(r);    }) { -  werror(sprintf("DNS: Failed to read UDP packet. Connection refused?\n" -  "%s\n", -  describe_backtrace(err))); +  werror("DNS: Failed to read UDP packet. Connection refused?\n%s\n", +  describe_backtrace(err));    }    }       static private void generic_get(string d,    mapping answer,    int multi,    int all,    int type,    string field,    string domain,