1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

resolv: Move fp_nquery, fp_query, p_query, _res_opcodes

From res_data.c to res_debug.c.

Also drop the unnecessary _res initialization from fp_nquery.
This commit is contained in:
Florian Weimer
2017-06-30 11:31:35 +02:00
parent 4d4ce84924
commit d85f99679d
4 changed files with 71 additions and 59 deletions

View File

@@ -32,46 +32,6 @@
#include <string.h>
#include <unistd.h>
const char *_res_opcodes[] = {
"QUERY",
"IQUERY",
"CQUERYM",
"CQUERYU", /* experimental */
"NOTIFY", /* experimental */
"UPDATE",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"ZONEINIT",
"ZONEREF",
};
libresolv_hidden_data_def (_res_opcodes)
void
p_query(const u_char *msg) {
fp_query(msg, stdout);
}
void
fp_query(const u_char *msg, FILE *file) {
fp_nquery(msg, PACKETSZ, file);
}
libresolv_hidden_def (fp_query)
void
fp_nquery(const u_char *msg, int len, FILE *file) {
if (__res_maybe_init (&_res, 0) == -1)
return;
res_pquery(&_res, msg, len, file);
}
libresolv_hidden_def (fp_nquery)
int
res_query(const char *name, /* domain name */
int class, int type, /* class and type of query */