From: Patrik Lundquist Date: Thu, 5 May 2016 19:31:01 +0000 (+0200) Subject: Correct TCP option Kind value for TCP Auth and add SCPS-TP. X-Git-Tag: tcpdump-4.9.0-bp~129 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/986b783f0574e50a9fc71c6937f0988b27f9529c Correct TCP option Kind value for TCP Auth and add SCPS-TP. Fixes first problem in issue #516 while the second one isn't broken in tcpdump. --- diff --git a/print-tcp.c b/print-tcp.c index 7a04a6ff..35b18492 100644 --- a/print-tcp.c +++ b/print-tcp.c @@ -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 02df6295..1084db9a 100644 --- 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) */