- if (vflag < 1) {
- printf("%s%s",
- eflag ? "" : ", ",
- tok2str(isis_pdu_values,"unknown PDU-Type %u",pdu_type));
-
- switch (pdu_type) {
-
- case ISIS_PDU_L1_LAN_IIH:
- case ISIS_PDU_L2_LAN_IIH:
- printf(", src-id %s",
- isis_print_id(header_iih_lan->source_id,SYSTEM_ID_LEN));
- printf(", lan-id %s, prio %u",
- isis_print_id(header_iih_lan->lan_id,NODE_ID_LEN),
- header_iih_lan->priority);
- break;
- case ISIS_PDU_PTP_IIH:
- printf(", src-id %s", isis_print_id(header_iih_ptp->source_id,SYSTEM_ID_LEN));
- break;
- case ISIS_PDU_L1_LSP:
- case ISIS_PDU_L2_LSP:
- printf(", lsp-id %s, seq 0x%08x, lifetime %5us",
- isis_print_id(header_lsp->lsp_id, LSP_ID_LEN),
- EXTRACT_32BITS(header_lsp->sequence_number),
- EXTRACT_16BITS(header_lsp->remaining_lifetime));
- break;
- case ISIS_PDU_L1_CSNP:
- case ISIS_PDU_L2_CSNP:
- printf(", src-id %s", isis_print_id(header_csnp->source_id,NODE_ID_LEN));
- break;
- case ISIS_PDU_L1_PSNP:
- case ISIS_PDU_L2_PSNP:
- printf(", src-id %s", isis_print_id(header_psnp->source_id,NODE_ID_LEN));
- break;
-
- }
- printf(", length %u", length);
-
- return(1);
- }
-
- /* ok they seem to want to know everything - lets fully decode it */
- printf("%slength %u", eflag ? "" : ", ",length);
-
- printf("\n\t%s, hlen: %u, v: %u, pdu-v: %u, sys-id-len: %u (%u), max-area: %u (%u)",
- tok2str(isis_pdu_values,
- "unknown, type %u",
- pdu_type),
- isis_header->fixed_len,
- isis_header->version,
- isis_header->pdu_version,
- id_length,
- isis_header->id_length,
- max_area,
- isis_header->max_area);
-
- if (vflag > 1) {
- if(!print_unknown_data(gndo,optr,"\n\t",8)) /* provide the _o_riginal pointer */
- return(0); /* for optionally debugging the common header */
+ if (ndo->ndo_vflag == 0) {
+ ND_PRINT((ndo, "%s%s",
+ ndo->ndo_eflag ? "" : ", ",
+ tok2str(isis_pdu_values, "unknown PDU-Type %u", pdu_type)));
+ } else {
+ /* ok they seem to want to know everything - lets fully decode it */
+ ND_PRINT((ndo, "%slength %u", ndo->ndo_eflag ? "" : ", ", length));
+
+ ND_PRINT((ndo, "\n\t%s, hlen: %u, v: %u, pdu-v: %u, sys-id-len: %u (%u), max-area: %u (%u)",
+ tok2str(isis_pdu_values,
+ "unknown, type %u",
+ pdu_type),
+ isis_header->fixed_len,
+ isis_header->version,
+ isis_header->pdu_version,
+ id_length,
+ isis_header->id_length,
+ max_area,
+ isis_header->max_area));
+
+ if (ndo->ndo_vflag > 1) {
+ if (!print_unknown_data(ndo, optr, "\n\t", 8)) /* provide the _o_riginal pointer */
+ return (0); /* for optionally debugging the common header */
+ }