]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-decnet.c
Set default linktype LINUX_SLL2 when capturing on the "any" device
[tcpdump] / print-decnet.c
index e595067bb50521ec7155fcde126b4151c4f6d4c4..047916d30f6d305626bc327fd80f04d0e9b721df 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef HAVE_DNET_HTOA
-  #ifdef HAVE_NETDNET_DN_H
-    #include <netdnet/dn.h>
-  #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 <netdnet/dnetdb.h>
-  #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
-}