#include "config.h"
#endif
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
-#include "interface.h"
+#include "netdissect.h"
#include "extract.h"
#include "addrtoname.h"
#include "atm.h"
/*
* Print an RFC 1483 LLC-encapsulated ATM frame.
*/
-static void
+static u_int
atm_llc_print(netdissect_options *ndo,
const u_char *p, int length, int caplen)
{
- u_short extracted_ethertype;
-
- if (!llc_print(ndo, p, length, caplen, NULL, NULL,
- &extracted_ethertype)) {
- /* ether_type not known, print raw packet */
- if (extracted_ethertype) {
- ND_PRINT((ndo, "(LLC %s) ",
- etherproto_string(htons(extracted_ethertype))));
- }
+ int llc_hdrlen;
+
+ llc_hdrlen = llc_print(ndo, p, length, caplen, NULL, NULL);
+ if (llc_hdrlen < 0) {
+ /* packet not known, print raw packet */
if (!ndo->ndo_suppress_default_print)
ND_DEFAULTPRINT(p, caplen);
+ llc_hdrlen = -llc_hdrlen;
}
+ return (llc_hdrlen);
}
/*
caplen -= 20;
hdrlen += 20;
}
- atm_llc_print(ndo, p, length, caplen);
+ hdrlen += atm_llc_print(ndo, p, length, caplen);
return (hdrlen);
}