]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tcp.c
Compile with '-Wmissing-variable-declarations' if it's available
[tcpdump] / print-tcp.c
index 4f95e334ff8cfb480f6dc3b7617cce6132556b12..d420382e995192e949c59e1c5a10536183540d43 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;
         }
 
@@ -702,6 +702,10 @@ tcp_print(netdissect_options *ndo,
                 case PT_RESP:
                         resp_print(ndo, bp, length);
                         break;
+                case PT_DOMAIN:
+                        ND_PRINT(" ");
+                        domain_print(ndo, bp + 2, length - 2, 0);
+                        break;
                 }
                 return;
         }
@@ -721,6 +725,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);