]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-mobility.c
Fix spaces
[tcpdump] / print-mobility.c
index bb56b9a4f2a82539a6c2cf62ca3cf59392fd42e7..6fd956281a5287609b15acf6a825933ee5688abf 100644 (file)
 /* RFC 3775 */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
-#include <netdissect-stdinc.h>
+#include "netdissect-stdinc.h"
 
 #include "netdissect.h"
 #include "addrtoname.h"
@@ -42,7 +42,6 @@
 
 #include "ip6.h"
 
-static const char tstr[] = "[|MOBILITY]";
 
 /* Mobility header */
 struct ip6_mobility {
@@ -207,12 +206,13 @@ mobility_print(netdissect_options *ndo,
        unsigned mhlen, hlen;
        uint8_t type;
 
+       ndo->ndo_protocol = "mobility";
        mh = (const struct ip6_mobility *)bp;
 
        /* 'ep' points to the end of available data. */
        ep = ndo->ndo_snapend;
 
-       if (!ND_TTEST(mh->ip6m_len)) {
+       if (!ND_TTEST_1(mh->ip6m_len)) {
                /*
                 * There's not enough captured data to include the
                 * mobility header length.
@@ -339,6 +339,6 @@ mobility_print(netdissect_options *ndo,
        return(mhlen);
 
  trunc:
-       ND_PRINT("%s", tstr);
+       nd_print_trunc(ndo);
        return(-1);
 }