X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/e2982e7f6f0b624a773ec5a58885ee80fab46d34..c6a5cc1bb49bcbc5f74c66bf780b8a1a05e8eb9d:/print-vqp.c diff --git a/print-vqp.c b/print-vqp.c index 672dbd8d..0c481452 100644 --- a/print-vqp.c +++ b/print-vqp.c @@ -18,10 +18,10 @@ /* \summary: Cisco VLAN Query Protocol (VQP) printer */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif -#include +#include "netdissect-stdinc.h" #include "netdissect.h" #include "extract.h" @@ -108,6 +108,7 @@ vqp_print(netdissect_options *ndo, const u_char *pptr, u_int len) u_int tlen; uint8_t nitems; + ndo->ndo_protocol = "vqp"; tptr=pptr; tlen = len; vqp_common_header = (const struct vqp_common_header_t *)pptr; @@ -187,7 +188,7 @@ vqp_print(netdissect_options *ndo, const u_char *pptr, u_int len) case VQP_OBJ_VLAN_NAME: case VQP_OBJ_VTP_DOMAIN: case VQP_OBJ_ETHERNET_PKT: - safeputs(ndo, tptr, vqp_obj_len); + (void)nd_printzp(ndo, tptr, vqp_obj_len, NULL); break; /* those objects have similar semantics - fall through */ case VQP_OBJ_MAC_ADDRESS: @@ -207,5 +208,5 @@ vqp_print(netdissect_options *ndo, const u_char *pptr, u_int len) } return; trunc: - ND_PRINT("\n\t[|VQP]"); + nd_print_trunc(ndo); }