]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-openflow-1.0.c
Fix printing of Linux cooked captures with monitor-mode packets.
[tcpdump] / print-openflow-1.0.c
index fd3ac3b06738e26d548f256f7b6c15ad032c4ff5..ce9584305f9dd0eecc263a55dbff3c4d293e8f24 100644 (file)
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+/* \summary: OpenFlow protocol version 1.0 printer */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
 
 #include "netdissect.h"
 #include "extract.h"
@@ -72,7 +74,6 @@
 #include "openflow.h"
 
 static const char tstr[] = " [|openflow]";
-static const char cstr[] = " (invalid)";
 
 #define OFPT_HELLO                    0x00
 #define OFPT_ERROR                    0x01
@@ -948,7 +949,7 @@ of10_bsn_message_print(netdissect_options *ndo,
        return cp;
 
 invalid: /* skip the undersized data */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp0, len);
        return cp0 + len;
 trunc:
@@ -1022,7 +1023,7 @@ of10_bsn_actions_print(netdissect_options *ndo,
        return cp;
 
 invalid:
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp0, len);
        return cp0 + len;
 trunc:
@@ -1051,7 +1052,7 @@ of10_vendor_action_print(netdissect_options *ndo,
        return decoder(ndo, cp, ep, len - 4);
 
 invalid: /* skip the undersized data */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp, len);
        return cp + len;
 trunc:
@@ -1080,7 +1081,7 @@ of10_vendor_message_print(netdissect_options *ndo,
        return decoder(ndo, cp, ep, len - 4);
 
 invalid: /* skip the undersized data */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp, len);
        return cp + len;
 trunc:
@@ -1106,7 +1107,7 @@ of10_vendor_data_print(netdissect_options *ndo,
        return of10_data_print(ndo, cp, ep, len - 4);
 
 invalid: /* skip the undersized data */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp, len);
        return cp + len;
 trunc:
@@ -1203,7 +1204,7 @@ next_port:
        return cp;
 
 invalid: /* skip the undersized trailing data */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp0, len0);
        return cp0 + len0;
 trunc:
@@ -1279,7 +1280,7 @@ next_property:
        return cp;
 
 invalid: /* skip the rest of queue properties */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp0, len0);
        return cp0 + len0;
 trunc:
@@ -1327,7 +1328,7 @@ next_queue:
        return cp;
 
 invalid: /* skip the rest of queues */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp0, len0);
        return cp0 + len0;
 trunc:
@@ -1598,7 +1599,7 @@ next_action:
        return cp;
 
 invalid: /* skip the rest of actions */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp0, len0);
        return cp0 + len0;
 trunc:
@@ -1815,7 +1816,7 @@ of10_stats_request_print(netdissect_options *ndo,
        return cp;
 
 invalid: /* skip the message body */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp0, len0);
        return cp0 + len0;
 trunc:
@@ -1862,7 +1863,7 @@ of10_desc_stats_reply_print(netdissect_options *ndo,
        return cp + DESC_STR_LEN;
 
 invalid: /* skip the message body */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp, len);
        return cp + len;
 trunc:
@@ -1943,7 +1944,7 @@ of10_flow_stats_reply_print(netdissect_options *ndo,
        return cp;
 
 invalid: /* skip the rest of flow statistics entries */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp0, len0);
        return cp0 + len0;
 trunc:
@@ -1976,7 +1977,7 @@ of10_aggregate_stats_reply_print(netdissect_options *ndo,
        return cp + 4;
 
 invalid: /* skip the message body */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp, len);
        return cp + len;
 trunc:
@@ -2035,7 +2036,7 @@ of10_table_stats_reply_print(netdissect_options *ndo,
        return cp;
 
 invalid: /* skip the undersized trailing data */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp0, len0);
        return cp0 + len0;
 trunc:
@@ -2120,7 +2121,7 @@ next_port:
        return cp;
 
 invalid: /* skip the undersized trailing data */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp0, len0);
        return cp0 + len0;
 trunc:
@@ -2168,7 +2169,7 @@ of10_queue_stats_reply_print(netdissect_options *ndo,
        return cp;
 
 invalid: /* skip the undersized trailing data */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp0, len0);
        return cp0 + len0;
 trunc:
@@ -2246,7 +2247,7 @@ of10_packet_out_print(netdissect_options *ndo,
        return of10_packet_data_print(ndo, cp, ep, len - OF_PACKET_OUT_LEN - actions_len);
 
 invalid: /* skip the rest of the message body */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
        ND_TCHECK2(*cp0, len0);
        return cp0 + len0;
 trunc:
@@ -2549,7 +2550,7 @@ of10_header_body_print(netdissect_options *ndo,
        goto next_message;
 
 invalid: /* skip the message body */
-       ND_PRINT((ndo, "%s", cstr));
+       ND_PRINT((ndo, "%s", istr));
 next_message:
        ND_TCHECK2(*cp0, len0 - OF_HEADER_LEN);
        return cp0 + len0 - OF_HEADER_LEN;