X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/fd35562d7e7153a339fdcdd02408f877e34a49fb..8a3d3809f3d94e4c39a4942184a3c6da1df4fdea:/print-openflow.c diff --git a/print-openflow.c b/print-openflow.c index 2a702dd0..d37f7ba3 100644 --- a/print-openflow.c +++ b/print-openflow.c @@ -38,8 +38,11 @@ #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; }