diff options
author | Florian Weimer <fweimer@redhat.com> | 2017-06-30 11:31:47 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2017-06-30 11:31:48 +0200 |
commit | ded603542a8af41dc0c45af883d52390683f63aa (patch) | |
tree | e2e714111376571790c1b71c881c77f99a3620e4 /resolv/res_send.c | |
parent | 6781d8e693eb9e1251875222db5c9885d7ebb596 (diff) | |
download | glibc-ded603542a8af41dc0c45af883d52390683f63aa.tar glibc-ded603542a8af41dc0c45af883d52390683f63aa.tar.gz glibc-ded603542a8af41dc0c45af883d52390683f63aa.tar.bz2 glibc-ded603542a8af41dc0c45af883d52390683f63aa.zip |
resolv: Move res_isourserver, res_send from res_data.c to res_send.c
Diffstat (limited to 'resolv/res_send.c')
-rw-r--r-- | resolv/res_send.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/resolv/res_send.c b/resolv/res_send.c index 01b9b0e16a..a7daae8a06 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -243,6 +243,12 @@ res_ourserver_p(const res_state statp, const struct sockaddr_in6 *inp) return (0); } +int +res_isourserver (const struct sockaddr_in *inp) +{ + return res_ourserver_p (&_res, (const struct sockaddr_in6 *) inp); +} + /* int * res_nameinquery(name, type, class, buf, eom) * look for (name,type,class) in the query section of packet (buf,eom) @@ -544,6 +550,15 @@ res_nsend(res_state statp, } libresolv_hidden_def (res_nsend) +int +res_send (const unsigned char *buf, int buflen, unsigned char *ans, int anssiz) +{ + if (__res_maybe_init (&_res, 1) == -1) + /* errno should have been set by res_init in this case. */ + return -1; + return res_nsend (&_res, buf, buflen, ans, anssiz); +} + /* Private */ static struct sockaddr * |