dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

15 Commits

Author SHA1 Message Date
guy a8e63c60ed Get rid of declaration of non-existent routine. 2008-07-01 07:05:54 +00:00
guy 30b39d84b7 Fix typoes (sigh, using both "p" and "handle" for the pcap_t pointer in
different modules can lead to confusion).
2008-04-14 21:06:09 +00:00
guy 2527d1ac88 Turn close_op into cleanup_op; the routine that handles it can also be
used to clean up after a failed pcap_activate() call.  Convert the
existing close_op routines to cleanup_op routines, and use them to clean
up; rename pcap_close_common() to pcap_cleanup_live_common(), and use it
directly if there's no platform-dependent cleanup needed.  That means we
don't have to write the same cleanup code twice (and possibly forget
stuff in the version done on a failed pcap_activate() call).

Have the cleanup routines do whatever is necessary to indicate that
cleanup has been done, and not do any particular cleaning up if it's
already been done (i.e., don't free something if the pointer to it is
null and null out the pointer once it's been freed, don't close an FD if
it's -1 and set it to -1 once it's been closed, etc.).

For device types/platforms where we don't support monitor mode, check
for it and return PCAP_ERROR_RFMON_NOTSUP - but do so after we've
checked whether we can open the device, so we return "no such device" or
"permission denied" rather than "that device doesn't support monitor
mode" if we can't open the device in the first place.

Fix a comment.
2008-04-14 20:40:58 +00:00
guy b95b96d6da For Linux non-mmapped captures, Linux bluetooth captures, and Irix
captures, set the socket buffer size to the value specified by
pcap_set_buffer_size() if a value was set.

Clean up if memory buffer allocation fails on Linux.
2008-04-07 03:57:32 +00:00
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 b9ec4e5223 Use %zu to print something with the type size_t - I think most if not
all versions of glibc support it, and it handles both 32-bit and 64-bit
size_t.
2008-02-14 23:27:42 +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 266b20f3d4 Fix a message to speak of Bluetooth rather than USB. 2007-08-18 20:54:52 +00:00
guy 42fe978417 Add RCS IDs. 2007-04-01 21:43:55 +00:00
guy 22f1fd3407 From Paolo Abeni: fix a printf. 2007-01-14 21:33:55 +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 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