dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

606 Commits

Author SHA1 Message Date
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
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