summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/res_debug.c
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2005-08-06 20:30:03 +0000
committerespie <espie@openbsd.org>2005-08-06 20:30:03 +0000
commit0038de2c7a95ab6cde30035b4c13f3d21c8a1310 (patch)
tree51dbddadcc4e55dded94d5f2f79c68c75f231181 /lib/libc/net/res_debug.c
parentreplace port number 8025 w/ symbolic `spamd'; (diff)
downloadwireguard-openbsd-0038de2c7a95ab6cde30035b4c13f3d21c8a1310.tar.xz
wireguard-openbsd-0038de2c7a95ab6cde30035b4c13f3d21c8a1310.zip
zap rcsid.
split functions off res_debug.c so that getnetnamadr.c does not pull it all when it's used. okay deraadt@, krw@
Diffstat (limited to 'lib/libc/net/res_debug.c')
-rw-r--r--lib/libc/net/res_debug.c117
1 files changed, 1 insertions, 116 deletions
diff --git a/lib/libc/net/res_debug.c b/lib/libc/net/res_debug.c
index 82a067c1f0a..8e72c2a5e5b 100644
--- a/lib/libc/net/res_debug.c
+++ b/lib/libc/net/res_debug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_debug.c,v 1.20 2005/03/30 02:58:28 tedu Exp $ */
+/* $OpenBSD: res_debug.c,v 1.21 2005/08/06 20:30:04 espie Exp $ */
/*
* ++Copyright++ 1985, 1990, 1993
@@ -73,15 +73,6 @@
* --Copyright--
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$From: res_debug.c,v 8.19 1996/11/26 10:11:23 vixie Exp $";
-#else
-static char rcsid[] = "$OpenBSD: res_debug.c,v 1.20 2005/03/30 02:58:28 tedu Exp $";
-#endif
-#endif /* LIBC_SCCS and not lint */
-
#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
@@ -836,75 +827,6 @@ __p_rr(const u_char *cp, const u_char *msg, FILE *file)
return (cp);
}
-/*
- * Names of RR classes and qclasses. Classes and qclasses are the same, except
- * that C_ANY is a qclass but not a class. (You can ask for records of class
- * C_ANY, but you can't have any records of that class in the database.)
- */
-const struct res_sym __p_class_syms[] = {
- {C_IN, "IN"},
- {C_CHAOS, "CHAOS"},
- {C_HS, "HS"},
- {C_HS, "HESIOD"},
- {C_ANY, "ANY"},
- {C_IN, (char *)0}
-};
-
-/*
- * Names of RR types and qtypes. Types and qtypes are the same, except
- * that T_ANY is a qtype but not a type. (You can ask for records of type
- * T_ANY, but you can't have any records of that type in the database.)
- */
-const struct res_sym __p_type_syms[] = {
- {T_A, "A", "address"},
- {T_NS, "NS", "name server"},
- {T_MD, "MD", "mail destination (deprecated)"},
- {T_MF, "MF", "mail forwarder (deprecated)"},
- {T_CNAME, "CNAME", "canonical name"},
- {T_SOA, "SOA", "start of authority"},
- {T_MB, "MB", "mailbox"},
- {T_MG, "MG", "mail group member"},
- {T_MR, "MR", "mail rename"},
- {T_NULL, "NULL", "null"},
- {T_WKS, "WKS", "well-known service (deprecated)"},
- {T_PTR, "PTR", "domain name pointer"},
- {T_HINFO, "HINFO", "host information"},
- {T_MINFO, "MINFO", "mailbox information"},
- {T_MX, "MX", "mail exchanger"},
- {T_TXT, "TXT", "text"},
- {T_RP, "RP", "responsible person"},
- {T_AFSDB, "AFSDB", "DCE or AFS server"},
- {T_X25, "X25", "X25 address"},
- {T_ISDN, "ISDN", "ISDN address"},
- {T_RT, "RT", "router"},
- {T_NSAP, "NSAP", "nsap address"},
- {T_NSAP_PTR, "NSAP_PTR", "domain name pointer"},
- {T_SIG, "SIG", "signature"},
- {T_KEY, "KEY", "key"},
- {T_PX, "PX", "mapping information"},
- {T_GPOS, "GPOS", "geographical position (withdrawn)"},
- {T_AAAA, "AAAA", "IPv6 address"},
- {T_LOC, "LOC", "location"},
- {T_NXT, "NXT", "next valid name (unimplemented)"},
- {T_EID, "EID", "endpoint identifier (unimplemented)"},
- {T_NIMLOC, "NIMLOC", "NIMROD locator (unimplemented)"},
- {T_SRV, "SRV", "server selection"},
- {T_ATMA, "ATMA", "ATM address (unimplemented)"},
- {T_IXFR, "IXFR", "incremental zone transfer"},
- {T_AXFR, "AXFR", "zone transfer"},
- {T_MAILB, "MAILB", "mailbox-related data (deprecated)"},
- {T_MAILA, "MAILA", "mail agent (deprecated)"},
- {T_UINFO, "UINFO", "user information (nonstandard)"},
- {T_UID, "UID", "user ID (nonstandard)"},
- {T_GID, "GID", "group ID (nonstandard)"},
- {T_NAPTR, "NAPTR", "URN Naming Authority"},
-#ifdef ALLOW_T_UNSPEC
- {T_UNSPEC, "UNSPEC", "unspecified data (nonstandard)"},
-#endif /* ALLOW_T_UNSPEC */
- {T_ANY, "ANY", "\"any\""},
- {0, NULL, NULL}
-};
-
int
__sym_ston(const struct res_sym *syms, char *name, int *success)
{
@@ -920,25 +842,6 @@ __sym_ston(const struct res_sym *syms, char *name, int *success)
return (syms->number); /* The default value. */
}
-const char *
-__sym_ntos(const struct res_sym *syms, int number, int *success)
-{
- static char unname[20];
-
- for (; syms->name != 0; syms++) {
- if (number == syms->number) {
- if (success)
- *success = 1;
- return (syms->name);
- }
- }
-
- snprintf(unname, sizeof unname, "%d", number);
- if (success)
- *success = 0;
- return (unname);
-}
-
const char *
__sym_ntop(const struct res_sym *syms, int number, int *success)
@@ -959,24 +862,6 @@ __sym_ntop(const struct res_sym *syms, int number, int *success)
}
/*
- * Return a string for the type
- */
-const char *
-__p_type(int type)
-{
- return (__sym_ntos (__p_type_syms, type, (int *)0));
-}
-
-/*
- * Return a mnemonic for class
- */
-const char *
-__p_class(int class)
-{
- return (__sym_ntos (__p_class_syms, class, (int *)0));
-}
-
-/*
* Return a mnemonic for an option
*/
const char *