X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/7294fd8057c19caff7f0da9b5502d81a31e33561..0b0686d0d953cb733d0ba664885bbb382f6ac64a:/print-ldp.c diff --git a/print-ldp.c b/print-ldp.c index 75e6dd20..a62d22ba 100644 --- a/print-ldp.c +++ b/print-ldp.c @@ -307,14 +307,14 @@ ldp_tlv_print(netdissect_options *ndo, ND_PRINT("\n\t Address Family: %s, addresses", tok2str(af_values, "Unknown (%u)", af)); switch (af) { - case AFNUM_INET: + case AFNUM_IP: while(tlv_tlen >= sizeof(nd_ipv4)) { ND_PRINT(" %s", GET_IPADDR_STRING(tptr)); tlv_tlen-=sizeof(nd_ipv4); tptr+=sizeof(nd_ipv4); } break; - case AFNUM_INET6: + case AFNUM_IP6: while(tlv_tlen >= sizeof(nd_ipv6)) { ND_PRINT(" %s", GET_IP6ADDR_STRING(tptr)); tlv_tlen-=sizeof(nd_ipv6); @@ -354,7 +354,7 @@ ldp_tlv_print(netdissect_options *ndo, af = GET_BE_U_2(tptr); tptr+=2; tlv_tlen-=2; - if (af == AFNUM_INET) { + if (af == AFNUM_IP) { i=decode_prefix4(ndo, tptr, tlv_tlen, buf, sizeof(buf)); if (i == -2) goto trunc; @@ -365,7 +365,7 @@ ldp_tlv_print(netdissect_options *ndo, else ND_PRINT(": IPv4 prefix %s", buf); } - else if (af == AFNUM_INET6) { + else if (af == AFNUM_IP6) { i=decode_prefix6(ndo, tptr, tlv_tlen, buf, sizeof(buf)); if (i == -2) goto trunc; @@ -593,10 +593,10 @@ ldp_pdu_print(netdissect_options *ndo, pdu_len = GET_BE_U_2(ldp_com_header->pdu_length); if (pdu_len < sizeof(struct ldp_common_header)-4) { /* length too short */ - ND_PRINT("%sLDP, pdu-length: %u (too short, < %u)", - (ndo->ndo_vflag < 1) ? "" : "\n\t", - pdu_len, - (u_int)(sizeof(struct ldp_common_header)-4)); + ND_PRINT("%sLDP, pdu-length: %u (too short, < %zu)", + (ndo->ndo_vflag < 1) ? "" : "\n\t", + pdu_len, + sizeof(struct ldp_common_header)-4); return 0; } @@ -626,13 +626,13 @@ ldp_pdu_print(netdissect_options *ndo, if (msg_len < sizeof(struct ldp_msg_header)-4) { /* length too short */ /* FIXME vendor private / experimental check */ - ND_PRINT("\n\t %s Message (0x%04x), length: %u (too short, < %u)", - tok2str(ldp_msg_values, - "Unknown", - msg_type), - msg_type, - msg_len, - (u_int)(sizeof(struct ldp_msg_header)-4)); + ND_PRINT("\n\t %s Message (0x%04x), length: %u (too short, < %zu)", + tok2str(ldp_msg_values, + "Unknown", + msg_type), + msg_type, + msg_len, + sizeof(struct ldp_msg_header)-4); return 0; }