p_rr, p_time, p_type, putlong and putshort hidden
SCCS-vsn: lib/libc/net/Makefile.inc 5.3
SCCS-vsn: lib/libc/net/gethostnamadr.c 6.42
SCCS-vsn: lib/libc/net/res_comp.c 6.19
SCCS-vsn: lib/libc/net/res_debug.c 5.32
SCCS-vsn: lib/libc/net/res_mkquery.c 6.14
SCCS-vsn: lib/libc/net/res_query.c 5.8
SCCS-vsn: lib/libc/net/res_send.c 6.26
-# @(#)Makefile.inc 5.2 (Berkeley) %G%
+# @(#)Makefile.inc 5.3 (Berkeley) %G%
# net sources
.PATH: ${.CURDIR}/${MACHINE}/net ${.CURDIR}/net
# net sources
.PATH: ${.CURDIR}/${MACHINE}/net ${.CURDIR}/net
inet.3 inet_ntoa.3 inet.3 network.3 inet.3 ntoa.3
MLINKS+=ns.3 ns_addr.3 ns.3 ns_ntoa.3
MLINKS+=rcmd.3 rresvport.3 rcmd.3 ruserok.3
inet.3 inet_ntoa.3 inet.3 network.3 inet.3 ntoa.3
MLINKS+=ns.3 ns_addr.3 ns.3 ns_ntoa.3
MLINKS+=rcmd.3 rresvport.3 rcmd.3 ruserok.3
+MLINKS+=resolver.3 dn_comp.3 resolver.3 dn_expand.3 resolver.3 res_init.3 \
+ resolver.3 res_mkquery.3 resolver.3 res_send.3 resolver.3 res_query.3 \
+ resolver.3 res_search.3
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 6.41 (Berkeley) %G%";
+static char sccsid[] = "@(#)gethostnamadr.c 6.42 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
bp += n;
buflen -= n;
} else
bp += n;
buflen -= n;
} else
- cp += dn_skipname(cp, eom) + QFIXEDSZ;
+ cp += __dn_skipname(cp, eom) + QFIXEDSZ;
- cp += dn_skipname(cp, eom) + QFIXEDSZ;
+ cp += __dn_skipname(cp, eom) + QFIXEDSZ;
} else if (iquery) {
if (hp->aa)
h_errno = HOST_NOT_FOUND;
} else if (iquery) {
if (hp->aa)
h_errno = HOST_NOT_FOUND;
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_comp.c 6.18 (Berkeley) %G%";
+static char sccsid[] = "@(#)res_comp.c 6.19 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
/*
* Skip over a compressed domain name. Return the size or -1.
*/
/*
* Skip over a compressed domain name. Return the size or -1.
*/
-dn_skipname(comp_dn, eom)
+__dn_skipname(comp_dn, eom)
u_char *comp_dn, *eom;
{
register u_char *cp;
u_char *comp_dn, *eom;
{
register u_char *cp;
register u_short s;
register u_char *msgp;
{
register u_short s;
register u_char *msgp;
{
msgp[1] = s;
msgp[0] = s >> 8;
}
msgp[1] = s;
msgp[0] = s >> 8;
}
register u_long l;
register u_char *msgp;
{
register u_long l;
register u_char *msgp;
{
msgp[3] = l;
msgp[2] = (l >>= 8);
msgp[1] = (l >>= 8);
msgp[3] = l;
msgp[2] = (l >>= 8);
msgp[1] = (l >>= 8);
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)res_debug.c 5.31 (Berkeley) %G%
+ * @(#)res_debug.c 5.32 (Berkeley) %G%
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_debug.c 5.31 (Berkeley) %G%";
+static char sccsid[] = "@(#)res_debug.c 5.32 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
#include <stdio.h>
#include <arpa/nameser.h>
#include <stdio.h>
#include <arpa/nameser.h>
-extern char *p_cdname(), *p_rr(), *p_type(), *p_class(), *p_time();
extern char *inet_ntoa();
extern char *inet_ntoa();
+static char *p_cdname(), *p_class(), *p_rr(), *p_time(), *p_type();
char *_res_opcodes[] = {
"QUERY",
char *_res_opcodes[] = {
"QUERY",
char *msg;
{
fp_query(msg,stdout);
char *msg;
{
fp_query(msg,stdout);
* Print the contents of a query.
* This is intended to be primarily a debugging routine.
*/
* Print the contents of a query.
* This is intended to be primarily a debugging routine.
*/
fp_query(msg,file)
char *msg;
FILE *file;
fp_query(msg,file)
char *msg;
FILE *file;
return;
fprintf(file,", type = %s", p_type(_getshort(cp)));
cp += sizeof(u_short);
return;
fprintf(file,", type = %s", p_type(_getshort(cp)));
cp += sizeof(u_short);
- fprintf(file,", class = %s\n\n", p_class(_getshort(cp)));
+ fprintf(file,
+ ", class = %s\n\n", p_class(_getshort(cp)));
cp += sizeof(u_short);
}
}
cp += sizeof(u_short);
}
}
p_cdname(cp, msg, file)
char *cp, *msg;
FILE *file;
p_cdname(cp, msg, file)
char *cp, *msg;
FILE *file;
/*
* Print resource record fields in human readable form.
*/
/*
* Print resource record fields in human readable form.
*/
p_rr(cp, msg, file)
char *cp, *msg;
FILE *file;
p_rr(cp, msg, file)
char *cp, *msg;
FILE *file;
/*
* Return a string for the type
*/
/*
* Return a string for the type
*/
/*
* Return a mnemonic for class
*/
/*
* Return a mnemonic for class
*/
p_class(class)
int class;
{
p_class(class)
int class;
{
/*
* Return a mnemonic for a time to live
*/
/*
* Return a mnemonic for a time to live
*/
p_time(value)
u_long value;
{
p_time(value)
u_long value;
{
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_mkquery.c 6.13 (Berkeley) %G%";
+static char sccsid[] = "@(#)res_mkquery.c 6.14 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
return (-1);
cp += n;
buflen -= n;
return (-1);
cp += n;
buflen -= n;
cp += sizeof(u_short);
hp->qdcount = htons(1);
if (op == QUERY || data == NULL)
cp += sizeof(u_short);
hp->qdcount = htons(1);
if (op == QUERY || data == NULL)
return (-1);
cp += n;
buflen -= n;
return (-1);
cp += n;
buflen -= n;
+ __putshort(T_NULL, cp);
cp += sizeof(u_short);
hp->arcount = htons(1);
break;
cp += sizeof(u_short);
hp->arcount = htons(1);
break;
if (buflen < 1 + RRFIXEDSZ + datalen)
return (-1);
*cp++ = '\0'; /* no domain name */
if (buflen < 1 + RRFIXEDSZ + datalen)
return (-1);
*cp++ = '\0'; /* no domain name */
+ __putshort(datalen, cp);
cp += sizeof(u_short);
if (datalen) {
bcopy(data, cp, datalen);
cp += sizeof(u_short);
if (datalen) {
bcopy(data, cp, datalen);
if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
return (-1);
cp += n;
if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
return (-1);
cp += n;
+ __putshort(datalen, cp);
cp += sizeof(u_short);
if (datalen) {
bcopy(data, cp, datalen);
cp += sizeof(u_short);
if (datalen) {
bcopy(data, cp, datalen);
if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
return (-1);
cp += n;
if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
return (-1);
cp += n;
- putshort(newrr->r_type, cp);
+ __putshort(newrr->r_type, cp);
- putshort(newrr->r_class, cp);
+ __putshort(newrr->r_class, cp);
- putshort(newrr->r_size, cp);
+ __putshort(newrr->r_size, cp);
cp += sizeof(u_short);
if (newrr->r_size) {
bcopy(newrr->r_data, cp, newrr->r_size);
cp += sizeof(u_short);
if (newrr->r_size) {
bcopy(newrr->r_data, cp, newrr->r_size);
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_query.c 5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)res_query.c 5.8 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
{
register char *cp, **domain;
int n, ret, got_nodata = 0;
{
register char *cp, **domain;
int n, ret, got_nodata = 0;
+ static char *hostalias();
if ((_res.options & RES_INIT) == 0 && res_init() == -1)
return (-1);
if ((_res.options & RES_INIT) == 0 && res_init() == -1)
return (-1);
return (res_query(longname, class, type, answer, anslen));
}
return (res_query(longname, class, type, answer, anslen));
}
hostalias(name)
register char *name;
{
hostalias(name)
register char *name;
{
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_send.c 6.25 (Berkeley) %G%";
+static char sccsid[] = "@(#)res_send.c 6.26 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
/*
#endif /* LIBC_SCCS and not lint */
/*
#ifdef DEBUG
if (_res.options & RES_DEBUG) {
printf("res_send()\n");
#ifdef DEBUG
if (_res.options & RES_DEBUG) {
printf("res_send()\n");
}
#endif DEBUG
if (!(_res.options & RES_INIT))
}
#endif DEBUG
if (!(_res.options & RES_INIT))
#ifdef DEBUG
if (_res.options & RES_DEBUG) {
printf("old answer:\n");
#ifdef DEBUG
if (_res.options & RES_DEBUG) {
printf("old answer:\n");
}
#endif DEBUG
goto wait;
}
#endif DEBUG
goto wait;
#ifdef DEBUG
if (_res.options & RES_DEBUG) {
printf("got answer:\n");
#ifdef DEBUG
if (_res.options & RES_DEBUG) {
printf("got answer:\n");