ND_TCHECK(*mcid);
ND_PRINT((ndo, "ID: %d, Name: ", mcid->format_id));
- for(i=0; i<32; i++)
- {
- ND_PRINT((ndo, "%c", mcid->name[i]));
- if(mcid->name[i] == '\0')
- break;
- }
+ if (fn_printzp(ndo, mcid->name, 32, ndo->ndo_snapend))
+ goto trunc;
ND_PRINT((ndo, "\n\t Lvl: %d", EXTRACT_16BITS(mcid->revision_lvl)));
return(0);
}
-
/*
* this is the common IS-REACH decoder it is called
* from various EXTD-IS REACH style TLVs (22,24,222)
EXTRACT_16BITS(header_lsp->remaining_lifetime),
EXTRACT_16BITS(header_lsp->checksum)));
-
if (osi_print_cksum(ndo, (uint8_t *)header_lsp->lsp_id,
EXTRACT_16BITS(header_lsp->checksum),
12, length-12) == 0)
header_lsp->remaining_lifetime[0] = 0;
header_lsp->remaining_lifetime[1] = 0;
-
ND_PRINT((ndo, ", PDU length: %u, Flags: [ %s",
pdu_len,
ISIS_MASK_LSP_OL_BIT(header_lsp->typeblock) ? "Overload bit set, " : ""));
switch (*tptr) {
case ISIS_SUBTLV_AUTH_SIMPLE:
- for(i=1;i<tlv_len;i++) {
- if (!ND_TTEST2(*(tptr + i), 1))
- goto trunctlv;
- ND_PRINT((ndo, "%c", *(tptr + i)));
- }
+ if (fn_printzp(ndo, tptr + 1, tlv_len - 1, ndo->ndo_snapend))
+ goto trunctlv;
break;
case ISIS_SUBTLV_AUTH_MD5:
for(i=1;i<tlv_len;i++) {
case ISIS_TLV_HOSTNAME:
ND_PRINT((ndo, "\n\t Hostname: "));
- while (tmp>0) {
- if (!ND_TTEST2(*tptr, 1))
- goto trunctlv;
- ND_PRINT((ndo, "%c", *tptr++));
- tmp--;
- }
+ if (fn_printzp(ndo, tptr, tmp, ndo->ndo_snapend))
+ goto trunctlv;
break;
case ISIS_TLV_SHARED_RISK_GROUP: