dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

600 Commits

Author SHA1 Message Date
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
guy 52c71acb69 From Brian Ginsbach <ginsbach@cray.com>: add UNICOS/mp to the list of
OSes that declare "ether_hostton()" themselves.
2003-11-16 09:48:25 +00:00
guy 437654de85 From Brian Ginsbach: add the Cray NV1 CPU to the list of CPUs that don't
support unaligned accesses.
2003-11-16 09:45:31 +00:00
guy 034610ee5b Add "/D _U_=" to make _U_ expand to nothing. 2003-11-15 23:37:07 +00:00
guy 30e89f192a Add _U_ to "rcsid[]" definitions, to eliminate "unused variable"
warnings from newer versions of GCC.
2003-11-15 23:23:57 +00:00
guy f387010dab Based on whether we have "__attribute__", define _U_ either as
"__attribute__((unused))" or as "".
2003-11-15 22:51:51 +00:00
mcr 8dd18b1fa9 removed people who shouldn't be bugged since they aren't
actively committing code now.
2003-11-13 03:15:20 +00:00
mcr 030044cebf CHANGES files for 0.8. 2003-11-13 01:59:15 +00:00
mcr 907d025e9a update CVS instructions to 0.8. 2003-11-13 01:57:10 +00:00
guy 84217ae06c Add a DLT_ value for DOCSIS frames.
Note in "pcap-bpf.h" that DLT_ values 139 through 142 are reserved for
SS7.
2003-11-13 01:35:47 +00:00
guy d8ccb0422b From Brian Ginsbach <ginsbach@cray.com>:
correctly handle loopback devices on IRIX and UNICOS/mp (tweak
	the packet header so that it's a 4-byte AF_ value rather than
	the 2-byte AF_ value supplied on snoop sockets);

	add support for IP-over-FC and pseudo-link devices on UNICOS/mp.
2003-11-12 23:15:00 +00:00
guy 4a0eb92022 From Jesper Peterson: fix a cut-and-pasteo (the Linux libpcap code calls
its pcap_t pointer "handle", not "p", unlike most other libpcap code).
2003-11-05 04:25:24 +00:00
guy 849c3c660e Add in some notes warning people about things they must do if using
"pcap_breakloop()".  (tcpdump had to be fixed to do both of them.)
2003-11-04 07:37:02 +00:00
guy 991d444f71 Add a "pcap_breakloop()" API to break out of the loop in
"pcap_dispatch()" and "pcap_loop()".
2003-11-04 07:05:32 +00:00
guy 4246a40e00 From a Debian patch by Eric Anderson <anderse@hpl.hp.com>, give more
detail if we get a premature EOF when reading packet data.

Also, do the same check when reading the packet *header*, and check for
I/O errors as well.
2003-11-04 01:49:07 +00:00
guy b30cb92144 Sort the link-layer types by value, and add some missing ones. 2003-10-31 21:49:18 +00:00
guy f580b78bae Handle DG/UX's wacky tcpdump format (major version 543, minor version 0,
caplen and len fields in the pre-2.3 order).

Move the version number checking to the open-file code; store a
tri-state (definitely swapped, definitely not swapped, maybe swapped)
value in the savefile information and use that when processing packets.
2003-10-24 23:55:06 +00:00
guy 3b68061cf7 If "--with-dag" isn't specified, assume they want it if it's present and
not otherwise; in particular, don't quit with an error if we're on a
platform that doesn't support the DAG software.
2003-10-14 08:48:34 +00:00
guy 67ccc964bf If "--with-dag" isn't specified, assume they want it if it's present and
not otherwise; in particular, don't quit with an error if we're on a
platform that doesn't support the DAG software.
2003-10-14 07:46:57 +00:00
guy 7b3d3c4ba0 Describe the return value of "pcap_findalldevs()". 2003-10-10 00:27:45 +00:00
guy 00f79e19a4 From Krzysztof Halasa <khc@pm.waw.pl>:
support Linux Frame Relay ARPHRD_FRAD as Frame Relay with an FR
	header;

	support Linux Frame Relay ARPHRD_DLCI in cooked mode;

	current Linux kernels use the name ARPHRD_CISCO for Cisco HDLC
	(513).
2003-10-06 07:04:55 +00:00
guy b583959753 From Jesper Peterson:
Fix the pcap-dag atexit() handler for non-execing child
	processes.  Previously a fork()/exit() would stop the packet
	capture (doh!).

	Add a couple of optimizations.
2003-10-02 07:07:49 +00:00
guy ec72fd24fe Get rid of an unused variable. 2003-09-25 22:22:25 +00:00
risso 18c85291c8 Avoids a compiler warning in case _WINSOCKAPI_ was already defined (someone defined _WINSOCKAPI_ when including 'windows.h', in order * to prevent it from including 'winsock.h') 2003-09-25 15:59:42 +00:00
risso c9f7277b0d pcap_lookupdev() converts the adapter list to unicode for backward compatibility. 2003-09-22 11:51:37 +00:00
risso 9cc72b7f06 Updated pcap_open_live() since PacketOpenAdapter() now requires an ascii string under WinNTx as well. 2003-09-22 11:48:40 +00:00
risso 9386c7125c add_addr_to_list() now supports the IPv6 addresses returned by WinPcap inside sockaddr_storage structures.
Simplified pcap_findalldevs() since PacketGetAdapterNames() now returns ascii strings under WinNTx as well.
2003-09-22 11:45:58 +00:00