optr = pptr;
if (!ndo->ndo_eflag)
- ND_PRINT("CLNP");
+ nd_print_protocol_caps(ndo);
/*
* Sanity checking of the header.
if (sysid_len > id_len)
sysid_len = id_len;
for (i = 1; i <= sysid_len; i++) {
- nd_snprintf(pos, sizeof(id) - (pos - id), "%02x", GET_U_1(cp));
+ snprintf(pos, sizeof(id) - (pos - id), "%02x", GET_U_1(cp));
cp++;
pos += strlen(pos);
if (i == 2 || i == 4)
*pos++ = '.';
}
if (id_len >= NODE_ID_LEN) {
- nd_snprintf(pos, sizeof(id) - (pos - id), ".%02x", GET_U_1(cp));
+ snprintf(pos, sizeof(id) - (pos - id), ".%02x", GET_U_1(cp));
cp++;
pos += strlen(pos);
}
if (id_len == LSP_ID_LEN)
- nd_snprintf(pos, sizeof(id) - (pos - id), "-%02x", GET_U_1(cp));
+ snprintf(pos, sizeof(id) - (pos - id), "-%02x", GET_U_1(cp));
return (id);
}
while (length > 0) {
if ((size_t)length < sizeof(*tlv_ip_reach)) {
- ND_PRINT("short IPv4 Reachability (%u vs %lu)",
+ ND_PRINT("short IPv4 Reachability (%u vs %zu)",
length,
- (unsigned long)sizeof(*tlv_ip_reach));
+ sizeof(*tlv_ip_reach));
return (0);
}
if (subtlv_sum_len) {
ND_PRINT(" (%u)", subtlv_sum_len);
/* prepend the indent string */
- nd_snprintf(ident_buffer, sizeof(ident_buffer), "%s ",ident);
+ snprintf(ident_buffer, sizeof(ident_buffer), "%s ",ident);
ident = ident_buffer;
while (subtlv_sum_len != 0) {
ND_TCHECK_2(tptr);
subtlvlen=GET_U_1(tptr + 1);
tptr+=2;
/* prepend the indent string */
- nd_snprintf(ident_buffer, sizeof(ident_buffer), "%s ",ident);
+ snprintf(ident_buffer, sizeof(ident_buffer), "%s ",ident);
if (!isis_print_ip_reach_subtlv(ndo, tptr, subtlvtype, subtlvlen, ident_buffer))
return(0);
tptr+=subtlvlen;
case ISIS_PDU_L1_LAN_IIH:
case ISIS_PDU_L2_LAN_IIH:
if (fixed_len != (ISIS_COMMON_HEADER_SIZE+ISIS_IIH_LAN_HEADER_SIZE)) {
- ND_PRINT(", bogus fixed header length %u should be %lu",
- fixed_len, (unsigned long)(ISIS_COMMON_HEADER_SIZE+ISIS_IIH_LAN_HEADER_SIZE));
+ ND_PRINT(", bogus fixed header length %u should be %zu",
+ fixed_len, ISIS_COMMON_HEADER_SIZE+ISIS_IIH_LAN_HEADER_SIZE);
return (0);
}
ND_TCHECK_SIZE(header_iih_lan);
case ISIS_PDU_PTP_IIH:
if (fixed_len != (ISIS_COMMON_HEADER_SIZE+ISIS_IIH_PTP_HEADER_SIZE)) {
- ND_PRINT(", bogus fixed header length %u should be %lu",
- fixed_len, (unsigned long)(ISIS_COMMON_HEADER_SIZE+ISIS_IIH_PTP_HEADER_SIZE));
+ ND_PRINT(", bogus fixed header length %u should be %zu",
+ fixed_len, ISIS_COMMON_HEADER_SIZE+ISIS_IIH_PTP_HEADER_SIZE);
return (0);
}
ND_TCHECK_SIZE(header_iih_ptp);
case ISIS_PDU_L1_LSP:
case ISIS_PDU_L2_LSP:
if (fixed_len != (ISIS_COMMON_HEADER_SIZE+ISIS_LSP_HEADER_SIZE)) {
- ND_PRINT(", bogus fixed header length %u should be %lu",
- fixed_len, (unsigned long)ISIS_LSP_HEADER_SIZE);
+ ND_PRINT(", bogus fixed header length %u should be %zu",
+ fixed_len, ISIS_LSP_HEADER_SIZE);
return (0);
}
ND_TCHECK_SIZE(header_lsp);
case ISIS_PDU_L1_CSNP:
case ISIS_PDU_L2_CSNP:
if (fixed_len != (ISIS_COMMON_HEADER_SIZE+ISIS_CSNP_HEADER_SIZE)) {
- ND_PRINT(", bogus fixed header length %u should be %lu",
- fixed_len, (unsigned long)(ISIS_COMMON_HEADER_SIZE+ISIS_CSNP_HEADER_SIZE));
+ ND_PRINT(", bogus fixed header length %u should be %zu",
+ fixed_len, ISIS_COMMON_HEADER_SIZE+ISIS_CSNP_HEADER_SIZE);
return (0);
}
ND_TCHECK_SIZE(header_csnp);
case ISIS_PDU_L1_PSNP:
case ISIS_PDU_L2_PSNP:
if (fixed_len != (ISIS_COMMON_HEADER_SIZE+ISIS_PSNP_HEADER_SIZE)) {
- ND_PRINT("- bogus fixed header length %u should be %lu",
- fixed_len, (unsigned long)(ISIS_COMMON_HEADER_SIZE+ISIS_PSNP_HEADER_SIZE));
+ ND_PRINT("- bogus fixed header length %u should be %zu",
+ fixed_len, ISIS_COMMON_HEADER_SIZE+ISIS_PSNP_HEADER_SIZE);
return (0);
}
ND_TCHECK_SIZE(header_psnp);