]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-lane.c
Use more the EXTRACT_U_1() macro (40/n)
[tcpdump] / print-lane.c
index 9fb67b88876898235f484ec6703c314b8679957b..ccc235273330dab771ae4c5ef0879b682e04328b 100644 (file)
@@ -20,6 +20,8 @@
  *
  */
 
+/* \summary: ATM LANE printer */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -67,7 +69,7 @@ static const struct tok lecop2str[] = {
 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)));
 }
 
 /*
@@ -89,13 +91,13 @@ lane_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen)
        }
 
        lec = (const struct lane_controlhdr *)p;
-       if (EXTRACT_16BITS(&lec->lec_header) == 0xff00) {
+       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;
        }