Comtrol eCos User Manual
Page 552
Chapter 38. TCP/IP Library Reference
res_search(char *dname, int class, int type, u_char *answer, int anslen);
int
res_mkquery(int op, char *dname, int class, int type, char *data,
int datalen, struct rrec *newrr, char *buf, int buflen);
int
res_send(char *msg, int msglen, char *answer, int anslen);
int
res_init(void);
int
dn_comp(char *exp_dn, char *comp_dn, int length, char **dnptrs,
char **lastdnptr);
int
dn_expand(u_char *msg, u_char *eomorig, u_char *comp_dn, u_char *exp_dn,
int length);
DESCRIPTION
These routines are used for making, sending, and interpreting query and
reply messages with Internet domain name servers.
Global configuration and state information that is used by the resolver
routines is kept in the structure _res.
Most of the values have reason-
able defaults and can be ignored.
Options stored in _res.options are
defined in
<
resolv.h> and are as follows.
Options are stored as a simple
bit mask containing the bitwise OR of the options enabled.
RES_INIT
True if the initial name server address and default domain
name are initialized (i.e., res_init() has been called).
RES_DEBUG
Print debugging messages.
RES_AAONLY
Accept authoritative answers only.
With this option,
res_send() should continue until it finds an authoritative
answer or finds an error.
Currently this is not imple-
mented.
RES_USEVC
Use TCP connections for queries instead of UDP datagrams.
RES_STAYOPEN
Used with RES_USEVC to keep the TCP connection open
between queries.
This is useful only in programs that
regularly do many queries.
UDP should be the normal mode
used.
RES_IGNTC
Unused currently (ignore truncation errors, i.e., don’t
retry with TCP).
RES_RECURSE
Set the recursion-desired bit in queries.
This is the
default.
(res_send() does not do iterative queries and
expects the name server to handle recursion.)
RES_DEFNAMES
If set, res_search() will append the default domain name
448