From: guy Date: Sun, 7 Nov 2004 22:05:20 +0000 (+0000) Subject: If libpcap is configured with --enable-optimizer-dbg, it expects dflag X-Git-Tag: tcpdump-3.9.1~245 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/3a0c6efa53b5200e6df9dc2e7513a32503af3ca6 If libpcap is configured with --enable-optimizer-dbg, it expects dflag to be a global supplied by the application using it. In tcpdump, "-d" is a specialized flag, and doesn't apply to packet dissection, so it doesn't belong in the netdissect structure - make it a global again. --- diff --git a/interface.h b/interface.h index 19597e88..f3762eae 100644 --- a/interface.h +++ b/interface.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.236 2004-10-29 11:42:53 hannes Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.237 2004-11-07 22:05:20 guy Exp $ (LBL) */ #ifndef tcpdump_interface_h @@ -313,7 +313,6 @@ extern void bpf_dump(struct bpf_program *, int); netdissect_options *gndo; -#define dflag gndo->ndo_dflag #define eflag gndo->ndo_eflag #define fflag gndo->ndo_fflag #define nflag gndo->ndo_nflag diff --git a/netdissect.h b/netdissect.h index 71df2146..f31c6602 100644 --- a/netdissect.h +++ b/netdissect.h @@ -21,7 +21,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.11 2004-11-04 07:44:05 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.12 2004-11-07 22:05:20 guy Exp $ (LBL) */ #ifndef netdissect_h @@ -83,7 +83,6 @@ typedef struct netdissect_options netdissect_options; struct netdissect_options { int ndo_aflag; /* translate network and broadcast addresses */ - int ndo_dflag; /* print filter code */ int ndo_eflag; /* print ethernet header */ int ndo_fflag; /* don't translate "foreign" IP address */ int ndo_nflag; /* leave addresses as numbers */ diff --git a/tcpdump.c b/tcpdump.c index ac6a6c8e..35c11532 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -30,7 +30,7 @@ static const char copyright[] _U_ = "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\ The Regents of the University of California. All rights reserved.\n"; static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.249 2004-10-19 15:59:40 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.250 2004-11-07 22:05:20 guy Exp $ (LBL)"; #endif /* @@ -90,7 +90,8 @@ netdissect_options *gndo = &Gndo; #define MAX_CFLAG 1000000 #define MAX_CFLAG_CHARS 6 -int Lflag; /* list available data link types and exit */ +int dflag; /* print filter code */ +int Lflag; /* list available data link types and exit */ static int infodelay; static int infoprint;