]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-slow.c
Avoid -E and -M options inconsistencies with no libcrypto
[tcpdump] / print-slow.c
index 118381808fdad8c8fef075c540341a8d9d65dbcd..649e2a0fcb79cda19ce8e9de6834761e85043c02 100644 (file)
@@ -20,9 +20,7 @@
 
 /* \summary: IEEE "slow protocols" (802.3ad/802.3ah) printer */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "netdissect-stdinc.h"
 
@@ -203,7 +201,7 @@ static const struct tok slow_tlv_values[] = {
 
 struct lacp_tlv_actor_partner_info_t {
     nd_uint16_t sys_pri;
-    nd_mac_addr sys;
+    nd_mac48 sys;
     nd_uint16_t key;
     nd_uint16_t port_pri;
     nd_uint16_t port;
@@ -230,7 +228,7 @@ struct lacp_tlv_collector_info_t {
 
 struct marker_tlv_marker_info_t {
     nd_uint16_t req_port;
-    nd_mac_addr req_sys;
+    nd_mac48 req_sys;
     nd_uint32_t req_trans_id;
     nd_byte     pad[2];
 };
@@ -355,7 +353,7 @@ slow_marker_lacp_print(netdissect_options *ndo,
         const struct marker_tlv_marker_info_t *marker_tlv_marker_info;
     } tlv_ptr;
 
-    while(tlen>0) {
+    while(tlen != 0) {
         /* is the packet big enough to include the tlv header ? */
         if (tlen < sizeof(struct tlv_header_t))
             goto tooshort;
@@ -411,7 +409,7 @@ slow_marker_lacp_print(netdissect_options *ndo,
 
             ND_PRINT("\n\t  System %s, System Priority %u, Key %u"
                    ", Port %u, Port Priority %u\n\t  State Flags [%s]",
-                   GET_ETHERADDR_STRING(tlv_ptr.lacp_tlv_actor_partner_info->sys),
+                   GET_MAC48_STRING(tlv_ptr.lacp_tlv_actor_partner_info->sys),
                    GET_BE_U_2(tlv_ptr.lacp_tlv_actor_partner_info->sys_pri),
                    GET_BE_U_2(tlv_ptr.lacp_tlv_actor_partner_info->key),
                    GET_BE_U_2(tlv_ptr.lacp_tlv_actor_partner_info->port),
@@ -448,7 +446,7 @@ slow_marker_lacp_print(netdissect_options *ndo,
             tlv_ptr.marker_tlv_marker_info = (const struct marker_tlv_marker_info_t *)tlv_tptr;
 
             ND_PRINT("\n\t  Request System %s, Request Port %u, Request Transaction ID 0x%08x",
-                   GET_ETHERADDR_STRING(tlv_ptr.marker_tlv_marker_info->req_sys),
+                   GET_MAC48_STRING(tlv_ptr.marker_tlv_marker_info->req_sys),
                    GET_BE_U_2(tlv_ptr.marker_tlv_marker_info->req_port),
                    GET_BE_U_4(tlv_ptr.marker_tlv_marker_info->req_trans_id));
 
@@ -525,7 +523,7 @@ slow_oam_print(netdissect_options *ndo,
 
     switch (code) {
     case SLOW_OAM_CODE_INFO:
-        while (tlen > 0) {
+        while (tlen != 0) {
             ptr.slow_oam_tlv_header = (const struct slow_oam_tlv_header_t *)tptr;
             if (tlen < sizeof(*ptr.slow_oam_tlv_header))
                 goto tooshort;
@@ -622,7 +620,7 @@ slow_oam_print(netdissect_options *ndo,
         tptr += 2;
 
         /* TLVs */
-        while (tlen > 0) {
+        while (tlen != 0) {
             ptr.slow_oam_tlv_header = (const struct slow_oam_tlv_header_t *)tptr;
             if (tlen < sizeof(*ptr.slow_oam_tlv_header))
                 goto tooshort;