X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/b8037ee9610ca42e2f6a9f4f71ccaa45f058475f..dff10c7f70d539c431a1eba9ab5e076d8b0f5c8e:/print-isakmp.c?ds=inline diff --git a/print-isakmp.c b/print-isakmp.c index 7acf8940..5f4abc00 100644 --- a/print-isakmp.c +++ b/print-isakmp.c @@ -30,7 +30,11 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.6 1999-10-30 07:36:37 itojun Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.10 2000-01-17 06:24:25 itojun Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -997,6 +1001,7 @@ isakmp_print(const u_char *bp, u_int length, const u_char *bp2) u_char np; int i; int phase; + int major, minor; base = (struct isakmp *)bp; ep = (u_char *)snapend; @@ -1007,8 +1012,13 @@ isakmp_print(const u_char *bp, u_int length, const u_char *bp2) } printf("isakmp"); - if (vflag) - printf(" %d.%d", base->v_maj, base->v_min); + if (vflag) { + major = (base->vers & ISAKMP_VERS_MAJOR) + >> ISAKMP_VERS_MAJOR_SHIFT; + minor = (base->vers & ISAKMP_VERS_MINOR) + >> ISAKMP_VERS_MINOR_SHIFT; + printf(" %d.%d", major, minor); + } if (vflag) { printf(" msgid ");