Branch: Tag:

1999-10-30

1999-10-30 11:41:17 by Mirar (Pontus Hagland) <pike@sort.mirar.org>

added some docs

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

1:   // Not yet finished -- Fredrik Hubinette    + //! module Protocols + //! submodule DNS +    constant NOERROR=0;   constant FORMERR=1;   constant SERVFAIL=2;
211:   #define RETRIES 12   #define RETRY_DELAY 5    - class client { + class client + { + //! + //! class client + //! Synchronous DNS client. + //! +     inherit protocol;       static private int is_ip(string ip)
274:    return(etc_hosts[lower_case(host)]);    }    +  //! +  //! method void create() +  //! method 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)
351:    }    return d;    }); -  } else { +  } +  else +  {    if(arrayp(server))    nameservers = server;    else
362:    else    if(stringp(domain))    domains = ({ domain }); -  +     }    }    -  +     mapping do_sync_query(string s)    {    object udp = Stdio.UDP();
390:    return 0;    }    +  //! +  //! method array gethostbyname(string hostname) +  //! method array gethostbyaddr(string hostip) +  //! Querys the host name or ip from the default or given +  //! DNS server. The result is a mapping with three elements, +  //! <data_description type=array> +  //! <elem value=hostname type=string>hostname</elem> +  //! <elem value=ip type=array(string)>ip number(s)</elem> +  //! <elem value=ip type=array(string)>dns name(s)</elem> +  //! </data_description> +  //!       mixed *gethostbyname(string s)    {
464:    }    }    +  //! +  //! method string get_primary_mx(string hostname) +  //! Querys the primary mx for the host. +  //! returns the hostname of the primary mail exchanger +  //! +     string get_primary_mx(string host)    {    mapping m;