diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2002-06-11 17:05:14 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2002-06-11 17:05:14 +0000 |
commit | 6bbf3836dc9e927ffa17469331464b130e807544 (patch) | |
tree | a25dcad1177af745a6221a05540aec859d81b28b | |
parent | 52276f174a6190cc8afefc8362050b2003a318cc (diff) |
Decode IPCOMP transform IDs.
-rw-r--r-- | usr.sbin/tcpdump/ike.h | 4 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-ike.c | 11 |
2 files changed, 11 insertions, 4 deletions
diff --git a/usr.sbin/tcpdump/ike.h b/usr.sbin/tcpdump/ike.h index 2ffc990bf68..ab87e635542 100644 --- a/usr.sbin/tcpdump/ike.h +++ b/usr.sbin/tcpdump/ike.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ike.h,v 1.4 2001/10/26 14:14:49 ho Exp $ */ +/* $OpenBSD: ike.h,v 1.5 2002/06/11 17:05:13 ho Exp $ */ /* * Copyright (c) 2001 Håkan Olsson. All rights reserved. @@ -312,7 +312,7 @@ "CAST", "BLOWFISH", "3IDEA", "DES_IV32", "RC4", \ "NULL", "AES", \ } -#define IPSEC_ATTR_IPCOMP_INITIALIZER \ +#define IPCOMP_INITIALIZER \ { "NONE", "OUI", "DEFLATE", "LZS", "V42BIS", \ } diff --git a/usr.sbin/tcpdump/print-ike.c b/usr.sbin/tcpdump/print-ike.c index 510fb0f6ee1..5009f996df0 100644 --- a/usr.sbin/tcpdump/print-ike.c +++ b/usr.sbin/tcpdump/print-ike.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-ike.c,v 1.10 2002/02/19 19:39:40 millert Exp $ */ +/* $OpenBSD: print-ike.c,v 1.11 2002/06/11 17:05:13 ho Exp $ */ /* * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999 @@ -29,7 +29,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-ike.c,v 1.10 2002/02/19 19:39:40 millert Exp $ (XXX)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-ike.c,v 1.11 2002/06/11 17:05:13 ho Exp $ (XXX)"; #endif #include <sys/param.h> @@ -295,6 +295,7 @@ ike_pl_transform_print (u_char *buf, int len, u_char doi) { const char *ah[] = IPSEC_AH_INITIALIZER; const char *esp[] = IPSEC_ESP_INITIALIZER; + const char *ipcomp[] = IPCOMP_INITIALIZER; u_char *attr = buf + 4; printf("\n\t%stransform: %u ID: ", ike_tab_offset(), buf[0]); @@ -321,6 +322,12 @@ ike_pl_transform_print (u_char *buf, int len, u_char doi) else printf("%d(unknown)", buf[1]); break; + case PROTO_IPCOMP: + if (buf[1] < (sizeof ipcomp / sizeof ipcomp[0])) + printf("%s", ipcomp[buf[1]]); + else + printf("%d(unknown)", buf[1]); + break; default: printf("%d(unknown)", buf[1]); } |