RES_ISOURSERVER(3C) RES_ISOURSERVER(3C)
res_isourserver, res_nameinquery, res_queriesmatch, res_querydomain,
res_randomid - resolver query utilities
#include <resolv.h>
int res_isourserver(struct sockaddr_in *inp);
int res_nameinquery(char *name, int type, int class, u_char *buf, u_char *eom);
int res_queriesmatch(u_char *buf1, u_char *eom1, u_char *buf2, u_char *eom2);
int res_querydomain(char *name, char *domain, int class, int type, u_char *answer, int anslen);
u_int16_t res_randomid(void);
Helper functions for resolver code development.
res_isourserver returns 1 if argument appears in current list of the
clients name servers, returns 0 if not. res_nameinquery looks for (name,
type, class) in the query section of packet (buf, eom). Returns: -1
format error, 0 not found, or >0 found.
res_queriesmatch looks for a 1:1 mapping of (name, type, class) in
packets (buf1, eom1) and (buf2, eom2). Returns: -1 format error, 0 not a
1:1 mapping, and >0 is a 1:1 mapping. res_querydomain performs a call to
res_query (see res_query(3) ) on the concatenation of name and domain.
res_randomid is a pseudo-random number generator.
resolver(4).
PPPPaaaaggggeeee 1111 [ Back ]
|