]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Correct TCP option Kind value for TCP Auth and add SCPS-TP.
authorPatrik Lundquist <[email protected]>
Thu, 5 May 2016 19:31:01 +0000 (21:31 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 18 Jan 2017 08:16:41 +0000 (09:16 +0100)
Fixes first problem in issue #516 while the second one isn't broken in tcpdump.

print-tcp.c
tcp.h

index 01d4c7b81471364e82ba426ba9866062080bfd81..0ed158fa41fe0371c669496c1a24f909279c9713 100644 (file)
@@ -127,8 +127,9 @@ static const struct tok tcp_option_values[] = {
         { TCPOPT_CCNEW, "ccnew" },
         { TCPOPT_CCECHO, "" },
         { TCPOPT_SIGNATURE, "md5" },
         { TCPOPT_CCNEW, "ccnew" },
         { TCPOPT_CCECHO, "" },
         { TCPOPT_SIGNATURE, "md5" },
-        { TCPOPT_AUTH, "enhanced auth" },
+        { TCPOPT_SCPS, "scps" },
         { TCPOPT_UTO, "uto" },
         { TCPOPT_UTO, "uto" },
+        { TCPOPT_AUTH, "enhanced auth" },
         { TCPOPT_MPTCP, "mptcp" },
         { TCPOPT_FASTOPEN, "tfo" },
         { TCPOPT_EXPERIMENT2, "exp" },
         { TCPOPT_MPTCP, "mptcp" },
         { TCPOPT_FASTOPEN, "tfo" },
         { TCPOPT_EXPERIMENT2, "exp" },
@@ -537,6 +538,12 @@ tcp_print(netdissect_options *ndo,
 #endif
                                 break;
 
 #endif
                                 break;
 
+                        case TCPOPT_SCPS:
+                                datalen = 2;
+                                LENCHECK(datalen);
+                                ND_PRINT((ndo, " cap %02x id %u", cp[0], cp[1]));
+                                break;
+
                         case TCPOPT_AUTH:
                                 LENCHECK(1);
                                 ND_PRINT((ndo, " keyid %d", *cp++));
                         case TCPOPT_AUTH:
                                 LENCHECK(1);
                                 ND_PRINT((ndo, " keyid %d", *cp++));
diff --git a/tcp.h b/tcp.h
index 02df629594d511f07386d9eff569c1796a2bde5c..1084db9a2250dcd8ab631319b998b7d0c7c335ac 100644 (file)
--- a/tcp.h
+++ b/tcp.h
@@ -81,9 +81,10 @@ struct tcphdr {
 #define TCPOPT_SIGNATURE       19      /* Keyed MD5 (rfc2385) */
 #define    TCPOLEN_SIGNATURE           18
 #define TCP_SIGLEN 16                  /* length of an option 19 digest */
 #define TCPOPT_SIGNATURE       19      /* Keyed MD5 (rfc2385) */
 #define    TCPOLEN_SIGNATURE           18
 #define TCP_SIGLEN 16                  /* length of an option 19 digest */
-#define TCPOPT_AUTH             20      /* Enhanced AUTH option */
+#define TCPOPT_SCPS            20      /* SCPS-TP (CCSDS 714.0-B-2) */
 #define        TCPOPT_UTO              28      /* tcp user timeout (rfc5482) */
 #define           TCPOLEN_UTO                  4
 #define        TCPOPT_UTO              28      /* tcp user timeout (rfc5482) */
 #define           TCPOLEN_UTO                  4
+#define TCPOPT_AUTH            29      /* Enhanced AUTH option (rfc5925) */
 #define        TCPOPT_MPTCP            30      /* MPTCP options */
 #define TCPOPT_FASTOPEN                34      /* TCP Fast Open (rfc7413) */
 #define TCPOPT_EXPERIMENT2     254     /* experimental headers (rfc4727) */
 #define        TCPOPT_MPTCP            30      /* MPTCP options */
 #define TCPOPT_FASTOPEN                34      /* TCP Fast Open (rfc7413) */
 #define TCPOPT_EXPERIMENT2     254     /* experimental headers (rfc4727) */