]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-isoclns.c
Rename EXTRACT_ macros
[tcpdump] / print-isoclns.c
index c60786b04cc2915bf6021b0f484b8bfdec18dacc..2050517596616ccc74c2e0b05ae0931b6ce37ca4 100644 (file)
@@ -678,7 +678,7 @@ isoclns_print(netdissect_options *ndo, const uint8_t *p, u_int length)
        }
 
        if (ndo->ndo_eflag)
-               ND_PRINT((ndo, "OSI NLPID %s (0x%02x): ", tok2str(nlpid_values, "Unknown", EXTRACT_8BITS(p)), *p));
+               ND_PRINT((ndo, "OSI NLPID %s (0x%02x): ", tok2str(nlpid_values, "Unknown", EXTRACT_U_1(p)), *p));
 
        switch (*p) {
 
@@ -798,7 +798,7 @@ clnp_print(netdissect_options *ndo,
         if (li < sizeof(struct clnp_header_t)) {
             ND_PRINT((ndo, " length indicator %u < min PDU size:", li));
             while (pptr < ndo->ndo_snapend) {
-                ND_PRINT((ndo, "%02X", EXTRACT_8BITS(pptr)));
+                ND_PRINT((ndo, "%02X", EXTRACT_U_1(pptr)));
                 pptr++;
             }
             return (0);
@@ -817,7 +817,7 @@ clnp_print(netdissect_options *ndo,
             return (0);
         }
        ND_TCHECK(*pptr);
-        dest_address_length = EXTRACT_8BITS(pptr);
+        dest_address_length = EXTRACT_U_1(pptr);
         pptr += 1;
         li -= 1;
         if (li < dest_address_length) {
@@ -834,7 +834,7 @@ clnp_print(netdissect_options *ndo,
             return (0);
         }
        ND_TCHECK(*pptr);
-        source_address_length = EXTRACT_8BITS(pptr);
+        source_address_length = EXTRACT_U_1(pptr);
         pptr += 1;
         li -= 1;
         if (li < source_address_length) {
@@ -863,10 +863,10 @@ clnp_print(netdissect_options *ndo,
                clnp_header->version,
                clnp_header->lifetime/2,
                (clnp_header->lifetime%2)*5,
-               EXTRACT_BE_16BITS(clnp_header->segment_length),
-               EXTRACT_BE_16BITS(clnp_header->cksum)));
+               EXTRACT_BE_U_2(clnp_header->segment_length),
+               EXTRACT_BE_U_2(clnp_header->cksum)));
 
-        osi_print_cksum(ndo, optr, EXTRACT_BE_16BITS(clnp_header->cksum), 7,
+        osi_print_cksum(ndo, optr, EXTRACT_BE_U_2(clnp_header->cksum), 7,
                         clnp_header->length_indicator);
 
         ND_PRINT((ndo, "\n\tFlags [%s]",
@@ -886,9 +886,9 @@ clnp_print(netdissect_options *ndo,
                clnp_segment_header = (const struct clnp_segment_header_t *) pptr;
                 ND_TCHECK(*clnp_segment_header);
                 ND_PRINT((ndo, "\n\tData Unit ID: 0x%04x, Segment Offset: %u, Total PDU Length: %u",
-                       EXTRACT_BE_16BITS(clnp_segment_header->data_unit_id),
-                       EXTRACT_BE_16BITS(clnp_segment_header->segment_offset),
-                       EXTRACT_BE_16BITS(clnp_segment_header->total_length)));
+                       EXTRACT_BE_U_2(clnp_segment_header->data_unit_id),
+                       EXTRACT_BE_U_2(clnp_segment_header->segment_offset),
+                       EXTRACT_BE_U_2(clnp_segment_header->total_length)));
                 pptr+=sizeof(struct clnp_segment_header_t);
                 li-=sizeof(struct clnp_segment_header_t);
         }
@@ -903,8 +903,8 @@ clnp_print(netdissect_options *ndo,
                 return (0);
             }
             ND_TCHECK2(*pptr, 2);
-            op = EXTRACT_8BITS(pptr);
-            opli = EXTRACT_8BITS(pptr + 1);
+            op = EXTRACT_U_1(pptr);
+            opli = EXTRACT_U_1(pptr + 1);
             pptr += 2;
             li -= 2;
             if (opli > li) {
@@ -939,9 +939,9 @@ clnp_print(netdissect_options *ndo,
                             return (0);
                     }
                     ND_PRINT((ndo, "%s %s",
-                           tok2str(clnp_option_sr_rr_values,"Unknown",EXTRACT_8BITS(tptr)),
+                           tok2str(clnp_option_sr_rr_values,"Unknown",EXTRACT_U_1(tptr)),
                            tok2str(clnp_option_sr_rr_string_values, "Unknown Option %u", op)));
-                    nsap_offset=EXTRACT_8BITS(tptr+1);
+                    nsap_offset=EXTRACT_U_1(tptr + 1);
                     if (nsap_offset == 0) {
                             ND_PRINT((ndo, " Bad NSAP offset (0)"));
                             break;
@@ -954,7 +954,7 @@ clnp_print(netdissect_options *ndo,
                     tptr+=nsap_offset;
                     tlen-=nsap_offset;
                     while (tlen > 0) {
-                            source_address_length=EXTRACT_8BITS(tptr);
+                            source_address_length=EXTRACT_U_1(tptr);
                             if (tlen < source_address_length+1) {
                                     ND_PRINT((ndo, "\n\t    NSAP address goes past end of option"));
                                     break;
@@ -975,7 +975,7 @@ clnp_print(netdissect_options *ndo,
                             ND_PRINT((ndo, ", bad opt len"));
                             return (0);
                     }
-                    ND_PRINT((ndo, "0x%1x", EXTRACT_8BITS(tptr)&0x0f));
+                    ND_PRINT((ndo, "0x%1x", EXTRACT_U_1(tptr)&0x0f));
                     break;
 
             case CLNP_OPTION_QOS_MAINTENANCE:
@@ -984,13 +984,13 @@ clnp_print(netdissect_options *ndo,
                             return (0);
                     }
                     ND_PRINT((ndo, "\n\t    Format Code: %s",
-                           tok2str(clnp_option_scope_values, "Reserved", EXTRACT_8BITS(tptr) & CLNP_OPTION_SCOPE_MASK)));
+                           tok2str(clnp_option_scope_values, "Reserved", EXTRACT_U_1(tptr) & CLNP_OPTION_SCOPE_MASK)));
 
-                    if ((EXTRACT_8BITS(tptr)&CLNP_OPTION_SCOPE_MASK) == CLNP_OPTION_SCOPE_GLOBAL)
+                    if ((EXTRACT_U_1(tptr)&CLNP_OPTION_SCOPE_MASK) == CLNP_OPTION_SCOPE_GLOBAL)
                             ND_PRINT((ndo, "\n\t    QoS Flags [%s]",
                                    bittok2str(clnp_option_qos_global_values,
                                               "none",
-                                              EXTRACT_8BITS(tptr)&CLNP_OPTION_OPTION_QOS_MASK)));
+                                              EXTRACT_U_1(tptr)&CLNP_OPTION_OPTION_QOS_MASK)));
                     break;
 
             case CLNP_OPTION_SECURITY:
@@ -999,8 +999,8 @@ clnp_print(netdissect_options *ndo,
                             return (0);
                     }
                     ND_PRINT((ndo, "\n\t    Format Code: %s, Security-Level %u",
-                           tok2str(clnp_option_scope_values,"Reserved",EXTRACT_8BITS(tptr)&CLNP_OPTION_SCOPE_MASK),
-                           EXTRACT_8BITS(tptr+1)));
+                           tok2str(clnp_option_scope_values,"Reserved",EXTRACT_U_1(tptr)&CLNP_OPTION_SCOPE_MASK),
+                           EXTRACT_U_1(tptr + 1)));
                     break;
 
             case CLNP_OPTION_DISCARD_REASON:
@@ -1008,7 +1008,7 @@ clnp_print(netdissect_options *ndo,
                         ND_PRINT((ndo, ", bad opt len"));
                         return (0);
                 }
-                rfd_error = EXTRACT_8BITS(tptr);
+                rfd_error = EXTRACT_U_1(tptr);
                 rfd_error_major = (rfd_error&0xf0) >> 4;
                 rfd_error_minor = rfd_error&0x0f;
                 ND_PRINT((ndo, "\n\t    Class: %s Error (0x%01x), %s (0x%01x)",
@@ -1041,7 +1041,7 @@ clnp_print(netdissect_options *ndo,
         case    CLNP_PDU_ER: /* fall through */
         case   CLNP_PDU_ERP:
             ND_TCHECK(*pptr);
-            if (EXTRACT_8BITS(pptr) == NLPID_CLNP) {
+            if (EXTRACT_U_1(pptr) == NLPID_CLNP) {
                 ND_PRINT((ndo, "\n\t-----original packet-----\n\t"));
                 /* FIXME recursion protection */
                 clnp_print(ndo, pptr, length - clnp_header->length_indicator);
@@ -1133,7 +1133,7 @@ esis_print(netdissect_options *ndo,
        if (li < sizeof(struct esis_header_t) + 2) {
             ND_PRINT((ndo, " length indicator %u < min PDU size:", li));
             while (pptr < ndo->ndo_snapend) {
-                ND_PRINT((ndo, "%02X", EXTRACT_8BITS(pptr)));
+                ND_PRINT((ndo, "%02X", EXTRACT_U_1(pptr)));
                 pptr++;
             }
             return;
@@ -1155,13 +1155,13 @@ esis_print(netdissect_options *ndo,
                    esis_pdu_type));
 
         ND_PRINT((ndo, ", v: %u%s", esis_header->version, esis_header->version == ESIS_VERSION ? "" : "unsupported" ));
-        ND_PRINT((ndo, ", checksum: 0x%04x", EXTRACT_BE_16BITS(esis_header->cksum)));
+        ND_PRINT((ndo, ", checksum: 0x%04x", EXTRACT_BE_U_2(esis_header->cksum)));
 
-        osi_print_cksum(ndo, pptr, EXTRACT_BE_16BITS(esis_header->cksum), 7,
+        osi_print_cksum(ndo, pptr, EXTRACT_BE_U_2(esis_header->cksum), 7,
                         li);
 
         ND_PRINT((ndo, ", holding time: %us, length indicator: %u",
-                  EXTRACT_BE_16BITS(esis_header->holdtime), li));
+                  EXTRACT_BE_U_2(esis_header->holdtime), li));
 
         if (ndo->ndo_vflag > 1)
             print_unknown_data(ndo, optr, "\n\t", sizeof(struct esis_header_t));
@@ -1179,7 +1179,7 @@ esis_print(netdissect_options *ndo,
                        ND_PRINT((ndo, ", bad redirect/li"));
                        return;
                }
-               dstl = EXTRACT_8BITS(pptr);
+               dstl = EXTRACT_U_1(pptr);
                pptr++;
                li--;
                ND_TCHECK2(*pptr, dstl);
@@ -1197,7 +1197,7 @@ esis_print(netdissect_options *ndo,
                        ND_PRINT((ndo, ", bad redirect/li"));
                        return;
                }
-               snpal = EXTRACT_8BITS(pptr);
+               snpal = EXTRACT_U_1(pptr);
                pptr++;
                li--;
                ND_TCHECK2(*pptr, snpal);
@@ -1213,7 +1213,7 @@ esis_print(netdissect_options *ndo,
                        ND_PRINT((ndo, ", bad redirect/li"));
                        return;
                }
-               netal = EXTRACT_8BITS(pptr);
+               netal = EXTRACT_U_1(pptr);
                pptr++;
                ND_TCHECK2(*pptr, netal);
                if (li < netal) {
@@ -1245,7 +1245,7 @@ esis_print(netdissect_options *ndo,
                 ND_PRINT((ndo, ", bad esh/li"));
                 return;
             }
-            source_address_number = EXTRACT_8BITS(pptr);
+            source_address_number = EXTRACT_U_1(pptr);
             pptr++;
             li--;
 
@@ -1257,7 +1257,7 @@ esis_print(netdissect_options *ndo,
                     ND_PRINT((ndo, ", bad esh/li"));
                    return;
                }
-                source_address_length = EXTRACT_8BITS(pptr);
+                source_address_length = EXTRACT_U_1(pptr);
                 pptr++;
                li--;
 
@@ -1282,7 +1282,7 @@ esis_print(netdissect_options *ndo,
                 ND_PRINT((ndo, ", bad ish/li"));
                 return;
             }
-            source_address_length = EXTRACT_8BITS(pptr);
+            source_address_length = EXTRACT_U_1(pptr);
             pptr++;
             li--;
             ND_TCHECK2(*pptr, source_address_length);
@@ -1314,8 +1314,8 @@ esis_print(netdissect_options *ndo,
                 return;
             }
             ND_TCHECK2(*pptr, 2);
-            op = EXTRACT_8BITS(pptr);
-            opli = EXTRACT_8BITS(pptr + 1);
+            op = EXTRACT_U_1(pptr);
+            opli = EXTRACT_U_1(pptr + 1);
             pptr += 2;
             li -= 2;
             if (opli > li) {
@@ -1335,7 +1335,7 @@ esis_print(netdissect_options *ndo,
             case ESIS_OPTION_ES_CONF_TIME:
                 if (opli == 2) {
                     ND_TCHECK2(*pptr, 2);
-                    ND_PRINT((ndo, "%us", EXTRACT_BE_16BITS(tptr)));
+                    ND_PRINT((ndo, "%us", EXTRACT_BE_U_2(tptr)));
                 } else
                     ND_PRINT((ndo, "(bad length)"));
                 break;
@@ -1346,8 +1346,8 @@ esis_print(netdissect_options *ndo,
                     ND_PRINT((ndo, "%s (0x%02x)",
                            tok2str(nlpid_values,
                                    "unknown",
-                                   EXTRACT_8BITS(tptr)),
-                           EXTRACT_8BITS(tptr)));
+                                   EXTRACT_U_1(tptr)),
+                           EXTRACT_U_1(tptr)));
                     if (opli>1) /* further NPLIDs ? - put comma */
                         ND_PRINT((ndo, ", "));
                     tptr++;
@@ -1390,7 +1390,7 @@ isis_print_mcid(netdissect_options *ndo,
   if (fn_printzp(ndo, mcid->name, 32, ndo->ndo_snapend))
     goto trunc;
 
-  ND_PRINT((ndo, "\n\t              Lvl: %d", EXTRACT_BE_16BITS(mcid->revision_lvl)));
+  ND_PRINT((ndo, "\n\t              Lvl: %d", EXTRACT_BE_U_2(mcid->revision_lvl)));
 
   ND_PRINT((ndo,  ", Digest: "));
 
@@ -1412,8 +1412,8 @@ isis_print_mt_port_cap_subtlv(netdissect_options *ndo,
   while (len > 2)
   {
     ND_TCHECK2(*tptr, 2);
-    stlv_type = EXTRACT_8BITS(tptr);
-    stlv_len  = EXTRACT_8BITS(tptr + 1);
+    stlv_type = EXTRACT_U_1(tptr);
+    stlv_len  = EXTRACT_U_1(tptr + 1);
 
     /* first lets see if we know the subTLVs name*/
     ND_PRINT((ndo, "\n\t       %s subTLV #%u, length: %u",
@@ -1464,10 +1464,10 @@ isis_print_mt_port_cap_subtlv(netdissect_options *ndo,
           goto trunc;
 
         ND_PRINT((ndo, "\n\t        RES: %d V: %d A: %d D: %d",
-                        (EXTRACT_8BITS(tptr) >> 5),
-                        ((EXTRACT_8BITS(tptr) >> 4) & 0x01),
-                        ((EXTRACT_8BITS(tptr) >> 2) & 0x03),
-                        (EXTRACT_8BITS(tptr) & 0x03)));
+                        (EXTRACT_U_1(tptr) >> 5),
+                        ((EXTRACT_U_1(tptr) >> 4) & 0x01),
+                        ((EXTRACT_U_1(tptr) >> 2) & 0x03),
+                        (EXTRACT_U_1(tptr) & 0x03)));
 
         tptr++;
 
@@ -1475,7 +1475,7 @@ isis_print_mt_port_cap_subtlv(netdissect_options *ndo,
 
         for(i=1;i<=8; i++)
         {
-            ND_PRINT((ndo, "%08x ", EXTRACT_BE_32BITS(tptr)));
+            ND_PRINT((ndo, "%08x ", EXTRACT_BE_U_4(tptr)));
             if (i%4 == 0 && i != 8)
               ND_PRINT((ndo, "\n\t                 "));
             tptr = tptr + 4;
@@ -1492,14 +1492,14 @@ isis_print_mt_port_cap_subtlv(netdissect_options *ndo,
         while (stlv_len >= ISIS_SUBTLV_SPB_BVID_MIN_LEN)
         {
           ND_PRINT((ndo, "\n\t           ECT: %08x",
-                      EXTRACT_BE_32BITS(tptr)));
+                      EXTRACT_BE_U_4(tptr)));
 
           tptr = tptr+4;
 
           ND_PRINT((ndo, " BVID: %d, U:%01x M:%01x ",
-                     (EXTRACT_BE_16BITS(tptr) >> 4) ,
-                     (EXTRACT_BE_16BITS(tptr) >> 3) & 0x01,
-                     (EXTRACT_BE_16BITS(tptr) >> 2) & 0x01));
+                     (EXTRACT_BE_U_2(tptr) >> 4) ,
+                     (EXTRACT_BE_U_2(tptr) >> 3) & 0x01,
+                     (EXTRACT_BE_U_2(tptr) >> 2) & 0x01));
 
           tptr = tptr + 2;
           len = len - ISIS_SUBTLV_SPB_BVID_MIN_LEN;
@@ -1533,8 +1533,8 @@ isis_print_mt_capability_subtlv(netdissect_options *ndo,
   while (len > 2)
   {
     ND_TCHECK2(*tptr, 2);
-    stlv_type = EXTRACT_8BITS(tptr);
-    stlv_len  = EXTRACT_8BITS(tptr + 1);
+    stlv_type = EXTRACT_U_1(tptr);
+    stlv_len  = EXTRACT_U_1(tptr + 1);
     tptr = tptr + 2;
     len = len - 2;
 
@@ -1556,24 +1556,24 @@ isis_print_mt_capability_subtlv(netdissect_options *ndo,
           if (stlv_len < ISIS_SUBTLV_SPB_INSTANCE_MIN_LEN)
             goto trunc;
 
-          ND_PRINT((ndo, "\n\t        CIST Root-ID: %08x", EXTRACT_BE_32BITS(tptr)));
+          ND_PRINT((ndo, "\n\t        CIST Root-ID: %08x", EXTRACT_BE_U_4(tptr)));
           tptr = tptr+4;
-          ND_PRINT((ndo, " %08x", EXTRACT_BE_32BITS(tptr)));
+          ND_PRINT((ndo, " %08x", EXTRACT_BE_U_4(tptr)));
           tptr = tptr+4;
-          ND_PRINT((ndo, ", Path Cost: %08x", EXTRACT_BE_32BITS(tptr)));
+          ND_PRINT((ndo, ", Path Cost: %08x", EXTRACT_BE_U_4(tptr)));
           tptr = tptr+4;
-          ND_PRINT((ndo, ", Prio: %d", EXTRACT_BE_16BITS(tptr)));
+          ND_PRINT((ndo, ", Prio: %d", EXTRACT_BE_U_2(tptr)));
           tptr = tptr + 2;
           ND_PRINT((ndo, "\n\t        RES: %d",
-                    EXTRACT_BE_16BITS(tptr) >> 5));
+                    EXTRACT_BE_U_2(tptr) >> 5));
           ND_PRINT((ndo, ", V: %d",
-                    (EXTRACT_BE_16BITS(tptr) >> 4) & 0x0001));
+                    (EXTRACT_BE_U_2(tptr) >> 4) & 0x0001));
           ND_PRINT((ndo, ", SPSource-ID: %d",
-                    (EXTRACT_BE_32BITS(tptr) & 0x000fffff)));
+                    (EXTRACT_BE_U_4(tptr) & 0x000fffff)));
           tptr = tptr+4;
-          ND_PRINT((ndo, ", No of Trees: %x", EXTRACT_8BITS(tptr)));
+          ND_PRINT((ndo, ", No of Trees: %x", EXTRACT_U_1(tptr)));
 
-          tmp = EXTRACT_8BITS(tptr);
+          tmp = EXTRACT_U_1(tptr);
           tptr++;
 
           len = len - ISIS_SUBTLV_SPB_INSTANCE_MIN_LEN;
@@ -1585,20 +1585,20 @@ isis_print_mt_capability_subtlv(netdissect_options *ndo,
               goto trunc;
 
             ND_PRINT((ndo, "\n\t         U:%d, M:%d, A:%d, RES:%d",
-                      EXTRACT_8BITS(tptr) >> 7,
-                      (EXTRACT_8BITS(tptr) >> 6) & 0x01,
-                      (EXTRACT_8BITS(tptr) >> 5) & 0x01,
-                      (EXTRACT_8BITS(tptr) & 0x1f)));
+                      EXTRACT_U_1(tptr) >> 7,
+                      (EXTRACT_U_1(tptr) >> 6) & 0x01,
+                      (EXTRACT_U_1(tptr) >> 5) & 0x01,
+                      (EXTRACT_U_1(tptr) & 0x1f)));
 
             tptr++;
 
-            ND_PRINT((ndo, ", ECT: %08x", EXTRACT_BE_32BITS(tptr)));
+            ND_PRINT((ndo, ", ECT: %08x", EXTRACT_BE_U_4(tptr)));
 
             tptr = tptr + 4;
 
             ND_PRINT((ndo, ", BVID: %d, SPVID: %d",
-                      (EXTRACT_BE_24BITS(tptr) >> 12) & 0x000fff,
-                      EXTRACT_BE_24BITS(tptr) & 0x000fff));
+                      (EXTRACT_BE_U_3(tptr) >> 12) & 0x000fff,
+                      EXTRACT_BE_U_3(tptr) & 0x000fff));
 
             tptr = tptr + 3;
             len = len - ISIS_SUBTLV_SPB_INSTANCE_VLAN_TUPLE_LEN;
@@ -1612,13 +1612,13 @@ isis_print_mt_capability_subtlv(netdissect_options *ndo,
           if (stlv_len < 8)
             goto trunc;
 
-          ND_PRINT((ndo, "\n\t        BMAC: %08x", EXTRACT_BE_32BITS(tptr)));
+          ND_PRINT((ndo, "\n\t        BMAC: %08x", EXTRACT_BE_U_4(tptr)));
           tptr = tptr+4;
-          ND_PRINT((ndo, "%04x", EXTRACT_BE_16BITS(tptr)));
+          ND_PRINT((ndo, "%04x", EXTRACT_BE_U_2(tptr)));
           tptr = tptr+2;
 
-          ND_PRINT((ndo, ", RES: %d, VID: %d", EXTRACT_BE_16BITS(tptr) >> 12,
-                    (EXTRACT_BE_16BITS(tptr)) & 0x0fff));
+          ND_PRINT((ndo, ", RES: %d, VID: %d", EXTRACT_BE_U_2(tptr) >> 12,
+                    (EXTRACT_BE_U_2(tptr)) & 0x0fff));
 
           tptr = tptr+2;
           len = len - 8;
@@ -1627,10 +1627,10 @@ isis_print_mt_capability_subtlv(netdissect_options *ndo,
           while (stlv_len >= 4) {
             ND_TCHECK_4(tptr);
             ND_PRINT((ndo, "\n\t        T: %d, R: %d, RES: %d, ISID: %d",
-                    (EXTRACT_BE_32BITS(tptr) >> 31),
-                    (EXTRACT_BE_32BITS(tptr) >> 30) & 0x01,
-                    (EXTRACT_BE_32BITS(tptr) >> 24) & 0x03f,
-                    (EXTRACT_BE_32BITS(tptr)) & 0x0ffffff));
+                    (EXTRACT_BE_U_4(tptr) >> 31),
+                    (EXTRACT_BE_U_4(tptr) >> 30) & 0x01,
+                    (EXTRACT_BE_U_4(tptr) >> 24) & 0x03f,
+                    (EXTRACT_BE_U_4(tptr)) & 0x0ffffff));
 
             tptr = tptr + 4;
             len = len - 4;
@@ -1724,7 +1724,7 @@ isis_print_tlv_ip_reach(netdissect_options *ndo,
                if (!ND_TTEST(*tlv_ip_reach))
                    return (0);
 
-               prefix_len = mask2plen(EXTRACT_BE_32BITS(tlv_ip_reach->mask));
+               prefix_len = mask2plen(EXTRACT_BE_U_4(tlv_ip_reach->mask));
 
                if (prefix_len == -1)
                        ND_PRINT((ndo, "%sIPv4 prefix: %s mask %s",
@@ -1788,8 +1788,8 @@ isis_print_ip_reach_subtlv(netdissect_options *ndo,
     case ISIS_SUBTLV_EXTD_IP_REACH_ADMIN_TAG32:
         while (subl >= 4) {
            ND_PRINT((ndo, ", 0x%08x (=%u)",
-                  EXTRACT_BE_32BITS(tptr),
-                  EXTRACT_BE_32BITS(tptr)));
+                  EXTRACT_BE_U_4(tptr),
+                  EXTRACT_BE_U_4(tptr)));
            tptr+=4;
            subl-=4;
        }
@@ -1797,8 +1797,8 @@ isis_print_ip_reach_subtlv(netdissect_options *ndo,
     case ISIS_SUBTLV_EXTD_IP_REACH_ADMIN_TAG64:
         while (subl >= 8) {
            ND_PRINT((ndo, ", 0x%08x%08x",
-                  EXTRACT_BE_32BITS(tptr),
-                  EXTRACT_BE_32BITS(tptr + 4)));
+                  EXTRACT_BE_U_4(tptr),
+                  EXTRACT_BE_U_4(tptr + 4)));
            tptr+=8;
            subl-=8;
        }
@@ -1844,9 +1844,9 @@ isis_print_is_reach_subtlv(netdissect_options *ndo,
         case ISIS_SUBTLV_EXT_IS_REACH_LINK_LOCAL_REMOTE_ID:
         case ISIS_SUBTLV_EXT_IS_REACH_LINK_REMOTE_ID:
            if (subl >= 4) {
-             ND_PRINT((ndo, ", 0x%08x", EXTRACT_BE_32BITS(tptr)));
+             ND_PRINT((ndo, ", 0x%08x", EXTRACT_BE_U_4(tptr)));
              if (subl == 8) /* rfc4205 */
-               ND_PRINT((ndo, ", 0x%08x", EXTRACT_BE_32BITS(tptr + 4)));
+               ND_PRINT((ndo, ", 0x%08x", EXTRACT_BE_U_4(tptr + 4)));
            }
            break;
         case ISIS_SUBTLV_EXT_IS_REACH_IPV4_INTF_ADDR:
@@ -1857,14 +1857,14 @@ isis_print_is_reach_subtlv(netdissect_options *ndo,
         case ISIS_SUBTLV_EXT_IS_REACH_MAX_LINK_BW :
        case ISIS_SUBTLV_EXT_IS_REACH_RESERVABLE_BW:
             if (subl >= 4) {
-              bw.i = EXTRACT_BE_32BITS(tptr);
+              bw.i = EXTRACT_BE_U_4(tptr);
               ND_PRINT((ndo, ", %.3f Mbps", bw.f * 8 / 1000000));
             }
             break;
         case ISIS_SUBTLV_EXT_IS_REACH_UNRESERVED_BW :
             if (subl >= 32) {
               for (te_class = 0; te_class < 8; te_class++) {
-                bw.i = EXTRACT_BE_32BITS(tptr);
+                bw.i = EXTRACT_BE_U_4(tptr);
                 ND_PRINT((ndo, "%s  TE-Class %u: %.3f Mbps",
                        ident,
                        te_class,
@@ -1879,12 +1879,12 @@ isis_print_is_reach_subtlv(netdissect_options *ndo,
                 break;
             ND_PRINT((ndo, "%sBandwidth Constraints Model ID: %s (%u)",
                    ident,
-                   tok2str(diffserv_te_bc_values, "unknown", EXTRACT_8BITS(tptr)),
-                   EXTRACT_8BITS(tptr)));
+                   tok2str(diffserv_te_bc_values, "unknown", EXTRACT_U_1(tptr)),
+                   EXTRACT_U_1(tptr)));
             tptr++;
             /* decode BCs until the subTLV ends */
             for (te_class = 0; te_class < (subl-1)/4; te_class++) {
-                bw.i = EXTRACT_BE_32BITS(tptr);
+                bw.i = EXTRACT_BE_U_4(tptr);
                 ND_PRINT((ndo, "%s  Bandwidth constraint CT%u: %.3f Mbps",
                        ident,
                        te_class,
@@ -1894,45 +1894,45 @@ isis_print_is_reach_subtlv(netdissect_options *ndo,
             break;
         case ISIS_SUBTLV_EXT_IS_REACH_TE_METRIC:
             if (subl >= 3)
-              ND_PRINT((ndo, ", %u", EXTRACT_BE_24BITS(tptr)));
+              ND_PRINT((ndo, ", %u", EXTRACT_BE_U_3(tptr)));
             break;
         case ISIS_SUBTLV_EXT_IS_REACH_LINK_ATTRIBUTE:
             if (subl == 2) {
                ND_PRINT((ndo, ", [ %s ] (0x%04x)",
                       bittok2str(isis_subtlv_link_attribute_values,
                                  "Unknown",
-                                 EXTRACT_BE_16BITS(tptr)),
-                      EXTRACT_BE_16BITS(tptr)));
+                                 EXTRACT_BE_U_2(tptr)),
+                      EXTRACT_BE_U_2(tptr)));
             }
             break;
         case ISIS_SUBTLV_EXT_IS_REACH_LINK_PROTECTION_TYPE:
             if (subl >= 2) {
               ND_PRINT((ndo, ", %s, Priority %u",
-                  bittok2str(gmpls_link_prot_values, "none", EXTRACT_8BITS(tptr)),
-                  EXTRACT_8BITS(tptr+1)));
+                  bittok2str(gmpls_link_prot_values, "none", EXTRACT_U_1(tptr)),
+                  EXTRACT_U_1(tptr + 1)));
             }
             break;
         case ISIS_SUBTLV_SPB_METRIC:
             if (subl >= 6) {
-              ND_PRINT((ndo, ", LM: %u", EXTRACT_BE_24BITS(tptr)));
+              ND_PRINT((ndo, ", LM: %u", EXTRACT_BE_U_3(tptr)));
               tptr=tptr+3;
-              ND_PRINT((ndo, ", P: %u", EXTRACT_8BITS(tptr)));
+              ND_PRINT((ndo, ", P: %u", EXTRACT_U_1(tptr)));
               tptr++;
-              ND_PRINT((ndo, ", P-ID: %u", EXTRACT_BE_16BITS(tptr)));
+              ND_PRINT((ndo, ", P-ID: %u", EXTRACT_BE_U_2(tptr)));
             }
             break;
         case ISIS_SUBTLV_EXT_IS_REACH_INTF_SW_CAP_DESCR:
             if (subl >= 36) {
-              gmpls_switch_cap = EXTRACT_8BITS(tptr);
+              gmpls_switch_cap = EXTRACT_U_1(tptr);
               ND_PRINT((ndo, "%s  Interface Switching Capability:%s",
                    ident,
                    tok2str(gmpls_switch_cap_values, "Unknown", gmpls_switch_cap)));
               ND_PRINT((ndo, ", LSP Encoding: %s",
-                   tok2str(gmpls_encoding_values, "Unknown", EXTRACT_8BITS((tptr + 1)))));
+                   tok2str(gmpls_encoding_values, "Unknown", EXTRACT_U_1((tptr + 1)))));
              tptr+=4;
               ND_PRINT((ndo, "%s  Max LSP Bandwidth:", ident));
               for (priority_level = 0; priority_level < 8; priority_level++) {
-                bw.i = EXTRACT_BE_32BITS(tptr);
+                bw.i = EXTRACT_BE_U_4(tptr);
                 ND_PRINT((ndo, "%s    priority level %d: %.3f Mbps",
                        ident,
                        priority_level,
@@ -1947,17 +1947,17 @@ isis_print_is_reach_subtlv(netdissect_options *ndo,
               case GMPLS_PSC4:
                 if (subl < 6)
                     break;
-                bw.i = EXTRACT_BE_32BITS(tptr);
+                bw.i = EXTRACT_BE_U_4(tptr);
                 ND_PRINT((ndo, "%s  Min LSP Bandwidth: %.3f Mbps", ident, bw.f * 8 / 1000000));
-                ND_PRINT((ndo, "%s  Interface MTU: %u", ident, EXTRACT_BE_16BITS(tptr + 4)));
+                ND_PRINT((ndo, "%s  Interface MTU: %u", ident, EXTRACT_BE_U_2(tptr + 4)));
                 break;
               case GMPLS_TSC:
                 if (subl < 8)
                     break;
-                bw.i = EXTRACT_BE_32BITS(tptr);
+                bw.i = EXTRACT_BE_U_4(tptr);
                 ND_PRINT((ndo, "%s  Min LSP Bandwidth: %.3f Mbps", ident, bw.f * 8 / 1000000));
                 ND_PRINT((ndo, "%s  Indication %s", ident,
-                       tok2str(gmpls_switch_cap_tsc_indication_values, "Unknown (%u)", EXTRACT_8BITS((tptr + 4)))));
+                       tok2str(gmpls_switch_cap_tsc_indication_values, "Unknown (%u)", EXTRACT_U_1((tptr + 4)))));
                 break;
               default:
                 /* there is some optional stuff left to decode but this is as of yet
@@ -2002,13 +2002,13 @@ isis_print_ext_is_reach(netdissect_options *ndo,
     if (tlv_type != ISIS_TLV_IS_ALIAS_ID) { /* the Alias TLV Metric field is implicit 0 */
         if (!ND_TTEST_3(tptr))    /* and is therefore skipped */
            return(0);
-       ND_PRINT((ndo, ", Metric: %d", EXTRACT_BE_24BITS(tptr)));
+       ND_PRINT((ndo, ", Metric: %d", EXTRACT_BE_U_3(tptr)));
        tptr+=3;
     }
 
     if (!ND_TTEST_1(tptr))
         return(0);
-    subtlv_sum_len=EXTRACT_8BITS(tptr); /* read out subTLV length */
+    subtlv_sum_len=EXTRACT_U_1(tptr); /* read out subTLV length */
     tptr++;
     proc_bytes=NODE_ID_LEN+3+1;
     ND_PRINT((ndo, ", %ssub-TLVs present",subtlv_sum_len ? "" : "no "));
@@ -2017,8 +2017,8 @@ isis_print_ext_is_reach(netdissect_options *ndo,
         while (subtlv_sum_len>0) {
             if (!ND_TTEST2(*tptr,2))
                 return(0);
-            subtlv_type=EXTRACT_8BITS(tptr);
-            subtlv_len=EXTRACT_8BITS(tptr+1);
+            subtlv_type=EXTRACT_U_1(tptr);
+            subtlv_len=EXTRACT_U_1(tptr + 1);
             tptr+=2;
             /* prepend the indent string */
             snprintf(ident_buffer, sizeof(ident_buffer), "%s  ",ident);
@@ -2048,11 +2048,11 @@ isis_print_mtid(netdissect_options *ndo,
            ident,
            tok2str(isis_mt_values,
                    "Reserved for IETF Consensus",
-                   ISIS_MASK_MTID(EXTRACT_BE_16BITS(tptr)))));
+                   ISIS_MASK_MTID(EXTRACT_BE_U_2(tptr)))));
 
     ND_PRINT((ndo, " Topology (0x%03x), Flags: [%s]",
-           ISIS_MASK_MTID(EXTRACT_BE_16BITS(tptr)),
-           bittok2str(isis_mt_flag_values, "none",ISIS_MASK_MTFLAGS(EXTRACT_BE_16BITS(tptr)))));
+           ISIS_MASK_MTID(EXTRACT_BE_U_2(tptr)),
+           bittok2str(isis_mt_flag_values, "none",ISIS_MASK_MTFLAGS(EXTRACT_BE_U_2(tptr)))));
 
     return(2);
 }
@@ -2074,14 +2074,14 @@ isis_print_extd_ip_reach(netdissect_options *ndo,
 
     if (!ND_TTEST_4(tptr))
         return (0);
-    metric = EXTRACT_BE_32BITS(tptr);
+    metric = EXTRACT_BE_U_4(tptr);
     processed=4;
     tptr+=4;
 
     if (afi == AF_INET) {
         if (!ND_TTEST_1(tptr)) /* fetch status byte */
             return (0);
-        status_byte=EXTRACT_8BITS(tptr);
+        status_byte=EXTRACT_U_1(tptr);
         tptr++;
         bit_length = status_byte&0x3f;
         if (bit_length > 32) {
@@ -2094,8 +2094,8 @@ isis_print_extd_ip_reach(netdissect_options *ndo,
     } else if (afi == AF_INET6) {
         if (!ND_TTEST2(*tptr, 2)) /* fetch status & prefix_len byte */
             return (0);
-        status_byte=EXTRACT_8BITS(tptr);
-        bit_length=EXTRACT_8BITS(tptr+1);
+        status_byte=EXTRACT_U_1(tptr);
+        bit_length=EXTRACT_U_1(tptr + 1);
         if (bit_length > 128) {
             ND_PRINT((ndo, "%sIPv6 prefix: bad bit length %u",
                    ident,
@@ -2147,7 +2147,7 @@ isis_print_extd_ip_reach(netdissect_options *ndo,
         */
         if (!ND_TTEST_1(tptr))
             return (0);
-        sublen=EXTRACT_8BITS(tptr);
+        sublen=EXTRACT_U_1(tptr);
         tptr++;
         processed+=sublen+1;
         ND_PRINT((ndo, " (%u)", sublen));   /* print out subTLV length */
@@ -2155,8 +2155,8 @@ isis_print_extd_ip_reach(netdissect_options *ndo,
         while (sublen>0) {
             if (!ND_TTEST2(*tptr,2))
                 return (0);
-            subtlvtype=EXTRACT_8BITS(tptr);
-            subtlvlen=EXTRACT_8BITS(tptr+1);
+            subtlvtype=EXTRACT_U_1(tptr);
+            subtlvlen=EXTRACT_U_1(tptr + 1);
             tptr+=2;
             /* prepend the indent string */
             snprintf(ident_buffer, sizeof(ident_buffer), "%s  ",ident);
@@ -2350,7 +2350,7 @@ isis_print(netdissect_options *ndo,
             ND_PRINT((ndo, ", length %u", length));
             return (1);
         }
-        pdu_len=EXTRACT_BE_16BITS(header_iih_lan->pdu_len);
+        pdu_len=EXTRACT_BE_U_2(header_iih_lan->pdu_len);
         if (packet_len>pdu_len) {
            packet_len=pdu_len; /* do TLV decoding as long as it makes sense */
            length=pdu_len;
@@ -2358,7 +2358,7 @@ isis_print(netdissect_options *ndo,
 
         ND_PRINT((ndo, "\n\t  source-id: %s,  holding time: %us, Flags: [%s]",
                   isis_print_id(header_iih_lan->source_id,SYSTEM_ID_LEN),
-                  EXTRACT_BE_16BITS(header_iih_lan->holding_time),
+                  EXTRACT_BE_U_2(header_iih_lan->holding_time),
                   tok2str(isis_iih_circuit_type_values,
                           "unknown circuit type 0x%02x",
                           header_iih_lan->circuit_type)));
@@ -2391,7 +2391,7 @@ isis_print(netdissect_options *ndo,
             ND_PRINT((ndo, ", length %u", length));
             return (1);
         }
-        pdu_len=EXTRACT_BE_16BITS(header_iih_ptp->pdu_len);
+        pdu_len=EXTRACT_BE_U_2(header_iih_ptp->pdu_len);
         if (packet_len>pdu_len) {
             packet_len=pdu_len; /* do TLV decoding as long as it makes sense */
             length=pdu_len;
@@ -2399,7 +2399,7 @@ isis_print(netdissect_options *ndo,
 
         ND_PRINT((ndo, "\n\t  source-id: %s, holding time: %us, Flags: [%s]",
                   isis_print_id(header_iih_ptp->source_id,SYSTEM_ID_LEN),
-                  EXTRACT_BE_16BITS(header_iih_ptp->holding_time),
+                  EXTRACT_BE_U_2(header_iih_ptp->holding_time),
                   tok2str(isis_iih_circuit_type_values,
                           "unknown circuit type 0x%02x",
                           header_iih_ptp->circuit_type)));
@@ -2430,12 +2430,12 @@ isis_print(netdissect_options *ndo,
         if (ndo->ndo_vflag == 0) {
             ND_PRINT((ndo, ", lsp-id %s, seq 0x%08x, lifetime %5us",
                       isis_print_id(header_lsp->lsp_id, LSP_ID_LEN),
-                      EXTRACT_BE_32BITS(header_lsp->sequence_number),
-                      EXTRACT_BE_16BITS(header_lsp->remaining_lifetime)));
+                      EXTRACT_BE_U_4(header_lsp->sequence_number),
+                      EXTRACT_BE_U_2(header_lsp->remaining_lifetime)));
             ND_PRINT((ndo, ", length %u", length));
             return (1);
         }
-        pdu_len=EXTRACT_BE_16BITS(header_lsp->pdu_len);
+        pdu_len=EXTRACT_BE_U_2(header_lsp->pdu_len);
         if (packet_len>pdu_len) {
             packet_len=pdu_len; /* do TLV decoding as long as it makes sense */
             length=pdu_len;
@@ -2443,12 +2443,12 @@ isis_print(netdissect_options *ndo,
 
         ND_PRINT((ndo, "\n\t  lsp-id: %s, seq: 0x%08x, lifetime: %5us\n\t  chksum: 0x%04x",
                isis_print_id(header_lsp->lsp_id, LSP_ID_LEN),
-               EXTRACT_BE_32BITS(header_lsp->sequence_number),
-               EXTRACT_BE_16BITS(header_lsp->remaining_lifetime),
-               EXTRACT_BE_16BITS(header_lsp->checksum)));
+               EXTRACT_BE_U_4(header_lsp->sequence_number),
+               EXTRACT_BE_U_2(header_lsp->remaining_lifetime),
+               EXTRACT_BE_U_2(header_lsp->checksum)));
 
         osi_print_cksum(ndo, (const uint8_t *)header_lsp->lsp_id,
-                        EXTRACT_BE_16BITS(header_lsp->checksum),
+                        EXTRACT_BE_U_2(header_lsp->checksum),
                         12, length-12);
 
         ND_PRINT((ndo, ", PDU length: %u, Flags: [ %s",
@@ -2490,7 +2490,7 @@ isis_print(netdissect_options *ndo,
             ND_PRINT((ndo, ", length %u", length));
             return (1);
         }
-        pdu_len=EXTRACT_BE_16BITS(header_csnp->pdu_len);
+        pdu_len=EXTRACT_BE_U_2(header_csnp->pdu_len);
         if (packet_len>pdu_len) {
             packet_len=pdu_len; /* do TLV decoding as long as it makes sense */
             length=pdu_len;
@@ -2528,7 +2528,7 @@ isis_print(netdissect_options *ndo,
             ND_PRINT((ndo, ", length %u", length));
             return (1);
         }
-        pdu_len=EXTRACT_BE_16BITS(header_psnp->pdu_len);
+        pdu_len=EXTRACT_BE_U_2(header_psnp->pdu_len);
         if (packet_len>pdu_len) {
             packet_len=pdu_len; /* do TLV decoding as long as it makes sense */
             length=pdu_len;
@@ -2564,8 +2564,8 @@ isis_print(netdissect_options *ndo,
        ND_TCHECK2(*pptr, 2);
        if (packet_len < 2)
            goto trunc;
-       tlv_type = EXTRACT_8BITS(pptr);
-       tlv_len = EXTRACT_8BITS(pptr + 1);
+       tlv_type = EXTRACT_U_1(pptr);
+       tlv_len = EXTRACT_U_1(pptr + 1);
        pptr += 2;
        packet_len -= 2;
         tmp =tlv_len; /* copy temporary len & pointer to packet data */
@@ -2589,7 +2589,7 @@ isis_print(netdissect_options *ndo,
        switch (tlv_type) {
        case ISIS_TLV_AREA_ADDR:
            ND_TCHECK_1(tptr);
-           alen = EXTRACT_8BITS(tptr);
+           alen = EXTRACT_U_1(tptr);
            tptr++;
            while (tmp && alen < tmp) {
                ND_TCHECK2(*tptr, alen);
@@ -2601,7 +2601,7 @@ isis_print(netdissect_options *ndo,
                if (tmp==0) /* if this is the last area address do not attemt a boundary check */
                     break;
                ND_TCHECK_1(tptr);
-               alen = EXTRACT_8BITS(tptr);
+               alen = EXTRACT_U_1(tptr);
                tptr++;
            }
            break;
@@ -2617,7 +2617,7 @@ isis_print(netdissect_options *ndo,
         case ISIS_TLV_ISNEIGH_VARLEN:
             if (!ND_TTEST_1(tptr) || tmp < 3) /* min. TLV length */
                goto trunctlv;
-           lan_alen = EXTRACT_8BITS(tptr); /* LAN address length */
+           lan_alen = EXTRACT_U_1(tptr); /* LAN address length */
            tptr++;
            if (lan_alen == 0) {
                 ND_PRINT((ndo, "\n\t      LAN address length 0 bytes (invalid)"));
@@ -2676,7 +2676,7 @@ isis_print(netdissect_options *ndo,
             ND_PRINT((ndo, "\n\t      %s",
                    tok2str(isis_is_reach_virtual_values,
                            "bogus virtual flag 0x%02x",
-                           EXTRACT_8BITS(tptr))));
+                           EXTRACT_U_1(tptr))));
            tptr++;
            tlv_is_reach = (const struct isis_tlv_is_reach *)tptr;
             while (tmp >= sizeof(struct isis_tlv_is_reach)) {
@@ -2779,9 +2779,9 @@ isis_print(netdissect_options *ndo,
             ND_PRINT((ndo, "\n\t      %s: ",
                    tok2str(isis_subtlv_auth_values,
                            "unknown Authentication type 0x%02x",
-                           EXTRACT_8BITS(tptr))));
+                           EXTRACT_U_1(tptr))));
 
-           switch (EXTRACT_8BITS(tptr)) {
+           switch (EXTRACT_U_1(tptr)) {
            case ISIS_SUBTLV_AUTH_SIMPLE:
                if (fn_printzp(ndo, tptr + 1, tlv_len - 1, ndo->ndo_snapend))
                    goto trunctlv;
@@ -2789,7 +2789,7 @@ isis_print(netdissect_options *ndo,
            case ISIS_SUBTLV_AUTH_MD5:
                for(i=1;i<tlv_len;i++) {
                    ND_TCHECK_1(tptr + i);
-                   ND_PRINT((ndo, "%02x", EXTRACT_8BITS(tptr + i)));
+                   ND_PRINT((ndo, "%02x", EXTRACT_U_1(tptr + i)));
                }
                if (tlv_len != ISIS_SUBTLV_AUTH_MD5_LEN+1)
                     ND_PRINT((ndo, ", (invalid subTLV) "));
@@ -2802,11 +2802,11 @@ isis_print(netdissect_options *ndo,
                break;
             case ISIS_SUBTLV_AUTH_GENERIC:
                ND_TCHECK_2(tptr + 1);
-                key_id = EXTRACT_BE_16BITS(tptr + 1);
+                key_id = EXTRACT_BE_U_2(tptr + 1);
                 ND_PRINT((ndo, "%u, password: ", key_id));
                 for(i=1 + sizeof(uint16_t);i<tlv_len;i++) {
                     ND_TCHECK_1(tptr + i);
-                    ND_PRINT((ndo, "%02x", EXTRACT_8BITS(tptr + i)));
+                    ND_PRINT((ndo, "%02x", EXTRACT_U_1(tptr + i)));
                 }
                 break;
            case ISIS_SUBTLV_AUTH_PRIVATE:
@@ -2822,14 +2822,14 @@ isis_print(netdissect_options *ndo,
            if(tmp>=1) {
                ND_TCHECK_1(tptr);
                ND_PRINT((ndo, "\n\t      Adjacency State: %s (%u)",
-                      tok2str(isis_ptp_adjancey_values, "unknown", EXTRACT_8BITS(tptr)),
-                      EXTRACT_8BITS(tptr)));
+                      tok2str(isis_ptp_adjancey_values, "unknown", EXTRACT_U_1(tptr)),
+                      EXTRACT_U_1(tptr)));
                tmp--;
            }
            if(tmp>sizeof(tlv_ptp_adj->extd_local_circuit_id)) {
                ND_TCHECK(tlv_ptp_adj->extd_local_circuit_id);
                ND_PRINT((ndo, "\n\t      Extended Local circuit-ID: 0x%08x",
-                      EXTRACT_BE_32BITS(tlv_ptp_adj->extd_local_circuit_id)));
+                      EXTRACT_BE_U_4(tlv_ptp_adj->extd_local_circuit_id)));
                tmp-=sizeof(tlv_ptp_adj->extd_local_circuit_id);
            }
            if(tmp>=SYSTEM_ID_LEN) {
@@ -2841,7 +2841,7 @@ isis_print(netdissect_options *ndo,
            if(tmp>=sizeof(tlv_ptp_adj->neighbor_extd_local_circuit_id)) {
                ND_TCHECK(tlv_ptp_adj->neighbor_extd_local_circuit_id);
                ND_PRINT((ndo, "\n\t      Neighbor Extended Local circuit-ID: 0x%08x",
-                      EXTRACT_BE_32BITS(tlv_ptp_adj->neighbor_extd_local_circuit_id)));
+                      EXTRACT_BE_U_4(tlv_ptp_adj->neighbor_extd_local_circuit_id)));
            }
            break;
 
@@ -2852,8 +2852,8 @@ isis_print(netdissect_options *ndo,
                ND_PRINT((ndo, "%s (0x%02x)",
                        tok2str(nlpid_values,
                                "unknown",
-                               EXTRACT_8BITS(tptr)),
-                       EXTRACT_8BITS(tptr)));
+                               EXTRACT_U_1(tptr)),
+                       EXTRACT_U_1(tptr)));
                if (tmp>1) /* further NPLIDs ? - put comma */
                    ND_PRINT((ndo, ", "));
                 tptr++;
@@ -2866,8 +2866,8 @@ isis_print(netdissect_options *ndo,
       ND_TCHECK_2(tptr);
 
       ND_PRINT((ndo, "\n\t       RES: %d, MTID(s): %d",
-              (EXTRACT_BE_16BITS(tptr) >> 12),
-              (EXTRACT_BE_16BITS(tptr) & 0x0fff)));
+              (EXTRACT_BE_U_2(tptr) >> 12),
+              (EXTRACT_BE_U_2(tptr) & 0x0fff)));
 
       tmp = tmp-2;
       tptr = tptr+2;
@@ -2883,9 +2883,9 @@ isis_print(netdissect_options *ndo,
       ND_TCHECK_2(tptr);
 
       ND_PRINT((ndo, "\n\t      O: %d, RES: %d, MTID(s): %d",
-                (EXTRACT_BE_16BITS(tptr) >> 15) & 0x01,
-                (EXTRACT_BE_16BITS(tptr) >> 12) & 0x07,
-                EXTRACT_BE_16BITS(tptr) & 0x0fff));
+                (EXTRACT_BE_U_2(tptr) >> 15) & 0x01,
+                (EXTRACT_BE_U_2(tptr) >> 12) & 0x07,
+                EXTRACT_BE_U_2(tptr) & 0x0fff));
 
       tmp = tmp-2;
       tptr = tptr+2;
@@ -2926,7 +2926,7 @@ isis_print(netdissect_options *ndo,
            if (tmp < 1)
                break;
            ND_TCHECK_1(tptr);
-           ND_PRINT((ndo, ", Flags: [%s]", ISIS_MASK_TLV_SHARED_RISK_GROUP(EXTRACT_8BITS(tptr)) ? "numbered" : "unnumbered"));
+           ND_PRINT((ndo, ", Flags: [%s]", ISIS_MASK_TLV_SHARED_RISK_GROUP(EXTRACT_U_1(tptr)) ? "numbered" : "unnumbered"));
            tptr++;
            tmp--;
 
@@ -2946,7 +2946,7 @@ isis_print(netdissect_options *ndo,
 
            while (tmp>=4) {
                 ND_TCHECK_4(tptr);
-                ND_PRINT((ndo, "\n\t      Link-ID: 0x%08x", EXTRACT_BE_32BITS(tptr)));
+                ND_PRINT((ndo, "\n\t      Link-ID: 0x%08x", EXTRACT_BE_U_4(tptr)));
                 tptr+=4;
                 tmp-=4;
            }
@@ -2959,11 +2959,11 @@ isis_print(netdissect_options *ndo,
                ND_PRINT((ndo, "\n\t      lsp-id: %s",
                        isis_print_id(tlv_lsp->lsp_id, LSP_ID_LEN)));
                ND_TCHECK2(tlv_lsp->sequence_number, 4);
-               ND_PRINT((ndo, ", seq: 0x%08x", EXTRACT_BE_32BITS(tlv_lsp->sequence_number)));
+               ND_PRINT((ndo, ", seq: 0x%08x", EXTRACT_BE_U_4(tlv_lsp->sequence_number)));
                ND_TCHECK2(tlv_lsp->remaining_lifetime, 2);
-               ND_PRINT((ndo, ", lifetime: %5ds", EXTRACT_BE_16BITS(tlv_lsp->remaining_lifetime)));
+               ND_PRINT((ndo, ", lifetime: %5ds", EXTRACT_BE_U_2(tlv_lsp->remaining_lifetime)));
                ND_TCHECK2(tlv_lsp->checksum, 2);
-               ND_PRINT((ndo, ", chksum: 0x%04x", EXTRACT_BE_16BITS(tlv_lsp->checksum)));
+               ND_PRINT((ndo, ", chksum: 0x%04x", EXTRACT_BE_U_2(tlv_lsp->checksum)));
                tmp-=sizeof(struct isis_tlv_lsp);
                tlv_lsp++;
            }
@@ -2973,13 +2973,13 @@ isis_print(netdissect_options *ndo,
            if (tmp < ISIS_TLV_CHECKSUM_MINLEN)
                break;
            ND_TCHECK2(*tptr, ISIS_TLV_CHECKSUM_MINLEN);
-           ND_PRINT((ndo, "\n\t      checksum: 0x%04x ", EXTRACT_BE_16BITS(tptr)));
+           ND_PRINT((ndo, "\n\t      checksum: 0x%04x ", EXTRACT_BE_U_2(tptr)));
             /* do not attempt to verify the checksum if it is zero
              * most likely a HMAC-MD5 TLV is also present and
              * to avoid conflicts the checksum TLV is zeroed.
              * see rfc3358 for details
              */
-            osi_print_cksum(ndo, optr, EXTRACT_BE_16BITS(tptr), tptr-optr,
+            osi_print_cksum(ndo, optr, EXTRACT_BE_U_2(tptr), tptr-optr,
                             length);
            break;
 
@@ -3022,7 +3022,7 @@ isis_print(netdissect_options *ndo,
                 break;
             ND_TCHECK2(*tptr, ISIS_TLV_RESTART_SIGNALING_FLAGLEN);
             ND_PRINT((ndo, "\n\t      Flags [%s]",
-                   bittok2str(isis_restart_flag_values, "none", EXTRACT_8BITS(tptr))));
+                   bittok2str(isis_restart_flag_values, "none", EXTRACT_U_1(tptr))));
             tptr+=ISIS_TLV_RESTART_SIGNALING_FLAGLEN;
             tmp-=ISIS_TLV_RESTART_SIGNALING_FLAGLEN;
 
@@ -3034,7 +3034,7 @@ isis_print(netdissect_options *ndo,
                 break;
             ND_TCHECK2(*tptr, ISIS_TLV_RESTART_SIGNALING_HOLDTIMELEN);
 
-            ND_PRINT((ndo, ", Remaining holding time %us", EXTRACT_BE_16BITS(tptr)));
+            ND_PRINT((ndo, ", Remaining holding time %us", EXTRACT_BE_U_2(tptr)));
             tptr+=ISIS_TLV_RESTART_SIGNALING_HOLDTIMELEN;
             tmp-=ISIS_TLV_RESTART_SIGNALING_HOLDTIMELEN;
 
@@ -3052,13 +3052,13 @@ isis_print(netdissect_options *ndo,
             ND_PRINT((ndo, "\n\t      Inter-Domain Information Type: %s",
                    tok2str(isis_subtlv_idrp_values,
                            "Unknown (0x%02x)",
-                           EXTRACT_8BITS(tptr))));
-            isis_subtlv_idrp = EXTRACT_8BITS(tptr);
+                           EXTRACT_U_1(tptr))));
+            isis_subtlv_idrp = EXTRACT_U_1(tptr);
             tptr++;
             switch (isis_subtlv_idrp) {
             case ISIS_SUBTLV_IDRP_ASN:
                 ND_TCHECK_2(tptr); /* fetch AS number */
-                ND_PRINT((ndo, "AS Number: %u", EXTRACT_BE_16BITS(tptr)));
+                ND_PRINT((ndo, "AS Number: %u", EXTRACT_BE_U_2(tptr)));
                 break;
             case ISIS_SUBTLV_IDRP_LOCAL:
             case ISIS_SUBTLV_IDRP_RES:
@@ -3073,7 +3073,7 @@ isis_print(netdissect_options *ndo,
            if (tmp < ISIS_TLV_LSP_BUFFERSIZE_MINLEN)
                break;
             ND_TCHECK2(*tptr, ISIS_TLV_LSP_BUFFERSIZE_MINLEN);
-            ND_PRINT((ndo, "\n\t      LSP Buffersize: %u", EXTRACT_BE_16BITS(tptr)));
+            ND_PRINT((ndo, "\n\t      LSP Buffersize: %u", EXTRACT_BE_U_2(tptr)));
             break;
 
         case ISIS_TLV_PART_DIS:
@@ -3096,7 +3096,7 @@ isis_print(netdissect_options *ndo,
 
             while(tmp>0) {
                 ND_TCHECK_1(tptr);
-                prefix_len=EXTRACT_8BITS(tptr); /* read out prefix length in semioctets*/
+                prefix_len=EXTRACT_U_1(tptr); /* read out prefix length in semioctets*/
                 tptr++;
                 if (prefix_len < 2) {
                     ND_PRINT((ndo, "\n\t\tAddress: prefix length %u < 2", prefix_len));
@@ -3117,14 +3117,14 @@ isis_print(netdissect_options *ndo,
            if (tmp < ISIS_TLV_IIH_SEQNR_MINLEN)
                break;
             ND_TCHECK2(*tptr, ISIS_TLV_IIH_SEQNR_MINLEN); /* check if four bytes are on the wire */
-            ND_PRINT((ndo, "\n\t      Sequence number: %u", EXTRACT_BE_32BITS(tptr)));
+            ND_PRINT((ndo, "\n\t      Sequence number: %u", EXTRACT_BE_U_4(tptr)));
             break;
 
         case ISIS_TLV_VENDOR_PRIVATE:
            if (tmp < ISIS_TLV_VENDOR_PRIVATE_MINLEN)
                break;
             ND_TCHECK2(*tptr, ISIS_TLV_VENDOR_PRIVATE_MINLEN); /* check if enough byte for a full oui */
-            vendor_id = EXTRACT_BE_24BITS(tptr);
+            vendor_id = EXTRACT_BE_U_3(tptr);
             ND_PRINT((ndo, "\n\t      Vendor: %s (%u)",
                    tok2str(oui_values, "Unknown", vendor_id),
                    vendor_id));