/* \summary: Virtual Router Redundancy Protocol (VRRP) printer */
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
-#include <netdissect-stdinc.h>
+#include "netdissect-stdinc.h"
#include "netdissect.h"
#include "extract.h"
int version, type, auth_type = VRRP_AUTH_NONE; /* keep compiler happy */
const char *type_s;
+ ndo->ndo_protocol = "vrrp";
ND_TCHECK_1(bp);
version = (EXTRACT_U_1(bp) & 0xf0) >> 4;
type = EXTRACT_U_1(bp) & 0x0f;
}
if (ndo->ndo_vflag) {
- int naddrs = EXTRACT_U_1(bp + 3);
- int i;
+ u_int naddrs = EXTRACT_U_1(bp + 3);
+ u_int i;
char c;
if (version == 2 && ND_TTEST_LEN(bp, len)) {
ND_PRINT(", addrs");
if (naddrs > 1)
- ND_PRINT("(%d)", naddrs);
+ ND_PRINT("(%u)", naddrs);
ND_PRINT(":");
c = ' ';
bp += 8;
if (version == 2 && auth_type == VRRP_AUTH_SIMPLE) { /* simple text password */
ND_TCHECK_1(bp + 7);
ND_PRINT(" auth \"");
- if (fn_printn(ndo, bp, 8, ndo->ndo_snapend)) {
+ if (nd_printn(ndo, bp, 8, ndo->ndo_snapend)) {
ND_PRINT("\"");
goto trunc;
}
}
return;
trunc:
- ND_PRINT("[|vrrp]");
+ nd_print_trunc(ndo);
}