]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-udld.c
Remove EXTRACT_LE_8BITS() macro, use EXTRACT_8BITS() macro
[tcpdump] / print-udld.c
index 02921d0e449834dbd921e4ba80f4594fa10d3a07..9e77b1c734898e719719f7eae0c308875f4d856e 100644 (file)
@@ -123,15 +123,15 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length)
        return;
     }
 
-    ND_PRINT((ndo, "\n\tChecksum 0x%04x (unverified)", EXTRACT_16BITS(tptr+2)));
+    ND_PRINT((ndo, "\n\tChecksum 0x%04x (unverified)", EXTRACT_BE_16BITS(tptr + 2)));
 
     tptr += UDLD_HEADER_LEN;
 
     while (tptr < (pptr+length)) {
 
         ND_TCHECK2(*tptr, 4);
-       type = EXTRACT_16BITS(tptr);
-        len  = EXTRACT_16BITS(tptr+2);
+       type = EXTRACT_BE_16BITS(tptr);
+        len  = EXTRACT_BE_16BITS(tptr + 2);
 
         ND_PRINT((ndo, "\n\t%s (0x%04x) TLV, length %u",
                tok2str(udld_tlv_values, "Unknown", type),
@@ -172,7 +172,7 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length)
         case UDLD_SEQ_NUMBER_TLV:
             if (len != 4)
                 goto invalid;
-            ND_PRINT((ndo, ", %u", EXTRACT_32BITS(tptr)));
+            ND_PRINT((ndo, ", %u", EXTRACT_BE_32BITS(tptr)));
             break;
 
         default: