Commit Graph

52 Commits

Author SHA1 Message Date
guy
c8e5cd1da7 Regenerate with autoconf 2.57. 2004-01-14 03:15:08 +00:00
guy
0cf35b497d Print both the name and the description of a link-layer type (the name
isn't always very suggestive - for example, somebody might think
"EN10MB" is always 10 MB/s, and might not know that "IEEE802" is Token
Ring), using "pcap_datalink_val_to_description()".  Supply our own
"pcap_datalink_val_to_description()" if libpcap doesn't have it (even if
it has "pcap_datalink_name_to_val()").
2003-11-18 23:09:42 +00:00
guy
8f34a01034 Check whether we have "pcap_breakloop()", and use it if we do - it's a
safer way to terminate "pcap_loop()" in a signal handler (it just sets a
flag, it doesn't muck with data structures that might have been in the
middle of being updated).

Have "setsignal()" not request SA_RESTART, so that if we call
"pcap_breakloop()" in a signal handler and then return, we don't restart
a call that was waiting for captured packets, we just make that call
EINTR out.
2003-11-04 07:29:15 +00:00
guy
71c6fb6191 Regenerate. 2003-08-06 04:51:23 +00:00
itojun
37cba74a72 regen 2003-07-17 13:45:33 +00:00
guy
8f758e65ff Use AC_TRY_LINK, not AC_TRY_COMPILE, when looking for
inet_ntop/inet_pton/inet_aton, and don't use AC_REPLACE_FUNCS to set
LIBOBJS to include the replacement module, as that does the full check
for the routine again, not just the simple replacement.

Move the tests in question after AC_LBL_LIBPCAP, so that we link with
the appropriate libraries (e.g., "-lsocket -lnsl" on Solaris) to use
when using those routines.
2003-05-02 08:48:25 +00:00
guy
24f5540899 From Gisle Vanem: make print-esp.c work with more (maybe all?) OpenSSL
versions, and changes to make it work on DOS/Windows with various
compilers and C support libraries.
2003-03-02 23:19:33 +00:00
guy
0f4f08e620 Use "pcap_lib_version()" to get the libpcap version number if it's
available in the libpcap we're using.
2003-02-11 07:41:52 +00:00
guy
b8e2c3bead From Andrew Brown <atatat@atatdot.net>: add a "-U" flag, which causes
the output stream for "-w" to be flushed after each packet is dumped.

Add checks for "pcap_dump_flush()", and only enable the "-U" flag if
it's present.  Clean up the handling of the "getopt()" argument and the
usage message to get rid of the pile of #ifdefs.

Add documentation for the "-L" and "-y" flags.

Tweak the description of "-r" to properly format "-w" in the text.
2002-12-22 00:15:26 +00:00
guy
6076158547 NetBSD support for multiple data link types on an interface, from David
Young <dyoung@ojctech.com>, with some minor changes by Jason R. Thorpe
<thorpej@netbsd.org>, and further changes by me to:

	use "-y" rather than "-D" to set the link type ("-D" was already
	taken);

	use libpcap APIs to map between data link type names and values;

	supply stub versions of missing-but-needed libpcap APIs.

Update Jason Thorpe's e-mail address (Zembu is going away, if it hasn't
done so already).
2002-12-19 09:27:54 +00:00
guy
5c9aea35c4 We're using int8_t now, so we need to declare it ourselves if the OS
header files don't do so for us.
2002-12-11 05:00:05 +00:00
guy
c2bfaa8575 Check for "pcap_version" in libpcap in the configure scripts; apparently
the libpcap that comes with some platforms doesn't define it.

Check for "pcap_debug" and "yydebug" in libpcap in the configure
scripts, so that whichever one is present (which might depend on whether
libpcap was built with standard YACC or Berkeley YACC/Bison), if any is
present, will be used by the "-Y" flag (if none is present, "-Y" won't
be supported).
2002-09-05 01:31:41 +00:00
guy
edb0e92cdc Add a few more GCC warnings on GCC >= 2 for ".devel" builds.
From Neil T. Spring: fixes for many of those warnings:

	addrtoname.c, configure.in: Linux needs netinet/ether.h for
	ether_ntohost

	print-*.c: change char *foo = "bar" to const char *foo = "bar"
	to appease -Wwrite-strings; should affect no run-time behavior.

	print-*.c: make some variables unsigned.

	print-bgp.c: plen ('prefix len') is unsigned, no reason to
	validate by comparing to zero.

	print-cnfp.c, print-rx.c: use intoa, provided by addrtoname,
	instead of inet_ntoa.

	print-domain.c: unsigned int l; (l=foo()) < 0 is guaranteed to
	be false, so check for (u_int)-1, which represents failure,
	explicitly.

	print-isakmp.c: complete initialization of attrmap objects.

	print-lwres.c: "if(x); print foo;" seemed much more likely to be
	intended to be "if(x) { print foo; }".

	print-smb.c: complete initialization of some structures.

In addition, add some fixes for the signed vs. unsigned comparison
warnings:

	extract.h: cast the result of the byte-extraction-and-combining,
	as, at least for the 16-bit version, C's integral promotions
	will turn "u_int16_t" into "int" if there are other "int"s
	nearby.

	print-*.c: make some more variables unsigned, or add casts to an
	unsigned type of signed values known not to be negative, or add
	casts to "int" of unsigned values known to fit in an "int", and
	make other changes needed to handle the aforementioned variables
	now being unsigned.

	print-isakmp.c: clean up the handling of error/status indicators
	in notify messages.

	print-ppp.c: get rid of a check that an unsigned quantity is >=
	0.

	print-radius.c: clean up some of the bounds checking.

	print-smb.c: extract the word count into a "u_int" to avoid the
	aforementioned problems with C's integral promotions.

	print-snmp.c: change a check that an unsigned variable is >= 0
	to a check that it's != 0.

Also, fix some formats to use "%u" rather than "%d" for unsigned
quantities.
2002-09-05 00:00:07 +00:00
guy
04333b4868 Check for "pcap_findalldevs()" in libpcap in the configuration script;
only use it if we find it.

Define DHAVE_PCAP_FINDALLDEVS in the Windows GNU Makefile and project
file, as WinPcap has "pcap_findalldevs()".
2002-08-03 22:37:01 +00:00
guy
b1263c69c5 Some versions of the HP C compiler can handle inlines, but not if they
return a structure pointer.  Check whether the C compiler can handle
inline functions that return a structure pointer, not whether they can
handle inline functions that return an int, as at least some versions of
autoconf's AC_C_INLINE do.
2002-06-28 10:45:40 +00:00
guy
6aa353579f From Maciej W. Rozycki <macro@ds2.pg.gda.pl>:
Here is a patch that addresses a few SSL-related issues noticed:

	1. The "/usr" directory is not the best choice to start looking
	   for SSL libraries when cross-compiling.  The patch adds
	   "/usr/${host_alias}" at the front.  Actually the test is quite
	   bogus anyway -- there might be no libcrypto.a library at all
	   (but e.g. libcrypto.so), so a better approach would be trying to
	   link against -lcrypto and seeing if that works.  First with no
	   additional options (it might be in the default compiler/linker's
	   search patch, like on sane systems), then with the -L<dir>
	option.

	2. The "cast.h" and "rc5.h" headers should include the
	   "openssl/" path as that is what is used throughout the code.
	   Right now they are simply not found by configure.

	3. The buggy CAST128 test should use a cache variable to permit
	   overriding by an educated user.

	I think I may actually rewrite the test as described in #1 above
	one day, but my time is quite limited and tcpdump is not my
	priority task, so it might not happen soon.  I won't mind if
	someone does it earlier.
2002-04-07 02:16:03 +00:00
guy
0c39e2bdaa From Maciej W. Rozycki <macro@ds2.pg.gda.pl>:
DECnet support currently assumes certain conditions instead of
	checking for them explicitly.  The following code checks if
	dnet_htoa() is available, possibly in libdnet and also verifies
	there is no declaration for the function in <netdnet/dnetdb.h>
	before it decides to provide a substitute.
2002-04-07 02:09:04 +00:00
fenner
5ec294fcce Regenerate. 2001-11-12 22:39:12 +00:00
fenner
5f5130ba6d Regenerate. 2001-10-08 21:25:50 +00:00
fenner
1c8df3dc06 Regenerate. 2001-10-08 16:17:51 +00:00
guy
cab3c4cb47 As we're not using "bcmp()" or "bcopy()" in "addrtoname.c", we don't
need to include <strings.h> on some platforms in order to declare them.
2001-06-28 10:27:08 +00:00
guy
cc67460fe4 If the platform on which tcpdump is being built has "strings.h", include
it in "addrtoname.c", so that "bcmp()" and "bcopy()" are defined.
2001-06-26 06:36:08 +00:00
itojun
57b2b8fb2f AC_C_BIGENDIAN is no longer used. 2001-06-24 21:39:08 +00:00
fenner
3893f46237 Change HAVE_ETHER_HOSTTON to USE_ETHER_HOSTTON
Only define USE_ETHER_HOSTTON if ether_hostton() doesn't dump core.
2001-04-27 02:33:42 +00:00
guy
84018cc541 Patch from Pekka Savola <pekkas@netcore.fi> to get rid of "savestr()"
(which doesn't actually seem to be significantly more efficient than
"strdup()", at least not to the extent that it makes any difference to
"tcpdump"), modified to use the BSD "strdup()", rather than the old
"savestr()", on platforms that lack "strdup()".
2001-01-20 07:22:20 +00:00
guy
e0349b359b Sigh. Not all systems have <netinet/if_ether.h> - for example, at least
some libc5 Linux systems don't - so we have to check whether it exists,
and include it only if it does.
2001-01-17 18:27:36 +00:00
guy
2b0c9995e4 Patch from Pekka Savola <pekkas@netcore.fi> to keep from dragging in our
version of "snprintf()" unless the platform on which we're running lacks
"snprintf()" or "vsnprintf()" - if it lacks one of the "asprintf" family
of routines, we don't drag it in, as we don't use those routines.
2001-01-02 22:47:04 +00:00
itojun
9eb2750139 regen, have HAVE_BPF_DUMP 2000-12-12 09:19:27 +00:00
fenner
c09e6737ee Eliminate __P(). 2000-10-24 00:56:48 +00:00
guy
b72953a314 As we no longer use the system's "slip.h" header file, there's no need
to check for it.
2000-10-09 01:58:53 +00:00
itojun
f4f269aecb regen 2000-10-07 05:59:49 +00:00
itojun
8f5ebe04d0 regen 2000-10-07 05:49:00 +00:00
guy
b67cb8951c We no longer include <netinet/ip.h>, so we don't need to work around
Digital UNIX using "ip_vhl" rather than "ip_v" and "ip_hl" bitfields if
__STDC__ is defined (we have our own "ip.h", and we don't use bitfields
in it).

Get rid of HAVE_INET_ATON, HAVE_INET_NTOP, and HAVE_INET_PTON - we don't
use them; instead, we supply our own versions of "inet_aton()",
"inet_ntop()", and "inet_pton()".  (Defining them in "configure.in"
caused complaints from "autoreconf".)

Check for the "rc5.h" header, as we *do* use HAVE_RC5_H.
2000-10-06 04:19:21 +00:00
fenner
9941ef6f9b Regenerate to reflect changes in revs 1.122 and 1.123 of configure.in 2000-10-04 17:00:20 +00:00
guy
e894092542 Add definitions of Ethernet types from
"linux-includes/netinet/if_ether.h" to "ethertype.h".

Move other stuff used by dissectors from <netinet/if_ether.h> to
"ether.h", along the lines of "fddi.h" and "token.h".

Move ARP declarations from BSD include files to "print-arp.c".

Remove from dissectors includes of <netinet/if_ether.h>, and add
includes of "ethertype.h" and/or "ether.h" as necessary.

Get rid of configuration options that test declarations now made in
"ether.h" or "print-arp.c", as those declarations are now under our
control, not the OS's control.
2000-09-23 08:03:27 +00:00
assar
83d6304aa9 regen 2000-07-11 00:51:53 +00:00
assar
227103abf0 re-generated 2000-07-01 03:40:34 +00:00
itojun
b4176d50a6 regen 2000-05-10 08:22:09 +00:00
assar
fff032bf90 regenerated 2000-04-09 19:16:28 +00:00
assar
bc67cfbfb0 regen 2000-04-01 12:26:12 +00:00
assar
c86d0b1b94 regenerated 2000-03-31 16:57:42 +00:00
itojun
89901793d7 regen 2000-01-25 17:58:32 +00:00
itojun
b9947fc471 split checks for struct addrinfo and NI_xxx.
From: Juergen Schoenwaelder <schoenw@ibr.cs.tu-bs.de>
2000-01-21 04:06:17 +00:00
fenner
6520f4e40f Don't check for T_AAAA in configure; print-domain.c already
does #ifndef #define.
2000-01-20 06:50:56 +00:00
itojun
bba59541c1 regen 2000-01-19 05:34:41 +00:00
itojun
3dd6634fe3 regen 2000-01-19 04:51:23 +00:00
mcr
5c835f2c51 fixed check for libssl to make HAVE_LIBCRYPTO 2000-01-15 01:58:56 +00:00
fenner
34ff77ff43 Unify rcsid[]'s. 2000-01-09 21:34:14 +00:00
assar
e1d18c358d regen 2000-01-08 06:00:59 +00:00
fenner
350630ebbe Never make changes to config.h.in directly; it is automatically generated. 1999-12-14 16:34:41 +00:00