mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-10 05:03:06 +03:00
resolv: Move res_isourserver, res_send from res_data.c to res_send.c
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2017-06-30 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
|
* resolv/res_data.c (res_isourserver, res_send): Move to ...
|
||||||
|
* resolv/res_send.c (res_isourserver, res_send): here.
|
||||||
|
|
||||||
2017-06-30 Florian Weimer <fweimer@redhat.com>
|
2017-06-30 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
* resolv/res_debug.c (_res_opcodes): Rename ...
|
* resolv/res_debug.c (_res_opcodes): Rename ...
|
||||||
|
@@ -45,22 +45,6 @@ res_query(const char *name, /* domain name */
|
|||||||
return (res_nquery(&_res, name, class, type, answer, anslen));
|
return (res_nquery(&_res, name, class, type, answer, anslen));
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
res_isourserver(const struct sockaddr_in *inp) {
|
|
||||||
return (res_ourserver_p(&_res, (const struct sockaddr_in6 *) inp));
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
res_send(const u_char *buf, int buflen, u_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));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
res_close(void) {
|
res_close(void) {
|
||||||
/*
|
/*
|
||||||
|
@@ -243,6 +243,12 @@ res_ourserver_p(const res_state statp, const struct sockaddr_in6 *inp)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
res_isourserver (const struct sockaddr_in *inp)
|
||||||
|
{
|
||||||
|
return res_ourserver_p (&_res, (const struct sockaddr_in6 *) inp);
|
||||||
|
}
|
||||||
|
|
||||||
/* int
|
/* int
|
||||||
* res_nameinquery(name, type, class, buf, eom)
|
* res_nameinquery(name, type, class, buf, eom)
|
||||||
* look for (name,type,class) in the query section of packet (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)
|
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 */
|
/* Private */
|
||||||
|
|
||||||
static struct sockaddr *
|
static struct sockaddr *
|
||||||
|
Reference in New Issue
Block a user