]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-sctp.c
Update some tests files if the packet time is > 2038-01-19 03:14:07 UTC
[tcpdump] / print-sctp.c
index 9384a93d2847db82f76e468291ccea278471c8bf..7d1f51be0713d7722283de10a8d2056a4f93f39b 100644 (file)
@@ -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,8 +554,7 @@ 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;