summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannes <hannes>2005-11-29 09:07:47 +0000
committerhannes <hannes>2005-11-29 09:07:47 +0000
commit95f66c8c622d57b50443c4d40be8b00a7de0aa94 (patch)
tree251bb44669e6eabd03780438bc4c18d46c99ce06
parentb55d46f064bb970eb9ec1e787a221cbc75774f3a (diff)
downloadtcpdump-95f66c8c622d57b50443c4d40be8b00a7de0aa94.tar.gz
add basic support for keyed authentication TCP option
-rw-r--r--print-tcp.c11
-rw-r--r--tcp.h4
2 files changed, 12 insertions, 3 deletions
diff --git a/print-tcp.c b/print-tcp.c
index 4fffc7a2..b5d70c82 100644
--- a/print-tcp.c
+++ b/print-tcp.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.123 2005-10-16 06:05:03 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.124 2005-11-29 09:07:47 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -616,6 +616,15 @@ tcp_print(register const u_char *bp, register u_int length,
#endif
break;
+ case TCPOPT_AUTH:
+ (void)printf("Enhanced Auth: keyid %d", *cp++);
+ datalen = len - 3;
+ for (i = 0; i < datalen; ++i) {
+ LENCHECK(i);
+ (void)printf("%02x", cp[i]);
+ }
+ break;
+
default:
(void)printf("opt-%u:", opt);
datalen = len - 2;
diff --git a/tcp.h b/tcp.h
index f7e7d6ea..287ad223 100644
--- a/tcp.h
+++ b/tcp.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.11 2004-03-23 07:15:37 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.12 2005-11-29 09:07:47 hannes Exp $ (LBL) */
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
@@ -77,8 +77,8 @@ struct tcphdr {
#define TCPOPT_CCECHO 13 /* T/TCP CC options (rfc1644) */
#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_TSTAMP_HDR \
(TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)