X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/7ae15799542662cb1e860a6befc250fa199fd880..5ef0bcb5edd748de9d9af13c40da0395dfdd94e8:/print-rt6.c diff --git a/print-rt6.c b/print-rt6.c index 980d675f..e7d9fbde 100644 --- a/print-rt6.c +++ b/print-rt6.c @@ -45,14 +45,16 @@ rt6_print(netdissect_options *ndo, const u_char *bp, const u_char *bp2 _U_) const u_char *p; ndo->ndo_protocol = "rt6"; - dp = (const struct ip6_rthdr *)bp; - ND_TCHECK_1(dp->ip6r_segleft); + nd_print_protocol_caps(ndo); + dp = (const struct ip6_rthdr *)bp; len = GET_U_1(dp->ip6r_len); - ND_PRINT("srcrt (len=%u", len); /*)*/ + ND_PRINT(" (len=%u", len); /*)*/ type = GET_U_1(dp->ip6r_type); ND_PRINT(", type=%u", type); + if (type == IPV6_RTHDR_TYPE_0) + ND_PRINT(" [Deprecated]"); ND_PRINT(", segleft=%u", GET_U_1(dp->ip6r_segleft)); switch (type) { @@ -106,6 +108,6 @@ rt6_print(netdissect_options *ndo, const u_char *bp, const u_char *bp2 _U_) } trunc: - ND_PRINT("[|srcrt]"); + nd_print_trunc(ndo); return -1; }