]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-openflow.c
VRRP: top off the previous change
[tcpdump] / print-openflow.c
index 2a702dd03a61dbe63fe1b559609dc5393cc7325d..d37f7ba34d5668fa6a32d1a4fb80f498a34e530f 100644 (file)
 
 #include "interface.h"
 #include "extract.h"
+#include "openflow.h"
+
+static const char tstr[] = " [|openflow]";
+static const char cstr[] = " (corrupt)";
 
-#define OF_HEADER_LEN 8
 #define OF_VER_1_0    0x01
 
 static void
@@ -95,11 +98,11 @@ of_header_body_print(const u_char *cp, const u_char *ep) {
        }
 
 corrupt: /* fail current packet */
-       printf(" (corrupt)");
+       printf("%s", cstr);
        TCHECK2(*cp, ep - cp);
        return ep;
 trunc:
-       printf(" [|openflow]");
+       printf("%s", tstr);
        return ep;
 }