dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

1005 Commits

Author SHA1 Message Date
guy 22f1fd3407 From Paolo Abeni: fix a printf. 2007-01-14 21:33:55 +00:00
guy 349ffb7d20 For wltN devices, open the corresponding enN device, so that, for
example, if you don't have permission to open BPF devices, you don't end
up with a list of devices that includes the wltN devices but nothing
else.
2006-12-30 09:54:57 +00:00
guy 660cb8b1ce On Mac OS X, assume any device whose name begins with "wlt" can be
captured on, without trying to open it - if "enN" is an AirPort device,
opening "wltN" is like opening "enN", except that the device is put into
monitor mode, which, for many devices, causes the device to deassociate
from the network with which it's associated.
2006-12-29 19:33:36 +00:00
guy 7589e0abc3 From Florent Drouin: add support for filtering on MTP2 frame types. 2006-12-21 19:44:06 +00:00
guy 7bf28e7fd2 Indicate which headers go with which DLT_ values. 2006-12-21 18:56:21 +00:00
guy 31d7c82a44 Use DLT_USB_LINUX as the link-layer type, as we now supply the Linux
header.
2006-12-20 08:21:10 +00:00
guy eda5020549 Handle DLT_USB_LINUX the same way we handle DLT_USB (i.e., punt and only
support link[N:M]).
2006-12-20 08:20:27 +00:00
guy 1a2be25931 Add an item to work with autoconf 2.60. 2006-12-20 08:19:37 +00:00
guy d959f6403d From Paolo Abeni: add support for the binary USB sniffing interface in
Linux.  The USB sniffing code for Linux now supplies a per-packet header
based on the one supplied by the Linux binary sniffing interface, so we
add a new DLT_ value and use that.

Fix his e-mail address, and add him to the credits.
2006-12-20 03:30:32 +00:00
guy 8a391f392c From Paolo Abeni: don't treate an EAFNOSUPPORT error when trying to open
a Bluetooth socket as an error - it just means there's no Bluetooth
support in the kernel, and thus there are no Bluetooth devices.

Clean up error messages a bit, including indications that these are from
the Bluetooth code.
2006-12-05 20:08:58 +00:00
guy 6915e7e906 Capitalize "Bluetooth". 2006-12-04 23:03:33 +00:00
guy ed2b2e24ef Capitalize "USB". 2006-12-04 23:01:25 +00:00
guy 78ca8b4d49 Add a LINKTYPE_ value corresponding to DLT_IEEE802_16_MAC_CPS. 2006-11-27 18:36:57 +00:00
guy fb91ad681f DLT for IEEE 802.16 (WiMAX) MAC Common Part Sublayer; requested by Maria
Cruz (<cruz_petagay@bah.com>).
2006-11-27 18:04:29 +00:00
guy 24f60579bc From Paolo Abeni:
The attached patch fix an off by one in current usb sniffing
	code.  It also substitute the kernel-provided timestamp with
	gettimeofday.  The kernel provided timestamp use 32 bits to
	represent a struct timeval (8 bits for tv_sec and 24 for
	tv_usec), so it's content is quite misleading.
2006-10-15 18:20:26 +00:00
guy 455aff8ba9 Move the Linux Bluetooth and USB declarations to a header file.
Clean up some comments.

Protect all references to the USB stuff from the common Linux code with
PCAP_SUPPORT_USB, just as references to the Bluetooth code are protected
with PCAP_SUPPORT_BT.
2006-10-13 17:46:45 +00:00
guy 50ce2663e8 From Paolo Abeni: Bluetooth support. 2006-10-13 17:34:53 +00:00
guy 6fa38c09d7 From Paolo Abeni:
avoid lookupnet to mess with ioctl for usb interface
	and simply return an 0.0.0.0 net and a 0.0.0.0 netmask.
2006-10-13 09:06:05 +00:00
guy 8c2a49b75c DLT_ value added for the Bluetooth HCI UART transport layer for Paolo
Abeni.

Added DLT/DLT name table mappings and linktype values and DLT/linktype
mappings for USB and for the Bluetooth NCI UART transport layer.

Fix up indentation.
2006-10-13 08:46:23 +00:00
guy 5ec4105685 Squelch another valgrind complaint. 2006-10-12 17:26:06 +00:00
guy 08f2f1703b From Paolo Abeni:
The attached patch fix the parsing of setup data fields in current
implementation of usb_read_data.

Currently the "setup header is present" field is not marked so the
relevant fields are ignored from caller.

The patch contains also a little indentation fix, always in the same
function.
2006-10-12 08:04:08 +00:00
guy 33c151f1e9 Clarify that the structure that pcap_stats() fills in is pointed to by
the second argument, in the hopes that people will be less likely to
expect the routine to do something other than crash if passed a null
pointer as the second argument.
2006-10-12 07:59:54 +00:00
guy efab3781c8 From Paolo Abeni: the USB setup header is defined in the USB
specification with a specific layout; use that layout.
2006-10-11 09:22:27 +00:00
guy de2b502289 In "add_or_find_if()", first check whether we already have an entry in
the list for the interface, and try to open the interface only if we
don't already have an interface, so if you have multiple addresses for
an interface, you don't open the interface for each of them.  (See
Wireshark bug 1151:

	http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1151

for the reason to do this; pcap_findalldevs() spent a *lot* of time and
energy opening en0 over and over again for all 64K-128K(!) addresses.)
2006-10-10 07:09:14 +00:00
guy a631fe8a83 From Paolo Abeni: fix a compile problem. 2006-10-05 17:51:01 +00:00
guy 748adf9a88 From Paolo Abeni - fix a couple of problems:
- the snaplen parameter is just ignored.
	- the raw data received from usb port is partially corrupted.
2006-10-05 16:22:52 +00:00
guy ef32ac1186 From Paolo Abeni: add multiple-include protection. 2006-10-05 10:23:35 +00:00
guy 6cd3f4102b Put the public libpcap headers into a pcap subdirectory in both the
source directory and the target include directory, and have include
files at the top-level directory to include those headers, for backwards
compatibility.

Update the FILES and INSTALL.txt files to reflect current reality.
2006-10-05 06:38:07 +00:00
guy c6424266c2 No, that's not the right fix for the Linux kernel interface; the right
fix is to discard unread packets when changing the filter, as that fixes
not only the problem with the *first* filter you set, it fixes the
problem you get when *changing* the filter.  That fix is now in the code.
2006-10-04 18:16:20 +00:00
guy 6cbfdcc80d Add a cautionary note to OS vendors here as well. 2006-10-04 18:13:32 +00:00
guy 084bcf12ea Put the public libpcap headers into a pcap subdirectory in both the
source directory and the target include directory, and have include
files at the top-level directory to include those headers, for backwards
compatibility.

Update the FILES and INSTALL.txt files to reflect current reality.
2006-10-04 18:09:21 +00:00
guy 74e5b539b9 From Paolo Abeni: add USB stuff. 2006-10-04 16:50:33 +00:00
guy e364899527 Handle DLT_USB. 2006-10-04 16:47:46 +00:00
guy b0b2b0de78 Regenerate. 2006-10-04 16:47:12 +00:00
guy ec67f552e1 Clean up comment. 2006-10-04 16:46:31 +00:00
hannes dc03d28d88 from Paolo Abeni <paolo.abeni@email.com>: USB capturing support on linux 2006-10-04 15:50:26 +00:00
guy 788c73d4bd Add a link-layer type for USB. 2006-10-03 00:11:46 +00:00
guy f65831091d Squelch a valgrind warning. 2006-09-28 07:34:36 +00:00
guy 53bccbd2d7 From Stephen Donnelly: add support for new DAG ERF types. 2006-09-25 18:18:18 +00:00
guy 09b4db222c Clean up indentation.
From Stephen Donnelly: add DLT_MTP2 to the table of DLT choices.
2006-09-25 18:16:55 +00:00
guy c903ddd8f5 From Stephen Donnelly:
when building a shared library, build with "-fPIC" on Linux, to
	support x86_64;

	link with "$(CC) -shared" rather than "ld -shared" when building
	a ".so" shared library (as would be done with ELF systems that
	use GCC);

	add an explicit "-ldag" when building the shared library, so the
	DAG library dependency is explicit.
2006-09-25 18:04:40 +00:00
guy 753370a49f Indicate *which* ioctl failed. 2006-09-18 17:32:30 +00:00
guy 750519deb0 Add off_ll to off_nl in cases where that's required and that we missed
in earlier checkins, now that off_nl no longer includes off_ll.

Add in more comments explaining what we're doing.
2006-09-13 07:35:42 +00:00
guy c547cb1649 Make off_linktype, off_nl, and off_nl_nosnap *not* include off_ll.
Make gen_load_llrel() add in off_ll if there isn't a variable-length
radio header, so the offset passed to it is always relative to the
beginning of the link-layer header, not the beginning of the packet.
Don't add in off_ll when calling it.

Those changes centralize the addition of off_ll, so it's only done in
one place (rather than twice, where it was done before, meaning that the
offsets were wrong for the Prism and AVS headers as they had 2*off_ll
rather than just off_ll, as off_ll was added twice).
2006-09-13 06:54:15 +00:00
loris cbfba20e99 Added support for DLT_IEEE802_11 and DLT_IEEE802_11_RADIO link layers in windows 2006-08-08 16:39:08 +00:00
gianluca 3f0f487a1e Added a new DLT and LINKTYPE value for ARINC 653 Interpartition
Communication messages.
2006-07-27 21:02:57 +00:00
gianluca 73aaf3785b Fixed a typo in a DLT value: it should start with DLT_ and not LINKTYPE_ 2006-07-25 21:34:43 +00:00
gianluca 303bc7bd43 Redefined DLT_CAN20B and LINKTYPE_CAN20B as #190 (as this is the
right value for CAN).
Added the definition of DLT_A429 and LINKTYPE_A429 as #184.
Added these two link layers in the global array dlt_choices.
2006-07-19 20:51:50 +00:00
guy d91be5b8af C89 says that the result of shifting an N-bit value by >= N bits is
undefined; we want it to be zero, so we explicitly check for a 32-bit
shift count and clear the netmask in that case.
2006-05-28 20:12:28 +00:00
gianluca 520a3ea559 Added a new DLT and LINKTYPE value for CAN v2.0B frames. 2006-05-20 00:23:45 +00:00