]> 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)
committerDenis Ovsienko <[email protected]>
Tue, 1 Nov 2016 15:08:24 +0000 (15:08 +0000)
Fixes first problem in issue #516 while the second one isn't broken in tcpdump.

print-tcp.c
tcp.h

index 7a04a6ff70b1081a65b95d3ec4b77733fe5e0478..35b18492f8cb018c08cd8e5cb4f5e1b62ca15a60 100644 (file)
@@ -127,8 +127,9 @@ static const struct tok tcp_option_values[] = {
         { TCPOPT_CCNEW, "ccnew" },
         { TCPOPT_CCECHO, "" },
         { TCPOPT_SIGNATURE, "md5" },
-        { TCPOPT_AUTH, "enhanced auth" },
+        { TCPOPT_SCPS, "scps" },
         { TCPOPT_UTO, "uto" },
+        { TCPOPT_AUTH, "enhanced auth" },
         { TCPOPT_MPTCP, "mptcp" },
         { TCPOPT_FASTOPEN, "tfo" },
         { TCPOPT_EXPERIMENT2, "exp" },
@@ -537,6 +538,12 @@ tcp_print(netdissect_options *ndo,
 #endif
                                 break;
 
+                        case TCPOPT_SCPS:
+                                datalen = 2;
+                                LENCHECK(datalen);
+                                ND_PRINT((ndo, " cap %02x id %u", cp[0], cp[1]));
+                                break;
+
                         case TCPOPT_AUTH:
                                 ND_PRINT((ndo, " keyid %d", *cp++));
                                 datalen = len - 3;
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_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_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) */