]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tcp.c
Clean up comments.
[tcpdump] / print-tcp.c
index 2db0f547b25a17117a24ed0b553731f3c7fd43de..3310b9e9b2aafcbb071bc5070418c9d154af47a3 100644 (file)
@@ -68,8 +68,8 @@ static void print_tcp_fastopen_option(netdissect_options *ndo, const u_char *cp,
 
 
 struct tha {
-        struct in_addr src;
-        struct in_addr dst;
+        nd_ipv4 src;
+        nd_ipv4 dst;
         u_int port;
 };
 
@@ -81,8 +81,8 @@ struct tcp_seq_hash {
 };
 
 struct tha6 {
-        struct in6_addr src;
-        struct in6_addr dst;
+        nd_ipv6 src;
+        nd_ipv6 dst;
         u_int port;
 };
 
@@ -227,8 +227,8 @@ tcp_print(netdissect_options *ndo,
         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;
         }
 
@@ -399,7 +399,7 @@ tcp_print(netdissect_options *ndo,
                                 else
                                         ND_PRINT(" (correct)");
                         }
-                } else if (IP_V(ip) == 6 && ip6->ip6_plen) {
+                } else if (IP_V(ip) == 6) {
                         if (ND_TTEST_LEN(tp->th_sport, length)) {
                                 sum = tcp6_cksum(ndo, ip6, tp, length);
                                 tcp_sum = GET_BE_U_2(tp->th_sum);
@@ -721,6 +721,8 @@ tcp_print(netdissect_options *ndo,
                 pptp_print(ndo, bp);
         else if (IS_SRC_OR_DST_PORT(REDIS_PORT))
                 resp_print(ndo, bp, length);
+        else if (IS_SRC_OR_DST_PORT(SSH_PORT))
+                ssh_print(ndo, bp, length);
 #ifdef ENABLE_SMB
         else if (IS_SRC_OR_DST_PORT(NETBIOS_SSN_PORT))
                 nbt_tcp_print(ndo, bp, length);