diff options
| author | 2002-06-11 17:05:13 +0000 | |
|---|---|---|
| committer | 2002-06-11 17:05:13 +0000 | |
| commit | b415ec6beface16b3ac546a60fe555bb1ed9256d (patch) | |
| tree | d7f406b912a1c71f0e6dc6c111c73eb3e5d81953 /usr.sbin/tcpdump/print-ike.c | |
| parent | KNF (diff) | |
| download | wireguard-openbsd-b415ec6beface16b3ac546a60fe555bb1ed9256d.tar.xz wireguard-openbsd-b415ec6beface16b3ac546a60fe555bb1ed9256d.zip | |
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 a37007a4115..9a862688dd8 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: /home/cvs/src/usr.sbin/tcpdump/print-ike.c,v 1.10 2002/02/19 19:39:40 millert Exp $ (XXX)"; + "@(#) $Header: /home/cvs/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]); } |
