]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Use MAC_ADDR_LEN in a few more places. [skip ci]
authorDenis Ovsienko <[email protected]>
Sat, 19 Sep 2020 00:44:59 +0000 (01:44 +0100)
committerDenis Ovsienko <[email protected]>
Sat, 19 Sep 2020 01:07:16 +0000 (02:07 +0100)
print-cfm.c
print-isoclns.c
print-sll.c

index 52965a9697b37643c75b6aacb65b58c4d06470af..27e72a23b199671d7e165f63a2ffd37fdb7ff083 100644 (file)
@@ -407,7 +407,7 @@ cfm_print(netdissect_options *ndo,
                 break;
 
             case CFM_CCM_MD_FORMAT_MAC:
-                if (md_namelength == 6) {
+                if (md_namelength == MAC_ADDR_LEN) {
                     ND_PRINT("\n\t  MAC %s", GET_ETHERADDR_STRING(md_name));
                 } else {
                     ND_PRINT("\n\t  MAC (length invalid)");
index 44d1aa73709c9da0318d69ec711e5289c95ec094..6762f4d9f8ecb83ea4a797b6e43b7bcb5ecfe4ac 100644 (file)
@@ -1298,7 +1298,7 @@ esis_print(netdissect_options *ndo,
                pptr += netal;
                 li -= netal;
 
-               if (snpal == 6)
+               if (snpal == MAC_ADDR_LEN)
                        ND_PRINT("\n\t  SNPA (length: %u): %s",
                               snpal,
                               GET_ETHERADDR_STRING(snpa));
index 38db4520fb8fe1daa2a6a0139fbb72bb06be2ac6..ad0ae7f1e6bf52332e1ca09b2cde3156f32512b8 100644 (file)
@@ -162,7 +162,7 @@ sll_print(netdissect_options *ndo, const struct sll_header *sllp, u_int length)
         * For now, we just assume 6 means Ethernet.
         * XXX - print others as strings of hex?
         */
-       if (GET_BE_U_2(sllp->sll_halen) == 6)
+       if (GET_BE_U_2(sllp->sll_halen) == MAC_ADDR_LEN)
                ND_PRINT("%s ", GET_ETHERADDR_STRING(sllp->sll_addr));
 
        if (!ndo->ndo_qflag) {
@@ -354,7 +354,7 @@ sll2_print(netdissect_options *ndo, const struct sll2_header *sllp, u_int length
         * For now, we just assume 6 means Ethernet.
         * XXX - print others as strings of hex?
         */
-       if (GET_U_1(sllp->sll2_halen) == 6)
+       if (GET_U_1(sllp->sll2_halen) == MAC_ADDR_LEN)
                ND_PRINT("%s ", GET_ETHERADDR_STRING(sllp->sll2_addr));
 
        if (!ndo->ndo_qflag) {