| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In the 2.6.32.4 kernel, struct sockaddr_hci has no hci_channel member.
In the 3.0.4 kernel, struct sockaddr_hci has an hci_channel member, and
it has to get set in order for binds of AF_BLUETOOTH/BTPROTO_HCI sockets
to work.
Cope with this API breakage by checking whether struct sockaddr_hci has
an hci_channel member and, if it does, set it to HCI_CHANNEL_RAW.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Have a table of routines to do pcap_create() for devices that aren't
regular network interfaces. Try each of those in succession until one
says "it's mine" (whether it succeeds or fails); if none do, do a
pcap_create() for a regular interface.
Have those routines do more stringent tests of the name - don't just
accept any name that has a particular substring anywhere in it. That
reduces the likelihood of a false match (as happened with the CANbus
module when somebody renamed their Ethernet interface "canopy").
Have the table also include routines for pcap_findalldevs().
|
|
|
|
|
|
|
|
|
| |
This makes the check for a negative value valid.
Thanks to Michal Sekletar for catching this.
While we're at it, don't use the numerical value of errno in error
messages.
|
|
|
|
|
|
|
|
|
| |
The "set the buffer size" code check for a zero, rather than a non-zero,
opt.buffer_size when deciding whether to explicitly set the buffer size.
Fix a typo in a comment.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
|
|
|
|
|
|
|
|
|
|
| |
Do the standard userland filtering on USB and Bluetooth captures, rather
than returning "success" when the filter is installed without doing
anything with the filter.
Also, squelch some "dereferencing type-punned pointer will break
strict-aliasing rules" warnings in pcap-bt-linux.c, by using memcpy
rather than pointer-casting.
|
| |
|
|
|
|
| |
different modules can lead to confusion).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
all versions of glibc support it, and it handles both 32-bit and 64-bit
size_t.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|