X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/e2982e7f6f0b624a773ec5a58885ee80fab46d34..a8abce5c5e2dce2ba6dbccd5d3829da104b80f9c:/print-mobility.c diff --git a/print-mobility.c b/print-mobility.c index bb56b9a4..6fd95628 100644 --- a/print-mobility.c +++ b/print-mobility.c @@ -31,10 +31,10 @@ /* RFC 3775 */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif -#include +#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); }