case CFM_OPCODE_CCM:
msg_ptr.cfm_ccm = (const struct cfm_ccm_t *)tptr;
if (first_tlv_offset < sizeof(*msg_ptr.cfm_ccm)) {
- ND_PRINT(" (too small 1, must be >= %lu)",
- (unsigned long) sizeof(*msg_ptr.cfm_ccm));
+ ND_PRINT(" (too small 1, must be >= %zu)",
+ sizeof(*msg_ptr.cfm_ccm));
return;
}
if (tlen < sizeof(*msg_ptr.cfm_ccm))
case CFM_OPCODE_LTM:
msg_ptr.cfm_ltm = (const struct cfm_ltm_t *)tptr;
if (first_tlv_offset < sizeof(*msg_ptr.cfm_ltm)) {
- ND_PRINT(" (too small 4, must be >= %lu)",
- (unsigned long) sizeof(*msg_ptr.cfm_ltm));
+ ND_PRINT(" (too small 4, must be >= %zu)",
+ sizeof(*msg_ptr.cfm_ltm));
return;
}
if (tlen < sizeof(*msg_ptr.cfm_ltm))
case CFM_OPCODE_LTR:
msg_ptr.cfm_ltr = (const struct cfm_ltr_t *)tptr;
if (first_tlv_offset < sizeof(*msg_ptr.cfm_ltr)) {
- ND_PRINT(" (too small 5, must be >= %lu)",
- (unsigned long) sizeof(*msg_ptr.cfm_ltr));
+ ND_PRINT(" (too small 5, must be >= %zu)",
+ sizeof(*msg_ptr.cfm_ltr));
return;
}
if (tlen < sizeof(*msg_ptr.cfm_ltr))
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);
}
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);
ND_TCHECK_2(lshp->ls_length);
ls_length = GET_BE_U_2(lshp->ls_length);
if (ls_length < sizeof(struct lsa_hdr)) {
- ND_PRINT("\n\t Bogus length %u < header (%lu)", ls_length,
- (unsigned long)sizeof(struct lsa_hdr));
+ ND_PRINT("\n\t Bogus length %u < header (%zu)", ls_length,
+ sizeof(struct lsa_hdr));
return(-1);
}
return -1;
}
if(rsvp_obj_len < sizeof(struct rsvp_object_header)) {
- ND_PRINT("%sERROR: object header too short %u < %lu", indent, rsvp_obj_len,
- (unsigned long)sizeof(struct rsvp_object_header));
+ ND_PRINT("%sERROR: object header too short %u < %zu", indent, rsvp_obj_len,
+ sizeof(struct rsvp_object_header));
return -1;
}
GET_BE_U_2(rsvp_com_header->checksum));
if (tlen < sizeof(struct rsvp_common_header)) {
- ND_PRINT("ERROR: common header too short %u < %lu", tlen,
- (unsigned long)sizeof(struct rsvp_common_header));
+ ND_PRINT("ERROR: common header too short %u < %zu", tlen,
+ sizeof(struct rsvp_common_header));
return;
}
GET_BE_U_2(rsvp_com_header->checksum));
if (subtlen < sizeof(struct rsvp_common_header)) {
- ND_PRINT("ERROR: common header too short %u < %lu", subtlen,
- (unsigned long)sizeof(struct rsvp_common_header));
+ ND_PRINT("ERROR: common header too short %u < %zu", subtlen,
+ sizeof(struct rsvp_common_header));
return;
}
/* length includes the type and length fields */
if (tlv_len < sizeof(struct tlv_header_t)) {
- ND_PRINT("\n\t ERROR: illegal length - should be >= %lu",
- (unsigned long) sizeof(struct tlv_header_t));
+ ND_PRINT("\n\t ERROR: illegal length - should be >= %zu",
+ sizeof(struct tlv_header_t));
return;
}
case ((SLOW_PROTO_LACP << 8) + LACP_TLV_PARTNER_INFO):
if (tlv_tlen !=
sizeof(struct lacp_tlv_actor_partner_info_t)) {
- ND_PRINT("\n\t ERROR: illegal length - should be %lu",
- (unsigned long) (sizeof(struct tlv_header_t) + sizeof(struct lacp_tlv_actor_partner_info_t)));
+ ND_PRINT("\n\t ERROR: illegal length - should be %zu",
+ sizeof(struct tlv_header_t) + sizeof(struct lacp_tlv_actor_partner_info_t));
goto badlength;
}
case ((SLOW_PROTO_LACP << 8) + LACP_TLV_COLLECTOR_INFO):
if (tlv_tlen !=
sizeof(struct lacp_tlv_collector_info_t)) {
- ND_PRINT("\n\t ERROR: illegal length - should be %lu",
- (unsigned long) (sizeof(struct tlv_header_t) + sizeof(struct lacp_tlv_collector_info_t)));
+ ND_PRINT("\n\t ERROR: illegal length - should be %zu",
+ sizeof(struct tlv_header_t) + sizeof(struct lacp_tlv_collector_info_t));
goto badlength;
}
case ((SLOW_PROTO_MARKER << 8) + MARKER_TLV_MARKER_INFO):
if (tlv_tlen !=
sizeof(struct marker_tlv_marker_info_t)) {
- ND_PRINT("\n\t ERROR: illegal length - should be %lu",
- (unsigned long) (sizeof(struct tlv_header_t) + sizeof(struct marker_tlv_marker_info_t)));
+ ND_PRINT("\n\t ERROR: illegal length - should be %zu",
+ sizeof(struct tlv_header_t) + sizeof(struct marker_tlv_marker_info_t));
goto badlength;
}
if (GET_U_1(tlv.slow_oam_info->info_length) !=
sizeof(struct slow_oam_info_t)) {
- ND_PRINT("\n\t ERROR: illegal length - should be %lu",
- (unsigned long) sizeof(struct slow_oam_info_t));
+ ND_PRINT("\n\t ERROR: illegal length - should be %zu",
+ sizeof(struct slow_oam_info_t));
hexdump = TRUE;
goto badlength_code_info;
}
if (GET_U_1(tlv.slow_oam_link_event->event_length) !=
sizeof(struct slow_oam_link_event_t)) {
- ND_PRINT("\n\t ERROR: illegal length - should be %lu",
- (unsigned long) sizeof(struct slow_oam_link_event_t));
+ ND_PRINT("\n\t ERROR: illegal length - should be %zu",
+ sizeof(struct slow_oam_link_event_t));
hexdump = TRUE;
goto badlength_event_notif;
}
hlen = TH_OFF(tp) * 4;
if (hlen < sizeof(*tp)) {
- ND_PRINT(" tcp %u [bad hdr length %u - too short, < %lu]",
- length - hlen, hlen, (unsigned long)sizeof(*tp));
+ ND_PRINT(" tcp %u [bad hdr length %u - too short, < %zu]",
+ length - hlen, hlen, sizeof(*tp));
return;
}