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 /usr.sbin/tcpdump/print-ike.c | |
parent | 52276f174a6190cc8afefc8362050b2003a318cc (diff) |
Decode IPCOMP transform IDs.
Diffstat (limited to 'usr.sbin/tcpdump/print-ike.c')
-rw-r--r-- | usr.sbin/tcpdump/print-ike.c | 11 |
1 files changed, 9 insertions, 2 deletions
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]); } |