]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-hsrp.c
ICMPv6: Add the IPv6-Only flag
[tcpdump] / print-hsrp.c
index b29135f38c8b77dd13e378c96e16987f2fd381ac..138a8c05c7924a33b28e4431ce74d3976a8ed150 100644 (file)
@@ -99,6 +99,7 @@ hsrp_print(netdissect_options *ndo, const u_char *bp, u_int len)
        const struct hsrp *hp = (const struct hsrp *) bp;
        uint8_t version;
 
+       ndo->ndo_protocol = "hsrp";
        ND_TCHECK_1(hp->hsrp_version);
        version = EXTRACT_U_1(hp->hsrp_version);
        ND_PRINT("HSRPv%u", version);
@@ -125,8 +126,8 @@ hsrp_print(netdissect_options *ndo, const u_char *bp, u_int len)
                unsigned_relts_print(ndo, EXTRACT_U_1(hp->hsrp_holdtime));
                ND_PRINT(" priority=%u", EXTRACT_U_1(hp->hsrp_priority));
                ND_PRINT(" auth=\"");
-               if (fn_printn(ndo, hp->hsrp_authdata, sizeof(hp->hsrp_authdata),
-                   ndo->ndo_snapend)) {
+               if (nd_printn(ndo, hp->hsrp_authdata, sizeof(hp->hsrp_authdata),
+                             ndo->ndo_snapend)) {
                        ND_PRINT("\"");
                        goto trunc;
                }
@@ -134,5 +135,5 @@ hsrp_print(netdissect_options *ndo, const u_char *bp, u_int len)
        }
        return;
 trunc:
-       ND_PRINT("[|hsrp]");
+       nd_print_trunc(ndo);
 }