dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

1246 Commits

Author SHA1 Message Date
guy baa8f1a126 From Kris Katterjohn, with some additional changes from Paolo Abeni: fix
some sscanf() calls:

	The first change involves a sscanf() that has '%n' in the format
	string, which shouldn't be checked for in the return value
	(stored in "ntok").  This is done correctly elsewhere in the code
	(and even commented on) such that the return value is checked for
	everything but the %n modifier.

	And a few lines after this, a sscanf() is done for '%d' and the
	return value is stored in "ret".  However, the same exact line
	from the above mishap is used here, not even checking the right
	variable or number of conversions! It checks "ntok" for 2 when
	it should check "ret" for 1.
2007-11-30 19:53:06 +00:00
guy 8f6e068349 From Gregor Maier: pcap_open_dead() doesn't take an errbuf argument (the
only reason why it would fail would be if a malloc fails), so don't list
it as one of the functions that does.
2007-11-29 18:27:27 +00:00
gianluca 8ab2187e50 Fixed a bug when generating wireless filters in the form "link src host ...". The
source address was not retrieved properly.
2007-11-26 21:17:49 +00:00
guy 5bf51391d4 From Kris Katterjohn: when building a SITA version of libpcap, don't
include dead code.
2007-11-18 04:37:27 +00:00
guy 740fb4355d Support OpenBSD's "addr1", "addr2", "addr3", and "addr4" link-layer
address types for 802.11.

Support the OpenBSD names for some of the 802.11 frame types.

Support OpenBSD's "dir" keyword for 802.11 frame directions.
2007-11-18 02:03:52 +00:00
guy 70727eb8d2 Add some additional PF actions, from OpenBSD - but do so only if they're
defined on the platform on which we're compiling.
2007-11-14 00:54:35 +00:00
gianluca 18f99473ee Under MingW/cygwin, we need to use ddk/ndis.h instead of ntddndis.h. 2007-11-13 21:55:51 +00:00
guy 4148e8dfdc Update a comment. 2007-11-10 21:53:05 +00:00
guy da54d62ffd From Stephen Donnelly:
Changing the behaviour when the ERF type is unknown, and for ERF
	TYPE_PAD.

	Unknown ERF types can always be captured as DLT_ERF.  TYPE_PAD
	records are dropped silently.
2007-11-09 00:55:53 +00:00
guy efde9ae2b8 Handle the padding stuck in between the 802.11 header and the 802.11
payload by Atheros cards; check the radiotap header to see whether that
padding is there.
2007-11-08 01:50:26 +00:00
guy 7f5c751098 Do the DLT_PPI per-packet DLT check before computing any of the
variable-length offsets.

Update some routine names and comments.
2007-11-07 19:32:34 +00:00
guy a0f3381871 When we add the length of the QoS field to the offset of the MAC
payload, the existing value of that offset is *not* in the X register -
the offset of the MAC header is in the X register.  Load the register
containing the offset of the MAC payload, add 2 to it, and store the
result back in that register.
2007-11-06 19:09:10 +00:00
gianluca c9c0634709 [from Gisle Vanem]
Fixed a typo in pcap_setmintocopy().
2007-11-06 16:20:53 +00:00
guy 309c0ad349 Fix handling of ATM LANE for DLT_SUNATM. 2007-11-05 23:02:54 +00:00
guy 489f459bb8 Based on changes from Gianluca Varenni, partially handle variable-length
802.11 headers - we only handle the QoS bit and fields, for now.

Clean up various other things either in the process of doing that or as
a requirement for doing that.
2007-11-05 21:52:14 +00:00
guy 24bc44b0f2 From Stephen Donnelly:
support ERF extension headers;

	collect the ifdefs for different ERF types into a header
	to improve readability;

	add in a couple of new types.
2007-11-05 21:45:07 +00:00
guy f93ade7fde Don't crash if somebody tries link-layer type filtering on various
link-layer types.
2007-11-05 18:37:48 +00:00
guy 0276d343cb Fix the handling of IPX in VLAN encapsulation so that the SNAP header is
tested after all the VLAN headers, rather than after the initial MAC
header.
2007-11-04 22:29:02 +00:00
guy 762a5cc8a6 Fix the handling of AppleTalk in VLAN encapsulation (not that you're
likely to see that, but...) so that the SNAP header is tested after all
the VLAN headers, rather than after the initial MAC header.
2007-11-04 22:15:48 +00:00
guy 877d5fc4eb From Stephen Donnelly:
Clean up the configure output for the dag libraries a bit.

	Add Florent Drouin's changes for DLT_ERF.

	Some other DAG changes.
2007-10-30 10:16:45 +00:00
guy 149057f024 Re-initialize the table of used registers, and the current register,
before compiling an expression; pcap_compile() can be called more than
once, and some registers can now be allocated and not freed in the
process of code generation (for example, the register allocated to hold
the length of a radiotap header, which can't be freed until we're
finished generating all the code).
2007-10-26 00:44:56 +00:00
guy 69fd6e08ab Use VCI_ as a prefix for all the VCI values, rather than just prefixing
PPC with ATM_.
2007-10-22 19:28:58 +00:00
guy fc6fdb7bee Add DLT_LAPD, for raw LAPD with no pseudo-header, as per Varuna De
Silva.
2007-10-21 08:39:27 +00:00
guy bb9a52d915 SITA ACN support, from Fulko Hew. 2007-10-20 01:15:14 +00:00
guy 3a0937cfba On Win32, have pcap_setbuff, pcap_setmode, and pcap_setmintocopy ops, so
add-on capture mechanisms can supply their own code for that.
2007-10-17 18:52:41 +00:00
guy 40377847a5 In some Solaris distributions, gcc is in /usr/sfw/bin. Look there for
GCC, too.
2007-10-16 11:35:53 +00:00
guy 9dc28aea3e Add DLT_AX25_KISS, for AX.25 with a KISS header, as per discussions in
the tcpdump-workers mailing list in early April, 2007.

Add Richard Stearn's support for DLT_AX25_KISS.
2007-10-05 01:40:14 +00:00
guy 7c16b1e9f1 Move a comment that applies to both branches of an #ifdef outside the
#ifdef.

Clean up white space a bit.
2007-10-05 01:03:53 +00:00
guy bdf36c1e7e From Luis Martin Garcia: fix the "last updated" date of the man page. 2007-10-04 23:11:36 +00:00
guy 05e4b27b14 From Stephen Donnelly:
* Improved error checking in dag_read().
     * More efficient dag_platform_finddevs().
     * Support for new DAG API function dag_get_stream_erf_types().
2007-10-04 23:06:25 +00:00
guy 4877082ac7 From Stephen Donnelly: fix a missing-parenthesis typo. 2007-10-04 23:03:02 +00:00
guy afbb1ce722 Based on work from Florent Drouin, split the 32-bit link-layer type
field in a capture file into:

	a 16-bit link-layer type field (it's 16 bits in pcap-NG, and
	that'll probably be enough for the foreseeable future);

	a 10-bit "class" field, indicating the group of link-layer type
	values to which the link-layer type belongs - class 0 is for
	regular DLT_ values, and class 0x224 grandfathers in the NetBSD
	"raw address family" link-layer types;

	a 6-bit "extension" field, storing information about the
	capture, such an indication of whether the packets include an
	FCS and, if so, how many bytes of FCS are present.
2007-09-29 19:33:29 +00:00
guy 29dc375264 Clean up indentation. 2007-09-29 00:48:05 +00:00
guy def1775664 We assign the result of sizeof to sf.hdrsize; make it a size_t. 2007-09-29 00:29:14 +00:00
gianluca 0cd5315734 Added the prototype for inet_aton(). 2007-09-27 18:02:20 +00:00
gianluca 132dd9a83b Added the prototype for ffs() when using the VC compiler. 2007-09-27 18:01:51 +00:00
gianluca cb7780ffe0 Added an alternate definition for SWAPLL for Visual Studio 6. VC6 does not
support the LL suffix for 64bit integers.
2007-09-27 18:01:13 +00:00
gianluca 03c3f2e979 Added the definition of strdup as _strdup under VC6. 2007-09-27 17:59:45 +00:00
gianluca 7cbdf2a3a2 Added an explicit int-->size_t cast to avoid a VC compilation warning. 2007-09-27 17:59:07 +00:00
gianluca 9ba070ab93 Fixed some VC6 compilation warnings (missing return clauses that are never
reached).
2007-09-27 17:58:34 +00:00
gianluca f999210021 Added the definition of int64_t 2007-09-27 17:55:55 +00:00
guy 231404ec64 Add pcap_platform_finddevs() to WinPcap. 2007-09-25 20:34:36 +00:00
guy 92aa745a42 Include <pcap/pcap.h>, as that's now where we're putting it. 2007-09-24 23:26:12 +00:00
guy 6b492f4765 <pcap.h> does its own 'extern "C"'ification; move it outside our 'extern
"C"'ification, just in case some libpcap/WinPcap add-on includes C++
code.
2007-09-24 23:24:02 +00:00
guy e4238ca93c From Paolo Abeni:
Fix the copyright notice.

	Use the new DLT_BLUETOOTH_HCI_H4_WITH_PHDR DLT, and add a
	direction indication.

	Now that we have a direction indication, support
	pcap_setdirection().

Update FILES and INSTALL.txt appropriately, and fix some problems in
INSTALL.txt.
2007-09-22 02:10:17 +00:00
guy 59a4fbc8f7 Add an RCS ID. 2007-09-22 02:06:08 +00:00
gianluca 1cd243c972 Do not compile gai_strerrorA on Windows under MingW. gai_strerror is already
available on MingW, it's only missing from Cygwin.
2007-09-19 16:19:20 +00:00
guy fe7433245e New DLT for Bluetooth H:4 with pseudo-header giving direction.
Add support for additional link types to gencode.c, so we at least
support "link[N:M]" and an empty expression.

Sort the DLT_CHOICE values in order by the DLT_ value, add missing ones,
and fix some existing descriptions.
2007-09-19 02:40:34 +00:00
guy 7b5c683168 From Paolo Abeni: fix copyrights. 2007-09-14 01:55:49 +00:00
guy bc365a5db9 From RCB-ISIS on SourceForge: handle LynxOS, which has AF_PACKET but
puts the if_packet.h header in a different directory from Linux.
2007-09-14 00:44:54 +00:00