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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/DNS.pmod:905:    }   #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) +  protected 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", ""),    lambda(string s) {    return replace(s, " ", ",")/",";    }) * ({});
pike.git/lib/modules/Protocols.pmod/DNS.pmod:1342:    {    if(m2->mx && m2->preference<minpref)    {    ret=m2->mx;    minpref=m2->preference;    }    }    return ret;    }    +  //!    array(string) get_mx(string host)    {    mapping m;    if(sizeof(domains) && host[-1] != '.' && sizeof(host/".") < 3) {    m = do_sync_query(mkquery(host, C_IN, T_MX));    if(!m || !m->an || !sizeof(m->an)) {    foreach(domains, string domain)    {    m = do_sync_query(mkquery(host+"."+domain, C_IN, T_MX));    if(m && m->an && sizeof(m->an))
pike.git/lib/modules/Protocols.pmod/DNS.pmod:1373:    sort( column( a, "preference"), b);       return b;    }   }      #define REMOVE_DELAY 120   #define GIVE_UP_DELAY (RETRIES * RETRY_DELAY + REMOVE_DELAY)*2      // FIXME: Randomized source port! + //!   class async_client   {    inherit client;    inherit Stdio.UDP : udp;    async_client next_client;       class Request    {    string req;    string domain;
pike.git/lib/modules/Protocols.pmod/DNS.pmod:1555:    function callback, mixed ... args) {    array a;    if (mx) {    a = column(mx, "mx");    sort(column(mx, "preference"), a);    }    callback(a, @args);    }, callback, @args);    }    -  void create(void|string|array(string) server, void|string|array(string) domain) +  //! +  protected void create(void|string|array(string) server, +  void|string|array(string) domain)    {    if(!udp::bind(0))    error( "DNS: failed to bind a port.\n" );   #if 0    werror("Protocols.DNS.async_client(%O, %O)\n"    "UDP Address: %s\n"    "%s\n", server, domain, udp::query_address(),    describe_backtrace(backtrace()));   #endif /* 0 */