diff options
author | Florian Weimer <fweimer@redhat.com> | 2017-06-30 11:31:54 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2017-06-30 11:31:55 +0200 |
commit | 037751179905c7d6d624f287029237565465fa9a (patch) | |
tree | ffdf64994c457f696938c14b4e1d3059904a8a9a /resolv/res_data.c | |
parent | ded603542a8af41dc0c45af883d52390683f63aa (diff) | |
download | glibc-037751179905c7d6d624f287029237565465fa9a.zip glibc-037751179905c7d6d624f287029237565465fa9a.tar.gz glibc-037751179905c7d6d624f287029237565465fa9a.tar.bz2 |
resolv: Move res_query, res_search res_querydomain, hostalias
From res_data.c to query.c
Diffstat (limited to 'resolv/res_data.c')
-rw-r--r-- | resolv/res_data.c | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/resolv/res_data.c b/resolv/res_data.c index b790b4b..5e7688c 100644 --- a/resolv/res_data.c +++ b/resolv/res_data.c @@ -15,35 +15,7 @@ * SOFTWARE. */ -#include <sys/types.h> -#include <sys/param.h> -#include <sys/socket.h> -#include <sys/time.h> - -#include <netinet/in.h> -#include <arpa/inet.h> -#include <arpa/nameser.h> - -#include <ctype.h> -#include <netdb.h> #include <resolv.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -int -res_query(const char *name, /* domain name */ - int class, int type, /* class and type of query */ - u_char *answer, /* buffer to put answer */ - int anslen) /* size of answer buffer */ -{ - if (__res_maybe_init (&_res, 1) == -1) { - RES_SET_H_ERRNO(&_res, NETDB_INTERNAL); - return (-1); - } - return (res_nquery(&_res, name, class, type, answer, anslen)); -} void res_close(void) { @@ -60,55 +32,3 @@ res_close(void) { did it and it would be done implicitly on shutdown. */ __res_iclose(&_res, false); } - -int -res_search(const char *name, /* domain name */ - int class, int type, /* class and type of query */ - u_char *answer, /* buffer to put answer */ - int anslen) /* size of answer */ -{ - if (__res_maybe_init (&_res, 1) == -1) { - RES_SET_H_ERRNO(&_res, NETDB_INTERNAL); - return (-1); - } - - return (res_nsearch(&_res, name, class, type, answer, anslen)); -} - -int -res_querydomain(const char *name, - const char *domain, - int class, int type, /* class and type of query */ - u_char *answer, /* buffer to put answer */ - int anslen) /* size of answer */ -{ - if (__res_maybe_init (&_res, 1) == -1) { - RES_SET_H_ERRNO(&_res, NETDB_INTERNAL); - return (-1); - } - - return (res_nquerydomain(&_res, name, domain, - class, type, - answer, anslen)); -} - -const char * -hostalias(const char *name) { - static char abuf[MAXDNAME]; - - return (res_hostalias(&_res, name, abuf, sizeof abuf)); -} -libresolv_hidden_def (hostalias) - - - -#include <shlib-compat.h> - -#if SHLIB_COMPAT(libresolv, GLIBC_2_0, GLIBC_2_2) -# undef res_query -# undef res_querydomain -# undef res_search -weak_alias (__res_query, res_query); -weak_alias (__res_querydomain, res_querydomain); -weak_alias (__res_search, res_search); -#endif |