dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

1497 Commits

Author SHA1 Message Date
Guy Harris ce38b0cd9b If the specified time stamp type isn't supported, treat that as a warning. 2010-08-22 19:09:50 -07:00
Guy Harris fa4435e65c Add support for setting the time stamp type for a capture.
Based on a patch from Scott Mcmillan <scott.a.mcmillan@intel.com>.

(Second part of the commit.)
2010-08-22 17:36:27 -07:00
Guy Harris 749726f92c Give Scott McMillan credit for the initial time stamp patch. 2010-08-22 17:09:04 -07:00
Guy Harris 951f99bbbd Add support for setting the time stamp type for a capture.
Based on a patch from Scott Mcmillan <scott.a.mcmillan@intel.com>.
2010-08-22 16:58:53 -07:00
Guy Harris 0ba94d1cfa Consistently use "link-layer header type".
Use "link-layer header type" as the term for DLT_ values; it doesn't
necessarily correspond to the actual data link type of the device
(802.11 devices, for example, can supply Ethernet headers).
2010-08-22 15:26:35 -07:00
Guy Harris b9546dd6de Add some additional SEE ALSO references.
In the pcap_list_datalinks() man page, refer to the
pcap_datalink_val_to_name() man page, as the routines described there
can be used to print out names and descriptive text for the values
returned by pcap_list_datalinks().

In the pcap_set_datalink() man page, refer to the
pcap_datalink_name_to_val() man page, as pcap_datalink_name_to_val() can
be used to convert a name for a link-layer header type into a value to
be handed to pcap_set_datalink().

Update the change date on some man pages while we're at it.
2010-08-22 15:08:20 -07:00
Guy Harris 57935bef89 Combine documentation for allocate and free routines.
Pull the documentation for pcap_freealldevs() into the
pcap_findalldevs() man page, and pull the documentation for
pcap_free_datalinks() into the pcap_list_datalinks() man page.
2010-08-22 14:54:10 -07:00
Guy Harris bc8209b71e Fix handling of close of zerocopy BPF; based on a patch from Christian Peron. 2010-08-20 12:17:31 -07:00
Guy Harris 3c13ac2cc3 Fix previous checkin. 2010-08-06 14:58:16 -07:00
Guy Harris f41d444406 Mention the 802.15.4 changes. 2010-08-06 14:45:14 -07:00
Jon Smirl 41bfc71e21 Use DLT_IEEE802_15_4_NOFCS for 802.15.4 interfaces.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
2010-08-06 14:43:05 -07:00
Guy Harris 6cb3ad9219 New DLT_IEEE802_15_4_NOFCS for 802.15.4 without FCS.
Requested by Jon Smirl.
2010-08-06 14:12:16 -07:00
Guy Harris e04170f756 List the fixes we've checked in so far. 2010-07-20 11:24:25 -07:00
Guy Harris 9e7bc0881a Oops - should convert the LINKTYPE_ value in pcap-ng Interface
Description Blocks to a DLT_ value in the pcap_t, as applications expect
pcap_linktype() to return a DLT_ value.
2010-07-20 10:19:02 -07:00
Guy Harris cc7b2f2e42 Add support for "wlan ra" and "wlan ta".
The RA field is absent from management frames (addr1 is DA there), and
addr1 in other frames.

The TA field is absent from management frames (addr2 is SA there), and
addr2, if present, in other frames.

While we're at it, fix a font glitch in the pcap-filter man page.
2010-07-03 13:15:01 -07:00
Guy Harris aeda5c1d65 More "don't crash if "wlan addr{1,2,3,4}" are used without 802.11 headers". 2010-07-03 11:13:40 -07:00
Guy Harris ccbfd9200e Don't crash if "wlan addr{1,2,3,4}" are used without 802.11 headers. 2010-07-03 10:58:48 -07:00
Guy Harris 85089fea57 Do filtering on USB and Bluetooth capturing.
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.
2010-06-04 10:48:16 -07:00
Guy Harris f0a4bdf8e0 On FreeBSD/SPARC64, use -fPIC - it's apparently necessary. 2010-05-29 19:27:49 -07:00
Guy Harris 9980b3601f Check for valid port numbers (fit in a 16-bit unsigned field). 2010-05-29 00:02:49 -07:00
Guy Harris 65f960da71 Reject attempts to put savefiles into non-blocking mode.
Don't ignore them, reject them, so applications know that non-blocking
mode didn't get turned on, if they're expecting non-blocking reads from
a pipe, for example.
2010-05-28 20:39:09 -07:00
Guy Harris 8666f21afc Check for "no such device" for the "get the media types" ioctl in *BSD.
This lets us return PCAP_ERROR_NO_SUCH_DEVICE if we've done a
pcap_create() on a non-existent device and asked whether it supports
monitor mode.
2010-05-18 18:56:38 -07:00
Guy Harris 06a81b2e72 Improve error messages from bpf_open(), and let it do the error handling.
bpf_open() already handles returning the right PCAP_ERROR_ value and
setting p->errbuf; let it do its thing.

Enhance its thing so that it tries to do a better job of figuring out
what the problem is (no BPF devices at all, all BPF devices busy, no
permission to open BPF device, something else).
2010-05-18 18:50:30 -07:00
Guy Harris 0a77b1b15f Return more specific errors from pcap_can_set_rfmon(); fix documentation.
Have pcap_can_set_rfmon() return PCAP_ERROR_PERM_DENIED if you don't
have permission to check the device and PCAP_ERROR_NO_SUCH_DEVICE if
there's no such device, at least on Mac OS X.  Other platforms need to
be fixed as well.

Update the documentatation to reflect that it can return
PCAP_ERROR_PERM_DENIED, fix a typo, and speak of capture sources rather
than devices.
2010-05-18 17:54:36 -07:00
Guy Harris 59b866591a Clean up indentation. 2010-05-18 17:50:49 -07:00
Guy Harris c65292b04b Update description fetching code for FreeBSD, fix code for OpenBSD.
Update from Jason (Xin) Li to reflect changes to the FreeBSD
SIOCGIFDESCR implementation - it now doesn't return an error if the
buffer is too short, it sets the buffer pointer to NULL.  No FreeBSD
release has SIOCGIFDESCR, so this doesn't break on any release.

The loop, trying to increase the buffer size until it's big enough,
works only on FreeBSD, as that's the only OS where you get told what
length to use; OpenBSD clamps the description length at IFDESCRSIZE, so
we just use that.
2010-04-28 12:29:19 -07:00
andy-1 073a8b37f9 Ignore /sys/net/dev files if we get ENODEV for them, not just ENXIO.
Both of them are indications that there's no such interface, so the file
probably corresponds to something other than a device.

Reviewed-By: Guy Harris <guy@alum.mit.edu>
2010-04-27 23:33:23 -07:00
Guy Harris ace1a2c86f Fix check for a constant 0 argument to BPF_DIV.
BPV_RVAL() is the macro to check the type of the return value of a "ret"
instruction; it tests more bits than are appropriate for a "div"
instruction, and the test fails.
2010-04-21 02:20:48 -07:00
Alon Bar-Lev e25ea10a13 Use the right version of ar when cross-building.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
2010-04-16 03:02:27 -07:00
nvercamm b372da4b07 Free any filter set on a savefile when the savefile is closed.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
2010-04-16 02:54:45 -07:00
Alon Bar-Lev 3a089e628c Include the CFLAGS setting when configure was run in the compiler flags.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
2010-04-13 19:00:04 -07:00
Guy Harris e45fc489f0 Build fat appropriately for Leopard. 2010-04-06 15:06:34 -07:00
Guy Harris a1a7640419 Don't define or use any of the SIZEOF_ values.
We don't need or want them on UN*X (for one thing, we do fat builds on
OS X, and SIZEOF_LONG doesn't have the same value in ILP32 and LP64),
and don't need them on Windows, either (long is 32 bits in both Win32
and Win64).
2010-04-04 13:48:11 -07:00
Guy Harris d7cf4017fb Fix check for Snow Leopard.
For OS X version 10.{x}.{y}, Darwin is (at least for later versions)
version {x+4}.{y}.
2010-04-04 12:37:15 -07:00
Guy Harris 6776069ed8 Balance parentheses in a comment. 2010-04-04 12:07:13 -07:00
Guy Harris 19cc8a5941 Clarify that universal is OS X-specific.
In the help message for --disable-universal, note that it's for OS X.
The configure script will presumably offer that option even on other
OSes (e.g. because you might be cross-building for OS X).
2010-04-04 11:56:46 -07:00
Guy Harris 8416cc897b Build universal on OS X by default; add an option to disable that.
Instead of requiring the user to specify -arch options on OS X to build
a universal version of libpcap, just default to universal on OS X by
default.  Pick the particular targets to match the way libpcap is built
for the OS for which we're building.
2010-04-04 11:51:01 -07:00
Guy Harris 814e55d448 Make the date on the change notes for 1.1.0 match the release date. 2010-04-03 11:59:18 -07:00
Guy Harris f379150d84 The first 1.2.x release will be 1.2.0, not 1.2. 2010-04-01 22:32:44 -07:00
Guy Harris 9596eba4ba Add the current set of 1.1.1 changes from 1.1.0. 2010-04-01 22:31:02 -07:00
Guy Harris 9d6dc34d55 Update CHANGES to reflect more of the changes in 1.1.0. 2010-04-01 22:26:18 -07:00
Chris Maynard 3ac3601bc7 Add a #include required on RHEL5. 2010-04-01 01:58:32 -07:00
Guy Harris dbf3bd4597 Add a --with-arch-flags configuration option to specify target architectures.
They allow the user to specify flags to indicate the target
architecture(s) (yes, possibly plural - think, for example, Mac OS X)
for which we're building.  Those might need to be used not only when
compiling, but also when linking and when building a shared library.

This is not for general cross-compiling, it's for use on platforms where
versions of the native OS support more than one instruction set and
where you want to build for the OS on which you're running but not for
the default build architecture on the machine on which you're running.
2010-03-31 17:22:33 -07:00
Alon Bar-Lev d270319b2c Pass LDFLAGS to the command that builds shr.o on AIX.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
2010-03-31 14:32:39 -07:00
Guy Harris 8f6096fd01 Move test source to a tests directory, add a new test for nonblocking mode. 2010-03-31 12:39:35 -07:00
Guy Harris 6e5e19e7f8 There's now a 1.1 branch; the main branch will become 1.2. 2010-03-13 14:39:11 -08:00
Guy Harris 02ef27750d Pick up the CHANGES file from the 1.1 branch. 2010-03-13 14:38:29 -08:00
Xin Li f6cbf3b4de Update to handle arbitrary-length interface descriptions on FreeBSD.
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2010-03-10 15:55:44 -08:00
Guy Harris c3184553df Update a comment. 2010-03-10 15:53:55 -08:00
test2 b3eca60b5c Added the definition of SET_BINMODE under WIN32. 2010-03-09 12:27:31 -08:00