dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

626 Commits

Author SHA1 Message Date
guy 1c186556cd From Jesper Peterson: fix a couple of endianness problems. 2004-01-30 02:23:53 +00:00
guy 7ac8a0a75b DLT_IEEE802_11_RADIO is used for the BSD radio header; add a new
DLT_IEEE802_11_RADIO_AVS for future use with the AVS radio header.

Fix a comment.

Put in reserved LINKTYPE_USERn values corresponding to the reserved
DLT_USERn values.
2004-01-29 10:36:43 +00:00
guy 28d3e917c0 Add stuff from the FreeBSD gencode.c to a comment. 2004-01-29 10:25:19 +00:00
risso 3d28325423 Added a couple of folders to the include path of Windows VisualC project, in order to properly compile libpcap with Dag support 2004-01-28 14:08:33 +00:00
risso cd98f8f525 Added support for Endace Dag cards under Windows 2004-01-28 14:06:20 +00:00
risso d1a175cf76 Added the definition of MOD_MON, required by WinPcap to work properly with some applications 2004-01-27 09:44:14 +00:00
guy 3c677e1380 Update the date. 2004-01-26 02:11:06 +00:00
guy 5d2a9d1922 Regenerate with autoconf 2.57. 2004-01-14 03:01:25 +00:00
guy c6925e0c52 Autoconf 2.5x won't let you modify LIBOBJS directly; use AC_LIBOBJ to
modify it.

AC_LIBOBJ isn't supported by pre-2.50 autoconf; require 2.50.
2004-01-14 03:00:36 +00:00
guy 1924b620dc Don't use a static variable for the accumulated statistics, accumulate
the statistics in "handle->md.stat", so that the statistics are
maintained correctly if more than one pcap_t is in use.
2004-01-14 01:56:10 +00:00
guy 963cacf276 Put in support for raw "link[N:M]" filtering for DOCSIS. 2004-01-14 01:09:03 +00:00
guy fab5c982f2 From Jesper Peterson:
- don't auto-detect HDLC DLT on serial links, use
	  "pcap_set_datalink()" to choose the link-layer header

	- for ATM, allow selecting SUNATM rather than the default
	  RFC1483 with "pcap_set_datalink()"

	- reformat and otherwise clean up the code.
2004-01-05 18:18:54 +00:00
hannes f2101dbb5d patch from Erik de Castro Lopo <erik.de.castro.lopo@sensorynetworks.com>:
In the Linux kernel the packet statistics are zeroed during each retrieval.
  In contrast, on FreeBSD, the packet statistics are retrived using
  ioctl(BIOCGSTATS):

  The patch adds a static variable to pcap_stats_linux() which
  holds a running total of the packet statistics so that the behaviour
  of pcap_stats() on Linux matches the behaviour of FreeBSD.
2004-01-02 11:25:26 +00:00
itojun 1b3a318d83 typo 2003-12-24 09:14:21 +00:00
itojun 08ef9a54d2 some getaddrinfo(3) can return multiple address against SOCK_STREAM (like tcp
adn sctp).  hardcode to tcp for now.  suz@kame
2003-12-24 08:27:04 +00:00
itojun 86c7fc47a5 TRUE/FALSE may not be defined 2003-12-24 08:26:24 +00:00
guy 6d75a65bb6 Give Takashi Yamamoto credit for the code generator and optimizer fixes. 2003-12-22 00:08:44 +00:00
guy ac7d685b85 "selectable_fd" doesn't make sense on Windows; we no longer set it on
Win32 in "savefile.c", so we no longer need to have it in the structure
on Win32.
2003-12-21 22:00:10 +00:00
guy 175b9d75e8 "selectable_fd" doesn't make sense on Windows. 2003-12-21 21:58:50 +00:00
risso 8e2c26124d Define HAVE_SNPRINTF and HAVE_VSNPRINTF under Windows.
A couple of fixes to the Windows project in order to avoid compilation problems.
2003-12-20 10:28:17 +00:00
risso 671d587acd Define the selectable_fd member of struct pcap in Windows. selectable_fd is needed under Windows for offline captures, if it's not defined, savefile.c refuses to compile. 2003-12-20 10:24:52 +00:00
guy a49d95a110 Add some DLT_ values for private use.
Put in a note indicating that new DLT_ values should *not* be allocated
- people should ask tcpdump-workers for values.
2003-12-20 02:38:23 +00:00
guy 619a9fe31b For devices that we have some reason to believe are real live Ethernet
devices, offer DLT_DOCSIS as one of the choices of link-layer type, and
support setting that type as meaning just "set libpcap's notion of the
link-layer type to DLT_DOCSIS" without telling the driver to use
DLT_DOCSIS.
2003-12-18 23:32:31 +00:00
guy 22a42b8996 Put in very minimal support for DLT_LINUX_IRDA filters. 2003-12-18 20:36:11 +00:00
guy 9aa42d6e5c On Mac OS X 10.3, including <sys/socket.h> eventually drags in a header
file that defines MASK, so when compiling the lexical analyzer, if INET6
is defined you get a redefinition warning.  Use NETMASK rather than MASK
for the token "mask".
2003-12-16 05:19:56 +00:00
guy 6d80740934 Add some missing entries, and fix an entry. 2003-12-15 02:04:14 +00:00
guy be484d29f8 Get rid of a trailing blank line from the previous checkin. 2003-12-15 01:53:39 +00:00
guy fccf57ae3d Add some missing files.
Sort the files/directories.
2003-12-15 01:52:20 +00:00
guy fcadc89577 From Albert Chin <china@thewrittenword.com>: on platforms that lack
"snprintf()", include one in libpcap with the name "pcap_snprintf()", so
applications don't have to supply their own "snprintf()" on those
platforms in order to use libpcap.
2003-12-15 01:35:03 +00:00
guy 026542c235 From Jesper Peterson: updates to handle future DAG API releases. 2003-12-10 09:30:57 +00:00
guy 808a1fd8e1 Reserve two DLT_ values for IBM's use. 2003-12-03 21:34:21 +00:00
guy 4f9b1a6238 Note that "pcap_breakloop()" won't break another thread out of a
blocking call to get packets.
2003-12-01 02:43:45 +00:00
guy 9c1b709295 Note that "ld -shared" is a GCCism. 2003-11-30 22:46:13 +00:00
guy 2fc0876600 Note that, for 32-bit PA-RISC, the shared library suffix is ".sl". 2003-11-30 22:42:25 +00:00
mcr 75ce5b9341 patches to make building RPMs and shared libraries easier. 2003-11-30 04:45:02 +00:00
guy b7a5a71b3a From Gisle Vanem: enter the packet-processing loop even if no packets
were read, so we check "p->break_loop"; that way, we can break out of
the loop even if we get no packets (because of a timeout).

Also, check "p->break_loop" before reading packets from the driver.
2003-11-30 02:31:04 +00:00
guy 42af591c50 When installing a filter:
first check whether BIOCVERSION works;

	then, if so, check whether the version is OK for us;

	then, if so, try to install the filter - if that succeeds, free
	up any userland filter we had installed, if any, and filter in
	the kernel, otherwise fail;

	otherwise, if we couldn't get the version or the version check
	failed, install a userland filter.

That way, we don't install kernel filters unless we know the kernel's
BPF interpreter is OK for us (rather than checking the version *after*
we've already installed the filter), and don't have to worry about that
filter being in the kernel (possibly with an inappropriate interpreter)
if we're filtering in userland.

Clean up the "version isn't OK" message (put in a newline at the end,
and put in "tcpdump:" at the beginning).
2003-11-22 00:32:25 +00:00
guy 331c11bf5b We use userland filters if the filter contains backward branches (for
protochain); that means we need to do userland filtering, which we
hadn't been doing.
2003-11-22 00:06:05 +00:00
guy dc6aad21ba If the kernel supports an older version of BPF than we do, install the
userland filter before setting the "filtering is being done in the
kernel" flag to 0, and note in a comment that we've already handed the
BPF program to the older BPF interpreter in the kernel.
2003-11-21 23:28:27 +00:00
guy c98ffbcabf Add a "pcap_get_selectable_fd()" API to get an FD on which you can do a
"select()" or "poll()" - or -1 if that won't work.
2003-11-21 10:19:33 +00:00
guy 2c618b93a0 Add "getnonblock" and "setnonblock" operations, and set the function
pointers appropriately, rather than using #ifdefs and run-time checks.

Get rid of declaration of non-existent "pcap_set_datalink_platform()"
routine.
2003-11-20 02:02:38 +00:00
guy 028bb1b31d From Koryn Grant <koryn@endace.com> - DAG support enhancements and fixes:
Added support for nonblocking operation.

	Added support for processing more than a single packet in
	pcap_dispatch().

	Fixed bug in loss counter code.

	Improved portability of loss counter code (e.g. use UINT_MAX
	instead of 0xffff).

	Removed unused local variables.

	Added required headers (ctype.h, limits.h, unistd.h,
	netinet/in.h).

	Changed semantics to match those of standard pcap on linux.
		- packets rejected by the filter are not counted.
2003-11-20 01:21:25 +00:00
guy d7bc98d08b Typo fix from Brian Ginsbach. 2003-11-19 18:14:18 +00:00
guy ba73faeef3 Add "pcap_datalink_val_to_description()", which returns, for a DLT_
type, a short description intended for humans.

Fix up some man page typoes.
2003-11-18 22:14:24 +00:00
guy 086bf17b56 Use Jean Tourrilhes' HP Labs address. 2003-11-18 21:53:03 +00:00
guy ecaf2b3929 Update the date.
Add some periods to the ends of long DLT_ descriptions.

Add some missing DLT_ values.
2003-11-18 21:51:11 +00:00
guy a08248f680 From Jean Tourrilhes <jean2@sourceforge.net>: IrDA capture support for
Linux.
2003-11-18 21:06:50 +00:00
guy c95d2aac09 Latest config.guess and config.sub from
http://savannah.gnu.org/projects/config/
2003-11-18 06:30:50 +00:00
guy 0b36742e72 From Brian Ginsbach: add the Cray NV1 CPU to the list of CPUs that don't
support unaligned accesses.
2003-11-16 10:12:47 +00:00
guy 0eac66d65e Add a "pcap_dump_file()" API to get the "FILE *" corresponding to a
"pcap_dumper_t".
2003-11-16 10:07:35 +00:00