diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2005-08-06 20:30:05 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2005-08-06 20:30:05 +0000 |
commit | cf3c0c9215e33f2bc9105fe0b05c86e36ead6de0 (patch) | |
tree | b8e75a4b6067e14759e4a504aae78c71ae093929 | |
parent | 5575231ccfc05db268e3dea33cd2ea19a160e36f (diff) |
zap rcsid.
split functions off res_debug.c so that getnetnamadr.c does not pull it
all when it's used.
okay deraadt@, krw@
47 files changed, 234 insertions, 375 deletions
diff --git a/lib/libc/net/Makefile.inc b/lib/libc/net/Makefile.inc index da746b97b18..9b1e2cfb25c 100644 --- a/lib/libc/net/Makefile.inc +++ b/lib/libc/net/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.40 2005/06/17 20:36:16 henning Exp $ +# $OpenBSD: Makefile.inc,v 1.41 2005/08/06 20:30:03 espie Exp $ # net sources .PATH: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/net ${LIBCSRCDIR}/net @@ -14,6 +14,7 @@ SRCS+= base64.c freeaddrinfo.c gai_strerror.c getaddrinfo.c gethostnamadr.c \ inet_net_ntop.c inet_net_pton.c inet_ntoa.c inet_ntop.c inet_pton.c \ ipx_addr.c ipx_ntoa.c linkaddr.c net_addrcmp.c nsap_addr.c \ rcmd.c rresvport.c recv.c res_comp.c res_data.c res_debug.c \ + res_debug_syms.c \ res_init.c res_mkquery.c res_query.c res_random.c res_send.c send.c \ sethostent.c ethers.c rcmdsh.c diff --git a/lib/libc/net/ethers.c b/lib/libc/net/ethers.c index e46dcd70061..d4243ff1dac 100644 --- a/lib/libc/net/ethers.c +++ b/lib/libc/net/ethers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ethers.c,v 1.19 2005/03/28 06:19:58 tedu Exp $ */ +/* $OpenBSD: ethers.c,v 1.20 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> @@ -22,10 +22,6 @@ * Substantially modified by Todd C. Miller <Todd.Miller@courtesan.com> */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: ethers.c,v 1.19 2005/03/28 06:19:58 tedu Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/socket.h> #include <net/if.h> diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c index c984fac7b1c..d1c7d80df62 100644 --- a/lib/libc/net/gethostnamadr.c +++ b/lib/libc/net/gethostnamadr.c @@ -1,3 +1,4 @@ +/* $OpenBSD: gethostnamadr.c,v 1.68 2005/08/06 20:30:03 espie Exp $ */ /*- * Copyright (c) 1985, 1988, 1993 * The Regents of the University of California. All rights reserved. @@ -47,10 +48,6 @@ * --Copyright-- */ -#if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.67 2005/07/27 14:16:43 millert Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/param.h> #include <sys/socket.h> #include <netinet/in.h> diff --git a/lib/libc/net/getnetbyaddr.c b/lib/libc/net/getnetbyaddr.c index 82d1ea1dcaa..a85106630c3 100644 --- a/lib/libc/net/getnetbyaddr.c +++ b/lib/libc/net/getnetbyaddr.c @@ -1,3 +1,4 @@ +/* $OpenBSD: getnetbyaddr.c,v 1.8 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getnetbyaddr.c,v 1.7 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <netdb.h> extern int _net_stayopen; diff --git a/lib/libc/net/getnetbyname.c b/lib/libc/net/getnetbyname.c index 83b3ca3817a..e6540cf12c2 100644 --- a/lib/libc/net/getnetbyname.c +++ b/lib/libc/net/getnetbyname.c @@ -1,3 +1,4 @@ +/* $OpenBSD: getnetbyname.c,v 1.8 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getnetbyname.c,v 1.7 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <netdb.h> #include <string.h> diff --git a/lib/libc/net/getnetent.c b/lib/libc/net/getnetent.c index 3e52c1ff4d5..5a2eb205af1 100644 --- a/lib/libc/net/getnetent.c +++ b/lib/libc/net/getnetent.c @@ -1,3 +1,4 @@ +/* $OpenBSD: getnetent.c,v 1.11 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getnetent.c,v 1.10 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> diff --git a/lib/libc/net/getnetnamadr.c b/lib/libc/net/getnetnamadr.c index 303ac2cc54a..7b770f1ce70 100644 --- a/lib/libc/net/getnetnamadr.c +++ b/lib/libc/net/getnetnamadr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getnetnamadr.c,v 1.25 2005/03/30 02:58:28 tedu Exp $ */ +/* $OpenBSD: getnetnamadr.c,v 1.26 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1997, Jason Downs. All rights reserved. @@ -60,16 +60,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)getnetbyaddr.c 8.1 (Berkeley) 6/4/93"; -static char sccsid_[] = "from getnetnamadr.c 1.4 (Coimbra) 93/06/03"; -static char rcsid[] = "$From: getnetnamadr.c,v 8.7 1996/08/05 08:31:35 vixie Exp $"; -#else -static char rcsid[] = "$OpenBSD: getnetnamadr.c,v 1.25 2005/03/30 02:58:28 tedu Exp $"; -#endif -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/param.h> #include <sys/socket.h> diff --git a/lib/libc/net/getproto.c b/lib/libc/net/getproto.c index 16d840394ce..07fa33288d3 100644 --- a/lib/libc/net/getproto.c +++ b/lib/libc/net/getproto.c @@ -1,3 +1,4 @@ +/* $OpenBSD: getproto.c,v 1.7 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getproto.c,v 1.6 2004/10/25 03:09:01 millert Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <netdb.h> #include <stdio.h> diff --git a/lib/libc/net/getprotoent.c b/lib/libc/net/getprotoent.c index 7e93d233ef2..7e6edc93299 100644 --- a/lib/libc/net/getprotoent.c +++ b/lib/libc/net/getprotoent.c @@ -1,3 +1,4 @@ +/* $OpenBSD: getprotoent.c,v 1.8 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getprotoent.c,v 1.7 2004/10/25 03:09:01 millert Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/socket.h> diff --git a/lib/libc/net/getprotoname.c b/lib/libc/net/getprotoname.c index f257bf4a71f..749b6b3f13d 100644 --- a/lib/libc/net/getprotoname.c +++ b/lib/libc/net/getprotoname.c @@ -1,3 +1,4 @@ +/* $OpenBSD: getprotoname.c,v 1.7 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getprotoname.c,v 1.6 2004/10/25 03:09:01 millert Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <netdb.h> #include <stdio.h> #include <string.h> diff --git a/lib/libc/net/getservbyname.c b/lib/libc/net/getservbyname.c index 062318630ff..beb8943af6b 100644 --- a/lib/libc/net/getservbyname.c +++ b/lib/libc/net/getservbyname.c @@ -1,3 +1,4 @@ +/* $OpenBSD: getservbyname.c,v 1.10 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getservbyname.c,v 1.9 2004/10/25 03:09:01 millert Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <netdb.h> #include <stdio.h> #include <string.h> diff --git a/lib/libc/net/getservbyport.c b/lib/libc/net/getservbyport.c index 5e210b2e8b8..46679ba3665 100644 --- a/lib/libc/net/getservbyport.c +++ b/lib/libc/net/getservbyport.c @@ -1,3 +1,4 @@ +/* $OpenBSD: getservbyport.c,v 1.7 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getservbyport.c,v 1.6 2004/10/25 03:09:01 millert Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <netdb.h> #include <stdio.h> #include <string.h> diff --git a/lib/libc/net/getservent.c b/lib/libc/net/getservent.c index 3eaf2a4adc9..6c1ecce78da 100644 --- a/lib/libc/net/getservent.c +++ b/lib/libc/net/getservent.c @@ -1,3 +1,4 @@ +/* $OpenBSD: getservent.c,v 1.10 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getservent.c,v 1.9 2004/10/25 03:09:01 millert Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/socket.h> diff --git a/lib/libc/net/herror.c b/lib/libc/net/herror.c index c1e5a4ba56e..7787115a9da 100644 --- a/lib/libc/net/herror.c +++ b/lib/libc/net/herror.c @@ -1,4 +1,4 @@ -/* $OpenBSD: herror.c,v 1.7 2005/03/25 13:24:12 otto Exp $ */ +/* $OpenBSD: herror.c,v 1.8 2005/08/06 20:30:03 espie Exp $ */ /* * ++Copyright++ 1987, 1993 @@ -51,15 +51,6 @@ * --Copyright-- */ -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)herror.c 8.1 (Berkeley) 6/4/93"; -static char rcsid[] = "$From: herror.c,v 8.3 1996/08/05 08:31:35 vixie Exp $"; -#else -static char rcsid[] = "$OpenBSD: herror.c,v 1.7 2005/03/25 13:24:12 otto Exp $"; -#endif -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/param.h> #include <sys/uio.h> diff --git a/lib/libc/net/htonl.c b/lib/libc/net/htonl.c index f104e190a2d..5ab4189597c 100644 --- a/lib/libc/net/htonl.c +++ b/lib/libc/net/htonl.c @@ -1,12 +1,9 @@ +/* $OpenBSD: htonl.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */ /* * Written by J.T. Conklin <jtc@netbsd.org>. * Public domain. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: htonl.c,v 1.5 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <machine/endian.h> diff --git a/lib/libc/net/htons.c b/lib/libc/net/htons.c index ded70712ea0..c8b73fdbb77 100644 --- a/lib/libc/net/htons.c +++ b/lib/libc/net/htons.c @@ -1,12 +1,9 @@ +/* $OpenBSD: htons.c,v 1.8 2005/08/06 20:30:03 espie Exp $ */ /* * Written by J.T. Conklin <jtc@netbsd.org>. * Public domain. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: htons.c,v 1.7 2002/02/19 19:39:36 millert Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <machine/endian.h> diff --git a/lib/libc/net/inet_addr.c b/lib/libc/net/inet_addr.c index b55983fd813..c962a03382d 100644 --- a/lib/libc/net/inet_addr.c +++ b/lib/libc/net/inet_addr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_addr.c,v 1.8 2005/03/25 13:24:12 otto Exp $ */ +/* $OpenBSD: inet_addr.c,v 1.9 2005/08/06 20:30:03 espie Exp $ */ /* * ++Copyright++ 1983, 1990, 1993 @@ -51,15 +51,6 @@ * --Copyright-- */ -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; -static char rcsid[] = "$From: inet_addr.c,v 8.5 1996/08/05 08:31:35 vixie Exp $"; -#else -static char rcsid[] = "$OpenBSD: inet_addr.c,v 1.8 2005/03/25 13:24:12 otto Exp $"; -#endif -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/param.h> #include <netinet/in.h> diff --git a/lib/libc/net/inet_lnaof.c b/lib/libc/net/inet_lnaof.c index 110828b2f60..b1a58cd2c19 100644 --- a/lib/libc/net/inet_lnaof.c +++ b/lib/libc/net/inet_lnaof.c @@ -1,3 +1,4 @@ +/* $OpenBSD: inet_lnaof.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: inet_lnaof.c,v 1.5 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/param.h> #include <netinet/in.h> #include <arpa/inet.h> diff --git a/lib/libc/net/inet_makeaddr.c b/lib/libc/net/inet_makeaddr.c index 9a15da8fec3..87d9325231d 100644 --- a/lib/libc/net/inet_makeaddr.c +++ b/lib/libc/net/inet_makeaddr.c @@ -1,3 +1,4 @@ +/* $OpenBSD: inet_makeaddr.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: inet_makeaddr.c,v 1.5 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/param.h> #include <netinet/in.h> #include <arpa/inet.h> diff --git a/lib/libc/net/inet_net_ntop.c b/lib/libc/net/inet_net_ntop.c index 38978f3ccf1..fc9071798ad 100644 --- a/lib/libc/net/inet_net_ntop.c +++ b/lib/libc/net/inet_net_ntop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_net_ntop.c,v 1.5 2005/03/25 13:24:12 otto Exp $ */ +/* $OpenBSD: inet_net_ntop.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1996 by Internet Software Consortium. @@ -17,14 +17,6 @@ * SOFTWARE. */ -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static const char rcsid[] = "$From: inet_net_ntop.c,v 8.2 1996/08/08 06:54:44 vixie Exp $"; -#else -static const char rcsid[] = "$OpenBSD: inet_net_ntop.c,v 1.5 2005/03/25 13:24:12 otto Exp $"; -#endif -#endif - #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> diff --git a/lib/libc/net/inet_net_pton.c b/lib/libc/net/inet_net_pton.c index e544ca7e28c..9bb35478ca2 100644 --- a/lib/libc/net/inet_net_pton.c +++ b/lib/libc/net/inet_net_pton.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_net_pton.c,v 1.4 2005/03/25 13:24:12 otto Exp $ */ +/* $OpenBSD: inet_net_pton.c,v 1.5 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1996 by Internet Software Consortium. @@ -17,14 +17,6 @@ * SOFTWARE. */ -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static const char rcsid[] = "$From: inet_net_pton.c,v 8.3 1996/11/11 06:36:52 vixie Exp $"; -#else -static const char rcsid[] = "$OpenBSD: inet_net_pton.c,v 1.4 2005/03/25 13:24:12 otto Exp $"; -#endif -#endif - #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> diff --git a/lib/libc/net/inet_neta.c b/lib/libc/net/inet_neta.c index c9bb3c04642..e3e7d0eb715 100644 --- a/lib/libc/net/inet_neta.c +++ b/lib/libc/net/inet_neta.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_neta.c,v 1.6 2005/03/25 13:24:12 otto Exp $ */ +/* $OpenBSD: inet_neta.c,v 1.7 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1996 by Internet Software Consortium. @@ -17,10 +17,6 @@ * SOFTWARE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$OpenBSD: inet_neta.c,v 1.6 2005/03/25 13:24:12 otto Exp $"; -#endif - #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> diff --git a/lib/libc/net/inet_netof.c b/lib/libc/net/inet_netof.c index 83f346c5f55..2f468c3aca5 100644 --- a/lib/libc/net/inet_netof.c +++ b/lib/libc/net/inet_netof.c @@ -1,3 +1,4 @@ +/* $OpenBSD: inet_netof.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: inet_netof.c,v 1.5 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/param.h> #include <netinet/in.h> #include <arpa/inet.h> diff --git a/lib/libc/net/inet_network.c b/lib/libc/net/inet_network.c index 7a7956ec836..8b26ba8ff9f 100644 --- a/lib/libc/net/inet_network.c +++ b/lib/libc/net/inet_network.c @@ -1,3 +1,4 @@ +/* $OpenBSD: inet_network.c,v 1.10 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: inet_network.c,v 1.9 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <netinet/in.h> #include <arpa/inet.h> diff --git a/lib/libc/net/inet_ntoa.c b/lib/libc/net/inet_ntoa.c index 0e7fe863f63..ff5d93ded2e 100644 --- a/lib/libc/net/inet_ntoa.c +++ b/lib/libc/net/inet_ntoa.c @@ -1,3 +1,4 @@ +/* $OpenBSD: inet_ntoa.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: inet_ntoa.c,v 1.5 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - /* * Convert network-format internet address * to base 256 d.d.d.d representation. diff --git a/lib/libc/net/inet_ntop.c b/lib/libc/net/inet_ntop.c index ec5c12983a8..d36a0d78898 100644 --- a/lib/libc/net/inet_ntop.c +++ b/lib/libc/net/inet_ntop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_ntop.c,v 1.6 2005/03/25 13:24:12 otto Exp $ */ +/* $OpenBSD: inet_ntop.c,v 1.7 2005/08/06 20:30:03 espie Exp $ */ /* Copyright (c) 1996 by Internet Software Consortium. * @@ -16,14 +16,6 @@ * SOFTWARE. */ -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char rcsid[] = "$From: inet_ntop.c,v 8.7 1996/08/05 08:41:18 vixie Exp $"; -#else -static char rcsid[] = "$OpenBSD: inet_ntop.c,v 1.6 2005/03/25 13:24:12 otto Exp $"; -#endif -#endif /* LIBC_SCCS and not lint */ - #include <sys/param.h> #include <sys/types.h> #include <sys/socket.h> diff --git a/lib/libc/net/inet_pton.c b/lib/libc/net/inet_pton.c index ec158d45994..87206ee8b84 100644 --- a/lib/libc/net/inet_pton.c +++ b/lib/libc/net/inet_pton.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_pton.c,v 1.5 2005/03/25 13:24:12 otto Exp $ */ +/* $OpenBSD: inet_pton.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */ /* Copyright (c) 1996 by Internet Software Consortium. * @@ -16,14 +16,6 @@ * SOFTWARE. */ -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char rcsid[] = "$From: inet_pton.c,v 8.7 1996/08/05 08:31:35 vixie Exp $"; -#else -static char rcsid[] = "$OpenBSD: inet_pton.c,v 1.5 2005/03/25 13:24:12 otto Exp $"; -#endif -#endif /* LIBC_SCCS and not lint */ - #include <sys/param.h> #include <sys/types.h> #include <sys/socket.h> diff --git a/lib/libc/net/ipx_addr.c b/lib/libc/net/ipx_addr.c index c7f83061285..b65d5f6cfdb 100644 --- a/lib/libc/net/ipx_addr.c +++ b/lib/libc/net/ipx_addr.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ipx_addr.c,v 1.8 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1986, 1993 * The Regents of the University of California. All rights reserved. @@ -32,10 +33,6 @@ * from @(#)ipx_addr.c */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: ipx_addr.c,v 1.7 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/param.h> #include <netipx/ipx.h> #include <stdio.h> diff --git a/lib/libc/net/ipx_ntoa.c b/lib/libc/net/ipx_ntoa.c index 64ba146b315..9b1b6a1c490 100644 --- a/lib/libc/net/ipx_ntoa.c +++ b/lib/libc/net/ipx_ntoa.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ipx_ntoa.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1986, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: ipx_ntoa.c,v 1.5 2003/09/26 06:19:25 deraadt Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/param.h> #include <netipx/ipx.h> #include <stdio.h> diff --git a/lib/libc/net/linkaddr.c b/lib/libc/net/linkaddr.c index fcb0164ca49..ac96f3acdf3 100644 --- a/lib/libc/net/linkaddr.c +++ b/lib/libc/net/linkaddr.c @@ -1,3 +1,4 @@ +/* $OpenBSD: linkaddr.c,v 1.5 2005/08/06 20:30:03 espie Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: linkaddr.c,v 1.4 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/socket.h> #include <net/if_dl.h> diff --git a/lib/libc/net/nsap_addr.c b/lib/libc/net/nsap_addr.c index 58c0d5e493b..50e3bdda95d 100644 --- a/lib/libc/net/nsap_addr.c +++ b/lib/libc/net/nsap_addr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nsap_addr.c,v 1.5 2005/03/25 13:24:12 otto Exp $ */ +/* $OpenBSD: nsap_addr.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1996 by Internet Software Consortium. @@ -17,14 +17,6 @@ * SOFTWARE. */ -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char rcsid[] = "$From: nsap_addr.c,v 8.3 1996/08/05 08:31:35 vixie Exp $"; -#else -static char rcsid[] = "$OpenBSD: nsap_addr.c,v 1.5 2005/03/25 13:24:12 otto Exp $"; -#endif -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/param.h> #include <sys/socket.h> diff --git a/lib/libc/net/ntohl.c b/lib/libc/net/ntohl.c index c8b2ca2bb5a..36414b7a132 100644 --- a/lib/libc/net/ntohl.c +++ b/lib/libc/net/ntohl.c @@ -1,12 +1,9 @@ +/* $OpenBSD: ntohl.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */ /* * Written by J.T. Conklin <jtc@netbsd.org>. * Public domain. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: ntohl.c,v 1.5 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <machine/endian.h> diff --git a/lib/libc/net/ntohs.c b/lib/libc/net/ntohs.c index 4c3ab33f31c..8f345e84ad7 100644 --- a/lib/libc/net/ntohs.c +++ b/lib/libc/net/ntohs.c @@ -1,12 +1,9 @@ +/* $OpenBSD: ntohs.c,v 1.8 2005/08/06 20:30:03 espie Exp $ */ /* * Written by J.T. Conklin <jtc@netbsd.org>. * Public domain. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: ntohs.c,v 1.7 2002/02/19 19:39:36 millert Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <machine/endian.h> diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c index bfe8c3ae564..d211f404a2b 100644 --- a/lib/libc/net/rcmd.c +++ b/lib/libc/net/rcmd.c @@ -28,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: rcmd.c,v 1.52 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/param.h> #include <sys/socket.h> #include <sys/stat.h> diff --git a/lib/libc/net/rcmdsh.c b/lib/libc/net/rcmdsh.c index 28f0ca88a62..34a228d1e95 100644 --- a/lib/libc/net/rcmdsh.c +++ b/lib/libc/net/rcmdsh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcmdsh.c,v 1.10 2005/03/25 13:24:12 otto Exp $ */ +/* $OpenBSD: rcmdsh.c,v 1.11 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 2001, MagniComp @@ -33,10 +33,6 @@ * Chris Siebenmann <cks@utcc.utoronto.ca>. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.10 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/socket.h> #include <sys/wait.h> diff --git a/lib/libc/net/recv.c b/lib/libc/net/recv.c index 981b5e7a6ae..6241cc6b12f 100644 --- a/lib/libc/net/recv.c +++ b/lib/libc/net/recv.c @@ -1,3 +1,4 @@ +/* $OpenBSD: recv.c,v 1.5 2005/08/06 20:30:03 espie Exp $ */ /* * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: recv.c,v 1.4 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/socket.h> diff --git a/lib/libc/net/res_comp.c b/lib/libc/net/res_comp.c index 62c04d8518f..9bdc26dd246 100644 --- a/lib/libc/net/res_comp.c +++ b/lib/libc/net/res_comp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_comp.c,v 1.12 2005/03/25 13:24:12 otto Exp $ */ +/* $OpenBSD: res_comp.c,v 1.13 2005/08/06 20:30:03 espie Exp $ */ /* * ++Copyright++ 1985, 1993 @@ -51,15 +51,6 @@ * --Copyright-- */ -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93"; -static char rcsid[] = "$From: res_comp.c,v 8.11 1996/12/02 09:17:22 vixie Exp $"; -#else -static char rcsid[] = "$OpenBSD: res_comp.c,v 1.12 2005/03/25 13:24:12 otto Exp $"; -#endif -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/param.h> #include <netinet/in.h> diff --git a/lib/libc/net/res_data.c b/lib/libc/net/res_data.c index 967264bcb70..a5f6b03a7f7 100644 --- a/lib/libc/net/res_data.c +++ b/lib/libc/net/res_data.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_data.c,v 1.2 2003/06/02 20:18:36 millert Exp $ */ +/* $OpenBSD: res_data.c,v 1.3 2005/08/06 20:30:03 espie Exp $ */ /* * ++Copyright++ 1995 @@ -51,14 +51,6 @@ * --Copyright-- */ -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char rcsid[] = "$From: res_data.c,v 8.2 1996/08/05 08:31:35 vixie Exp $"; -#else -static char rcsid[] = "$OpenBSD: res_data.c,v 1.2 2003/06/02 20:18:36 millert Exp $"; -#endif -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/param.h> #include <sys/socket.h> 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 * diff --git a/lib/libc/net/res_debug_syms.c b/lib/libc/net/res_debug_syms.c new file mode 100644 index 00000000000..7e7d22c914d --- /dev/null +++ b/lib/libc/net/res_debug_syms.c @@ -0,0 +1,189 @@ +/* $OpenBSD: res_debug_syms.c,v 1.1 2005/08/06 20:30:04 espie Exp $ */ + +/* + * ++Copyright++ 1985, 1990, 1993 + * - + * Copyright (c) 1985, 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * - + * Portions Copyright (c) 1993 by Digital Equipment Corporation. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies, and that + * the name of Digital Equipment Corporation not be used in advertising or + * publicity pertaining to distribution of the document or software without + * specific, written prior permission. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT + * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + * - + * Portions Copyright (c) 1995 by International Business Machines, Inc. + * + * International Business Machines, Inc. (hereinafter called IBM) grants + * permission under its copyrights to use, copy, modify, and distribute this + * Software with or without fee, provided that the above copyright notice and + * all paragraphs of this notice appear in all copies, and that the name of IBM + * not be used in connection with the marketing of any product incorporating + * the Software or modifications thereof, without specific, written prior + * permission. + * + * To the extent it has a right to do so, IBM grants an immunity from suit + * under its patents, if any, for the use, sale or manufacture of products to + * the extent that such products are used for performing Domain Name System + * dynamic updates in TCP/IP networks by means of the Software. No immunity is + * granted for any product per se or for any other function of any product. + * + * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, + * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + * --Copyright-- + */ + + +#include <sys/types.h> +#include <netinet/in.h> +#include <arpa/nameser.h> + +#include <resolv.h> +#include <stdio.h> + +/* + * 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} +}; + +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); +} + +/* + * 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)); +} + diff --git a/lib/libc/net/res_init.c b/lib/libc/net/res_init.c index 110542a4042..62ccb94630f 100644 --- a/lib/libc/net/res_init.c +++ b/lib/libc/net/res_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_init.c,v 1.32 2005/03/30 02:58:28 tedu Exp $ */ +/* $OpenBSD: res_init.c,v 1.33 2005/08/06 20:30:04 espie Exp $ */ /* * ++Copyright++ 1985, 1989, 1993 @@ -55,15 +55,6 @@ #define INET6 #endif -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; -static char rcsid[] = "$From: res_init.c,v 8.7 1996/09/28 06:51:07 vixie Exp $"; -#else -static char rcsid[] = "$OpenBSD: res_init.c,v 1.32 2005/03/30 02:58:28 tedu Exp $"; -#endif -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/param.h> #include <sys/socket.h> diff --git a/lib/libc/net/res_mkquery.c b/lib/libc/net/res_mkquery.c index a6c37379f9d..5c6b273abec 100644 --- a/lib/libc/net/res_mkquery.c +++ b/lib/libc/net/res_mkquery.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_mkquery.c,v 1.16 2005/03/30 02:58:28 tedu Exp $ */ +/* $OpenBSD: res_mkquery.c,v 1.17 2005/08/06 20:30:04 espie Exp $ */ /* * ++Copyright++ 1985, 1993 @@ -51,15 +51,6 @@ * --Copyright-- */ -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93"; -static char rcsid[] = "$From: res_mkquery.c,v 8.5 1996/08/27 08:33:28 vixie Exp $"; -#else -static char rcsid[] = "$OpenBSD: res_mkquery.c,v 1.16 2005/03/30 02:58:28 tedu Exp $"; -#endif -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/param.h> #include <netinet/in.h> diff --git a/lib/libc/net/res_query.c b/lib/libc/net/res_query.c index 4af1651cf13..32cd04306cb 100644 --- a/lib/libc/net/res_query.c +++ b/lib/libc/net/res_query.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_query.c,v 1.23 2005/03/30 02:58:28 tedu Exp $ */ +/* $OpenBSD: res_query.c,v 1.24 2005/08/06 20:30:04 espie Exp $ */ /* * ++Copyright++ 1988, 1993 @@ -51,15 +51,6 @@ * --Copyright-- */ -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93"; -static char rcsid[] = "$From: res_query.c,v 8.9 1996/09/22 00:13:28 vixie Exp $"; -#else -static char rcsid[] = "$OpenBSD: res_query.c,v 1.23 2005/03/30 02:58:28 tedu Exp $"; -#endif -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/param.h> #include <netinet/in.h> diff --git a/lib/libc/net/res_send.c b/lib/libc/net/res_send.c index ee7ce430350..f7631350bc4 100644 --- a/lib/libc/net/res_send.c +++ b/lib/libc/net/res_send.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_send.c,v 1.18 2005/03/30 02:58:28 tedu Exp $ */ +/* $OpenBSD: res_send.c,v 1.19 2005/08/06 20:30:04 espie Exp $ */ /* * ++Copyright++ 1985, 1989, 1993 @@ -55,15 +55,6 @@ #define INET6 #endif -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93"; -static char rcsid[] = "$From: res_send.c,v 8.12 1996/10/08 04:51:06 vixie Exp $"; -#else -static char rcsid[] = "$OpenBSD: res_send.c,v 1.18 2005/03/30 02:58:28 tedu Exp $"; -#endif -#endif /* LIBC_SCCS and not lint */ - /* change this to "0" * if you talk to a lot * of multi-homed SunOS diff --git a/lib/libc/net/rresvport.c b/lib/libc/net/rresvport.c index eee872898bd..98630ce3c73 100644 --- a/lib/libc/net/rresvport.c +++ b/lib/libc/net/rresvport.c @@ -28,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: rresvport.c,v 1.7 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/param.h> #include <sys/socket.h> #include <sys/stat.h> diff --git a/lib/libc/net/send.c b/lib/libc/net/send.c index f28933369c4..1bfc80b87a5 100644 --- a/lib/libc/net/send.c +++ b/lib/libc/net/send.c @@ -1,3 +1,4 @@ +/* $OpenBSD: send.c,v 1.5 2005/08/06 20:30:04 espie Exp $ */ /* * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: send.c,v 1.4 2005/03/25 13:24:12 otto Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/types.h> #include <sys/socket.h> diff --git a/lib/libc/net/sethostent.c b/lib/libc/net/sethostent.c index c0eae942ca0..6f6d0e405a1 100644 --- a/lib/libc/net/sethostent.c +++ b/lib/libc/net/sethostent.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sethostent.c,v 1.9 2005/08/06 20:30:04 espie Exp $ */ /* * Copyright (c) 1985, 1993 * The Regents of the University of California. All rights reserved. @@ -27,10 +28,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: sethostent.c,v 1.8 2005/03/30 02:58:28 tedu Exp $"; -#endif /* LIBC_SCCS and not lint */ - #include <sys/param.h> #include <netinet/in.h> #include <arpa/nameser.h> |