#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-decnet.c,v 1.31 2001-01-20 07:22:24 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-decnet.c,v 1.35 2002-08-01 08:53:04 risso Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/socket.h>
+#include <tcpdump-stdinc.h>
struct mbuf;
struct rtentry;
-#ifdef HAVE_LIBDNET
+#ifdef HAVE_NETDNET_DNETDB_H
#include <netdnet/dnetdb.h>
#endif
-#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include "decnet.h"
#include "extract.h"
static void pdata(u_char *, int);
#endif
-#ifdef HAVE_LIBDNET
+#ifndef HAVE_NETDNET_DNETDB_H_DNET_HTOA
extern char *dnet_htoa(struct dn_naddr *);
#endif
printf("%s ", tok2str(reason2str, "reason-%d", reason));
}
-char *
+const char *
dnnum_string(u_short dnaddr)
{
char *str;
return(str);
}
-char *
+const char *
dnname_string(u_short dnaddr)
{
-#ifdef HAVE_LIBDNET
+#ifdef HAVE_DNET_HTOA
struct dn_naddr dna;
dna.a_len = sizeof(short);
while (x-- > 0) {
c = *dp++;
- if (isprint(c))
- putchar(c);
- else
- printf("\\%o", c & 0xFF);
+ safeputchar(c);
}
}
#endif