X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/ee68aa36460d7efeca48747f33b7f2adc0900bfb..69f03c1c03b280b9c5863bfb47e8847d59b4ee6b:/print-sctp.c diff --git a/print-sctp.c b/print-sctp.c index e0c22076..7d1f51be 100644 --- a/print-sctp.c +++ b/print-sctp.c @@ -293,7 +293,7 @@ struct sctpUnifiedAbortHeavy{ }; /* For the graceful shutdown we must carry - * the tag (in common header) and the highest consequitive acking value + * the tag (in common header) and the highest consecutive acking value */ struct sctpShutdown { nd_uint32_t TSN_Seen; @@ -467,8 +467,8 @@ sctp_print(netdissect_options *ndo, ndo->ndo_protocol = "sctp"; if (sctpPacketLength < sizeof(struct sctpHeader)) { - ND_PRINT("truncated-sctp - %ld bytes missing!", - (long)(sizeof(struct sctpHeader) - sctpPacketLength)); + ND_PRINT("truncated-sctp - %zu bytes missing!", + sizeof(struct sctpHeader) - sctpPacketLength); return; } sctpPktHdr = (const struct sctpHeader*) bp; @@ -486,16 +486,15 @@ sctp_print(netdissect_options *ndo, if (ip6) { ND_PRINT("%s.%u > %s.%u: sctp", - ip6addr_string(ndo, ip6->ip6_src), + GET_IP6ADDR_STRING(ip6->ip6_src), sourcePort, - ip6addr_string(ndo, ip6->ip6_dst), + GET_IP6ADDR_STRING(ip6->ip6_dst), destPort); - } else - { + } else { ND_PRINT("%s.%u > %s.%u: sctp", - ipaddr_string(ndo, ip->ip_src), + GET_IPADDR_STRING(ip->ip_src), sourcePort, - ipaddr_string(ndo, ip->ip_dst), + GET_IPADDR_STRING(ip->ip_dst), destPort); } @@ -555,14 +554,13 @@ sctp_print(netdissect_options *ndo, chunkID = GET_U_1(chunkDescPtr->chunkID); ND_PRINT("[%s] ", tok2str(sctp_chunkid_str, "Unknown chunk type: 0x%x", chunkID)); - switch (chunkID) - { + switch (chunkID) { case SCTP_DATA : { const struct sctpDataPart *dataHdrPtr; uint8_t chunkFlg; uint32_t ppid; - u_int payload_size; + uint16_t payload_size; chunkFlg = GET_U_1(chunkDescPtr->chunkFlg); if ((chunkFlg & SCTP_DATA_UNORDERED) == SCTP_DATA_UNORDERED)