]> 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 31166e3f31df60d09924d7563a332da562642760..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"
@@ -1248,22 +1229,3 @@ dnnum_string(netdissect_options *ndo, u_short dnaddr)
        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
-}