- TCHECK(bp[2]);
- printf(", vrid %u, prio %u", bp[1], bp[2]);
- TCHECK(bp[5]);
- auth_type = bp[4];
- printf(", authtype %s", tok2str(auth2str, NULL, auth_type));
- printf(", intvl %us, length %u", bp[5],len);
- if (vflag) {
+ ND_TCHECK(bp[2]);
+ ND_PRINT((ndo, ", vrid %u, prio %u", bp[1], bp[2]));
+ ND_TCHECK(bp[5]);
+
+ if (version == 2) {
+ auth_type = bp[4];
+ ND_PRINT((ndo, ", authtype %s", tok2str(auth2str, NULL, auth_type)));
+ ND_PRINT((ndo, ", intvl %us, length %u", bp[5], len));
+ } else { /* version == 3 */
+ uint16_t intvl = (bp[4] & 0x0f) << 8 | bp[5];
+ ND_PRINT((ndo, ", intvl %ucs, length %u", intvl, len));
+ }
+
+ if (ndo->ndo_vflag) {