Branch: Tag:

2005-01-03

2005-01-03 11:07:28 by Jeff Hungerford <hungerf3@house.ofdoom.com>

Improved support for T_TXT.
Thanks to Jeff Hungerford <hungerf3-roxen3@house.ofdoom.com>.

Rev: lib/modules/Protocols.pmod/DNS.pmod:1.84

1: - // $Id: DNS.pmod,v 1.83 2004/09/15 19:59:15 grubba Exp $ + // $Id: DNS.pmod,v 1.84 2005/01/03 11:07:28 grubba Exp $   // Not yet finished -- Fredrik Hubinette      //! Domain Name System
419:    m->expire=decode_int(s,next);    m->minimum=decode_int(s,next);    break; +  case T_TXT: +  m->txt = decode_string(s, next); +  break;    }       next[0]=tmp+m->len;
561:    port = 53;    if(!udp::bind(port))    error("DNS: failed to bind port "+port+".\n"); +  werror("Protocols.DNS.server(%O)\n" +  "UDP Address: %s\n" +  "%s\n", port, udp::query_address(), +  describe_backtrace(backtrace()));    udp::set_read_callback(rec_data);    }   
805:    {    object udp = Stdio.UDP();    udp->bind(0); +  werror("Protocols.DNS.client()->do_sync_query(%O)\n" +  "UDP Address: %s\n" +  "%s\n", s, udp->query_address(), describe_backtrace(backtrace()));    mapping m;    int i;    for (i=0; i < RETRIES; i++) {
1264:    {    if(!udp::bind(0))    error( "DNS: failed to bind a port.\n" ); +  werror("Protocols.DNS.async_client(%O, %O)\n" +  "UDP Address: %s\n" +  "%s\n", server, domain, udp::query_address(), +  describe_backtrace(backtrace()));       udp::set_read_callback(rec_data);    ::create(server,domain);