X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/dc9744f7c6f1aa8f676f84829ee9a69a52952f94..8d3c2ed39e1b365da42c3aa5d2c5d6a6a5796bac:/print-decnet.c diff --git a/print-decnet.c b/print-decnet.c index e595067b..047916d3 100644 --- a/print-decnet.c +++ b/print-decnet.c @@ -31,25 +31,6 @@ #include #include -#ifdef HAVE_DNET_HTOA - #ifdef HAVE_NETDNET_DN_H - #include - #endif - #ifndef HAVE_STRUCT_DN_NADDR -#define DN_MAXADDL 20 /* max size of DECnet address */ -struct dn_naddr { - unsigned short a_len; /* length of address */ - unsigned char a_addr[DN_MAXADDL]; /* address as bytes */ -}; - #endif /* HAVE_STRUCT_DN_NADDR */ - #ifdef HAVE_NETDNET_DNETDB_H - #include - #endif - #ifndef NETDNET_DNETDB_H_DECLARES_DNET_HTOA - extern char *dnet_htoa(struct dn_naddr *); - #endif -#endif - #include "netdissect.h" #include "extract.h" #include "addrtoname.h" @@ -1245,25 +1226,6 @@ dnnum_string(netdissect_options *ndo, u_short dnaddr) str = (char *)malloc(siz = sizeof("00.0000")); if (str == NULL) (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC, "dnnum_string: malloc"); - nd_snprintf(str, siz, "%u.%u", area, node); + snprintf(str, siz, "%u.%u", 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 -}