*
*/
+/* \summary: ATM LANE printer */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
-#include "interface.h"
+#include "netdissect.h"
#include "extract.h"
#include "ether.h"
static void
lane_hdr_print(netdissect_options *ndo, const u_char *bp)
{
- ND_PRINT((ndo, "lecid:%x ", EXTRACT_16BITS(bp)));
+ ND_PRINT((ndo, "lecid:%x ", EXTRACT_BE_U_2(bp)));
}
/*
void
lane_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen)
{
- struct lane_controlhdr *lec;
+ const struct lane_controlhdr *lec;
if (caplen < sizeof(struct lane_controlhdr)) {
ND_PRINT((ndo, "[|lane]"));
return;
}
- lec = (struct lane_controlhdr *)p;
- if (EXTRACT_16BITS(&lec->lec_header) == 0xff00) {
+ lec = (const struct lane_controlhdr *)p;
+ if (EXTRACT_BE_U_2(&lec->lec_header) == 0xff00) {
/*
* LE Control.
*/
ND_PRINT((ndo, "lec: proto %x vers %x %s",
lec->lec_proto, lec->lec_vers,
- tok2str(lecop2str, "opcode-#%u", EXTRACT_16BITS(&lec->lec_opcode))));
+ tok2str(lecop2str, "opcode-#%u", EXTRACT_BE_U_2(&lec->lec_opcode))));
return;
}