diff options
Diffstat (limited to 'print-decnet.c')
-rw-r--r-- | print-decnet.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/print-decnet.c b/print-decnet.c index de7de27..6e2c791 100644 --- a/print-decnet.c +++ b/print-decnet.c @@ -30,10 +30,6 @@ struct mbuf; struct rtentry; -#ifdef HAVE_NETDNET_DNETDB_H -#include <netdnet/dnetdb.h> -#endif - #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -75,12 +71,6 @@ typedef union etheraddress etheraddr; /* Ethernet address */ #define AREASHIFT 10 /* bit-offset for area field */ #define NODEMASK 01777 /* mask for node address field */ -#define DN_MAXADDL 20 /* max size of DECnet address */ -struct dn_naddr { - uint16_t a_len; /* length of address */ - uint8_t a_addr[DN_MAXADDL]; /* address as bytes */ -}; - /* * Define long and short header formats. */ @@ -492,10 +482,6 @@ static int print_elist(const char *, u_int); static int print_nsp(netdissect_options *, const u_char *, u_int); static void print_reason(netdissect_options *, int); -#ifndef HAVE_NETDNET_DNETDB_H_DNET_HTOA -extern char *dnet_htoa(struct dn_naddr *); -#endif - void decnet_print(netdissect_options *ndo, register const u_char *ap, register u_int length, @@ -1252,22 +1238,3 @@ dnnum_string(netdissect_options *ndo, u_short dnaddr) snprintf(str, siz, "%d.%d", area, node); return(str); } - -const char * -dnname_string(netdissect_options *ndo, u_short dnaddr) -{ -#ifdef HAVE_DNET_HTOA - struct dn_naddr dna; - char *dnname; - - dna.a_len = sizeof(short); - memcpy((char *)dna.a_addr, (char *)&dnaddr, sizeof(short)); - dnname = dnet_htoa(&dna); - if(dnname != NULL) - return (strdup(dnname)); - else - return(dnnum_string(ndo, dnaddr)); -#else - return(dnnum_string(ndo, dnaddr)); /* punt */ -#endif -} |