Standards / Extensions | C or C++ | Dependencies |
---|---|---|
BSD 4.3 |
both | OS/390 V2R8 |
#define _XOPEN_SOURCE_EXTENDED 1
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
int res_search(const char *dname, int class, int type, u_char *answer, int anslen);
This routine is one of several functions used for making, sending and interpreting query and reply messages with Internet domain name servers (DNS).
The res_search() routine makes a query and awaits a response like res_query() but, in addition, it implements the default and search rules controlled by the RES_DEFNAMES and RES_DNSRCH options. It returns the first successful reply.
If successful, res_search() returns the first successful reply.