dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

22 Commits

Author SHA1 Message Date
guy d9b420231a From Paolo Abeni and me: split pcap_open_live() into a "get a pcap_t
handle" routine, an 'activate a pcap_t handle" routine, and some "set
the properties of the pcap_t handle" routines, so that, for example, the
buffer size can be set on a BPF device before the device is bound to an
interface.

Add additional routines to set monitor mode, and make at least an
initial attempt at supporting that on Linux, *BSD, and Mac OS X 10.4 and
10.5.  (Very much "initial" for Linux, which is a twisty little maze of
wireless drivers, many different.)

Have a "timeout" member of the pcap_md structure on all platforms, use
that on Windows instead of the "timeout" member of the pcap_t structure,
and get rid of the "timeout" member of that structure.
2008-04-04 19:37:44 +00:00
guy 988bc0da21 Treat a max_packets value of 0 the same way that we treat a max_packets
value of -1.
2008-02-02 20:50:31 +00:00
guy 1952d35b37 Handle the case where mmap()ped access to the USB buffer is used;
hopefully I'm inferring correctly from the mon_bin_poll() routine that,
even with purely-mmapped access, you can use select() or poll() to wait
for packets to arrive.
2007-12-14 08:02:40 +00:00
guy 25ccbe6e86 Don't use handle->fd before you've set it. 2007-12-14 07:52:32 +00:00
guy 82fa7a2f43 From Paolo Abeni: fix some comments. 2007-12-13 17:28:38 +00:00
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 7b5c683168 From Paolo Abeni: fix copyrights. 2007-09-14 01:55:49 +00:00
guy 42fe978417 Add RCS IDs. 2007-04-01 21:43:55 +00:00
guy 62bf880d23 From Florent Drouin: don't crash if the open of the USB bus directory
fails.
2007-02-01 03:17:20 +00:00
guy 6db2ddb56a From Paolo Abeni:
The attached patch cleans up usb_platform_finddevs(), removing
	the dependency on debugfs.  There are also some other minor
	cleanups in the pcap-usb-linux.c file (unused variables removed
	and indentation fix).
2007-01-17 19:31:00 +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 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 ed2b2e24ef Capitalize "USB". 2006-12-04 23:01:25 +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 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 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 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 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
hannes dc03d28d88 from Paolo Abeni <paolo.abeni@email.com>: USB capturing support on linux 2006-10-04 15:50:26 +00:00