/* \summary: Cisco VLAN Trunking Protocol (VTP) printer */
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
-#include <netdissect-stdinc.h>
+#include "netdissect-stdinc.h"
#include "netdissect.h"
#include "addrtoname.h"
};
void
-vtp_print (netdissect_options *ndo,
- const u_char *pptr, u_int length)
+vtp_print(netdissect_options *ndo,
+ const u_char *pptr, u_int length)
{
u_int type, len, name_len, tlv_len, tlv_value, mgmtd_len;
const u_char *tptr;
const struct vtp_vlan_ *vtp_vlan;
+ ndo->ndo_protocol = "vtp";
if (length < VTP_HEADER_LEN)
goto trunc;
ND_PRINT(" [invalid MgmtD Len %u]", mgmtd_len);
return;
}
- fn_printzp(ndo, tptr + 4, mgmtd_len, NULL);
+ nd_printzp(ndo, tptr + 4, mgmtd_len, NULL);
ND_PRINT(", %s: %u",
tok2str(vtp_header_values, "Unknown", type),
EXTRACT_U_1(tptr + 2));
if (len < 4*((name_len + 3)/4))
goto trunc;
ND_TCHECK_LEN(tptr, name_len);
- fn_printzp(ndo, tptr, name_len, NULL);
+ nd_printzp(ndo, tptr, name_len, NULL);
/*
* Vlan names are aligned to 32-bit boundaries.
return;
trunc:
- ND_PRINT("[|vtp]");
+ nd_print_trunc(ndo);
}
-
-/*
- * Local Variables:
- * c-style: whitesmith
- * c-basic-offset: 4
- * End:
- */