]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-aoe.c
CI: Add warning exemptions for Sun C (suncc-5.14) on Solaris 10
[tcpdump] / print-aoe.c
index 9704fd87ed56823f0b5709312741db0aed63e60b..0759ef38ef6cbad48cad11723b81ac784c8b9407 100644 (file)
@@ -31,9 +31,7 @@
  * https://web.archive.org/web/20161025044402/http://brantleycoilecompany.com/AoEr11.pdf
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "netdissect-stdinc.h"
 
@@ -283,9 +281,9 @@ aoev1_mac_print(netdissect_options *ndo,
                cp += 1;
                len -= 1;
                /* Ethernet Address */
-               ND_PRINT(", Ethernet Address: %s", GET_ETHERADDR_STRING(cp));
-               cp += MAC_ADDR_LEN;
-               len -= MAC_ADDR_LEN;
+               ND_PRINT(", Ethernet Address: %s", GET_MAC48_STRING(cp));
+               cp += MAC48_LEN;
+               len -= MAC48_LEN;
        }
        return;
 
@@ -300,7 +298,7 @@ aoev1_reserve_print(netdissect_options *ndo,
 {
        uint8_t nmacs, i;
 
-       if (len < AOEV1_RESERVE_ARG_LEN || (len - AOEV1_RESERVE_ARG_LEN) % MAC_ADDR_LEN)
+       if (len < AOEV1_RESERVE_ARG_LEN || (len - AOEV1_RESERVE_ARG_LEN) % MAC48_LEN)
                goto invalid;
        /* RCmd */
        ND_PRINT("\n\tRCmd: %s",
@@ -312,13 +310,13 @@ aoev1_reserve_print(netdissect_options *ndo,
        cp += 1;
        len -= 1;
        ND_PRINT(", NMacs: %u", nmacs);
-       if (nmacs * MAC_ADDR_LEN != len)
+       if (nmacs * MAC48_LEN != len)
                goto invalid;
        /* addresses */
        for (i = 0; i < nmacs; i++) {
-               ND_PRINT("\n\tEthernet Address %u: %s", i, GET_ETHERADDR_STRING(cp));
-               cp += MAC_ADDR_LEN;
-               len -= MAC_ADDR_LEN;
+               ND_PRINT("\n\tEthernet Address %u: %s", i, GET_MAC48_STRING(cp));
+               cp += MAC48_LEN;
+               len -= MAC48_LEN;
        }
        return;