Global information used by these resolver calls is kept in the _res data
structure. This structure is defined in the <RESOLV.H> file and contains
the following members:
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄż
łType Member Contents ł
ĂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
łint retrans Retransmission time ł
ł interval ł
ĂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
łint retry Number of times to ł
ł retransmit ł
ĂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
łlong options Option flags ł
ĂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
łint nscount Number of name ł
ł servers ł
ĂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
łstruct nsaddr_list Address of name ł
łsockaddr_in[MAXNS] server ł
ĂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
łunsigned short id Current packet id ł
ĂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
łchar[MAXDNAME] defdname Default domain ł
ĂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
łchar*[MAXDNSRCH+1] dnsrch Components of domain ł
ł to search ł
ŔÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŮ
The options field of the _res data structure is constructed by logically
ORing the following values:
RES_INIT
Indicates whether the initial name server
and default domain name have been initialized (that is, whether the res_init()
call has been called).
RES_DEBUG
Prints
debugging messages.
RES_USEVC
Uses
Transmission Control Protocol/Internet Protocol (TCP/IP) connections for
queries instead of User Datagram Protocol/Internet Protocol (UDP/IP).
RES_STAYOPEN
Used with the RES_USEVC value, keeps the TCP/IP
connection open between queries. While UDP/IP is the mode normally used,
TCP/IP mode and this option are useful for programs that regularly perform
many queries.
RES_RECURSE
Sets
the Recursion Desired bit for queries. This is the default.
RES_DEFNAMES
Appends the default domain name to single-label
queries. This is the default.
These environment variables affect values related to the _res data structure:
LOCALDOMAIN
Overrides the default local domain,
which is read from the ETC\RESOLV.conf file and stored in the defdname field
of the _res data structure.
RES_TIMEOUT
Overrides
the default value of the retrans field of the _res data structure, which
is the value of the RES_TIMEOUT constant defined in the <RESOLV.H>
file. This value is the base timeout period in seconds between queries to
the name servers. After each failed attempt, the timeout period is doubled.
The timeout period is divided by the number of name servers defined. The
minimum timeout period is 1 second.
RES_RETRY
Overrides
the default value for the retry field of the _res data structure, which
is 4. This value is the number of times the resolver tries to query the
name servers before giving up. Setting RES_RETRY to 0 prevents the resolver
from querying the name servers.
The res_send() call does not perform interactive queries and expects the
name server to handle recursion.
[Back]
[Next]