]> The Tcpdump Group git mirrors - tcpdump/commitdiff
add basic support for keyed authentication TCP option
authorhannes <hannes>
Tue, 29 Nov 2005 09:07:47 +0000 (09:07 +0000)
committerhannes <hannes>
Tue, 29 Nov 2005 09:07:47 +0000 (09:07 +0000)
print-tcp.c
tcp.h

index 4fffc7a2fc7ab1d0a3b591da36f47f5bea8f6743..b5d70c82f66f2c80989e0a7e27d73de7fcdc15ee 100644 (file)
@@ -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 f7e7d6eac95e7c0054de4cf9a1973dd6456ae8a5..287ad2239796886d5f6eca9e877495759b70482b 100644 (file)
--- 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)