dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

1246 Commits

Author SHA1 Message Date
guy 6e26f4a0fd Another change from Debian. 2008-12-25 02:01:32 +00:00
guy aa03b98b38 Fix the section number. (Thanks to the Debian and/or Ubuntu people who
fixed this but didn't tell us about it.)
2008-12-24 21:45:25 +00:00
guy adcaff491d Get some USB information from <linux/usb/ch9.h> rather than defining it
ourselves.

Add some comments and other tweaks from another of Jon Smirl's patches.
2008-12-23 21:38:50 +00:00
guy a669335415 probe_devices() returns void (if calls fail, we just drive on); don't
try to return a value from it.
2008-12-23 20:55:28 +00:00
guy 5e3edce42f From Jon Smirl: when we start capturing, send GET DESCRIPTOR requests to
all devices on the bus, so we know what's out there already.  Cleaned up
a bit to directly include <linux/usbdevice_fs.h> and *not* to require
the USB library just to supply a header with USB definitions.
2008-12-23 20:49:26 +00:00
guy b908482137 Update CHANGES for USB fixes.
Update CREDITS to give Jon Smirl credit for some of the USB fixes.

Rename DLT_USB_LINUX_MMAP to DLT_USB_LINUX_MMAPPED, and declare a
structure for the header of packets in DLT_USB_LINUX_MMAPPED captures.
2008-12-23 20:13:29 +00:00
guy 687233847f ps_ifdrop is the number of packets dropped by the interface and not even
handed to the host; ps_drop is the number of packets dropped by the
capture mechanism because it ran out of buffer space.  We don't know the
former, so set it to 0; we *do* know the latter, but it's ps_drop, not
ps_ifdrop.
2008-12-23 19:05:26 +00:00
guy fb218e8ff5 Add missing left parenthesis. 2008-12-23 18:12:46 +00:00
guy 87d0db882e From Jon Smirl:
try scanning the sysfs USB directory first and, if that
	directory doesn't exist, try the procfs USB directory, to handle
	newer kernels where the relevant director is in sysfs;

	use the data length, not the URB length, as the amount of data
	in the packet (the URB length is the amount of space *available*
	for the data, not the actual amount of data).

For the memory-mapped interface, include the padding after the URB and
setup header in the packet lengths, and return a different link-layer
type so that code reading the packets knows that padding is there.
2008-12-23 18:03:22 +00:00
guy 8a49a4d47b New DLT_MPLS link-layer type, for MPLS packets with an MPLS label as the
link-layer header.
2008-12-21 19:28:56 +00:00
gianluca c93e0966e1 Added a couple missing definitions. 2008-12-21 10:18:10 +00:00
guy 2377722dc6 Update date stamp for 1.0.1 changes. 2008-12-15 00:27:54 +00:00
guy 5ef924505c Clarify some existing change descriptions, and mention the fix for
building with wireless extensions support on recent Linux kernels.
2008-12-15 00:20:07 +00:00
guy ba23aa7b42 OK, let's try another approach - include <linux/if.h> rather than
<net/if.h>, in the hope that

	1) doing so won't cause some problem somewhere

and

	2) it'll have multiple-include protection

(this whole "glibc is a separate project from the kernel, so we'll
duplicate header files" thing has its downsides).
2008-12-14 22:00:57 +00:00
guy 26c8745ecf When trying <linux/wireless.h> with <net/if.h>, first forget that the
test without <net/if.h> failed, so that we don't just use the cached
value and skip the test, and log a message to note why we're trying the
check again.
2008-12-14 21:03:07 +00:00
guy 080c13423a It appears that, at least with the 2.6.27.5 kernel (and maybe the 2.6.27
kernel in general), <linux/wireless.h> includes <net/if.h> and you get
multiple-definition errors if you include <net/if.h> before it.  Only
include <net/if.h> if you don't have <linux/wireless.h>.
2008-12-14 20:30:11 +00:00
guy ad46bc2135 It appears that, at least with the 2.6.27.5 kernel (and maybe the 2.6.27
kernel in general), <linux/wireless.h> includes <net/if.h> and you get
multiple-definition errors if you include <net/if.h> before it.  When
checking for linux/wireless.h, try first without net/if.h and then with
net/if.h.
2008-12-14 20:17:14 +00:00
guy 4486bda92d has_wext() isn't used if IW_MODE_MONITOR isn't defined, so don't define
it if IW_MODE_MONITOR isn't defined.
2008-12-14 20:03:59 +00:00
guy a9006f2462 Another genericize-the-version-number change. 2008-12-14 19:44:14 +00:00
guy fe8a58a56d Generically refer to the top-of-tree version as 1.x.y. 2008-12-14 19:36:02 +00:00
guy 4a0b8011fa Pick up changes from the 1.0.x branch.
Generically refer to the top-of-tree version as 1.x.y.
2008-12-14 19:33:25 +00:00
guy d6a6846b04 Pick up 1.0.1 changes. 2008-12-14 19:26:43 +00:00
guy a906d222c2 Pull over the changes from the 1.0.x branch. 2008-12-14 08:23:30 +00:00
guy c87d4474e2 From Albert Chin: define DL_IPATM and MAXDLBUF, just as is done in
pcap-dlpi.c.
2008-12-02 16:40:19 +00:00
guy 415170069a From Albert Chin: fix a cut-and-pasteo. 2008-12-02 16:25:14 +00:00
guy 7d17ac06c0 From Albert Chin: the "ss" variable is defined only if bufmod is
available, but is set unconditionally.

In addition, we might as well just put all the code that handles bufmod
inside a single #ifdef HAVE_SYS_BUFMOD_H/#endif pair; on Solaris, you
always have bufmod, so the code would work, but it's cleaner that way.
2008-12-02 16:20:23 +00:00
guy c89dab565e Link-layer types for GSM Um and Abis interfaces. 2008-11-27 19:47:54 +00:00
guy dfc31b2781 From Roberto Mariani: add support for the snapshot length to the
memory-mapped interface.
2008-11-24 18:49:57 +00:00
guy 47dad25d57 From Roberto Mariani: get rid of some unused #defines.
Close the descriptor before returning with PCAP_ERROR_RFMON_NOTSUP.
2008-11-24 18:06:39 +00:00
guy dc52400769 Roberto Mariani:
put the transfer direction in the uppermost bit of the endpoint
	number, rather than the uppermost bit of the transfer type, when
	reading in text mode, just as is the case in binary mode;

	check the URB data length against 0 when deciding whether
	there's no URB tag.
2008-11-24 17:40:19 +00:00
guy b33b2ef32a Install headers unconditionally.
Separate the public and private headers, with separate "public headers"
and "all headers" variables, and install (and uninstall) all public
headers.  Put all headers into the tarball.

Remove target man pages before making links.

Clean up white space a little.
2008-11-22 17:30:24 +00:00
guy 3e0ba22954 Fixes for building in a directory other than the source directory. 2008-11-21 22:54:59 +00:00
guy d3724b0ffc Generate the major version number for the soname from the full version
number in the VERSION file.

When installing a .so file, make the appropriate symlinks.

Add an "uninstall-shared" rule to uninstall the shared library.
2008-11-21 19:23:19 +00:00
guy c47a9b2c86 Libpcap is at 1.x, it's tcpdump that's at 4.x. 2008-11-21 19:19:02 +00:00
guy 1187832296 Return -1 for all failures to create a packet ring other than "this
kernel doesn't support the packet ring", and make sure we set
handle->errbuf in all such cases.
2008-11-19 17:36:52 +00:00
guy cad7b9cec9 Get rid of bogus AC_CHECK_HEADERS with empty list - the shell code that
turns into happens to run in Bash, but not in the Bourne shell.
2008-11-19 11:13:46 +00:00
guy 5cf5f7c1c8 If attempting to turn memory-mapped access on fails for any reason other
than "the kernel doesn't support memory-mapped access to PF_PACKET
sockets", treat that as an error.  If it fails for that reason, don't
leave gunk behind in the pcap_t's error buffer.

Clean up the error messages a bit (the result of strerror() suffices; we
don't need the numeric value of errno, nor do we need the file
descriptor number of the socket on which we're working).
2008-11-19 10:01:30 +00:00
guy 8fa17a5a55 Fix the handling of the "any" device, including making it reject
attempts to open it in monitor mode.
2008-11-19 08:20:39 +00:00
guy edbdc85842 Make the version 4.1-PRE-CVS, as 4.1.0 will presumably eventually be
branched off from the main branch.
2008-11-18 09:03:26 +00:00
guy c2df6d77ef Update and fix a comment. 2008-11-18 09:01:23 +00:00
guy 679a612eb3 Make the version 1.1-PRE-CVS, as 1.1.0 will presumably eventually be
branched off from the main branch.
2008-11-18 08:54:22 +00:00
guy 89e2d4518e Sort contributors by given name, not family name. 2008-11-18 07:56:35 +00:00
guy 4e7a6968b8 Give Peter Volkov credit for various patches. 2008-11-18 07:53:22 +00:00
guy b77695d2ec Propagate from the git tree:
Author: Michael Richardson <mcr@sandelman.ca>
Date:   Thu Nov 13 11:42:19 2008 -0500

    added DLT_LINUX_EVDEV for David Gibson <david@gibson.dropbear.id.au>

Fix the name of the devices, and add LINKTYPE_LINUX_EVDEV.
2008-11-18 07:48:56 +00:00
guy e8fbb040ce From Peter Volkov:
Currently make install in libpcap never installs pcap/{vlan,bluetooth}.h
headers. Attached patch makes it install them in case support was built
in into libpcap.
2008-11-18 07:29:48 +00:00
guy a2611cdc3a Autoconf 2.50 had AC_HELP_STRING, not AS_HELP_STRING; later versions
make AC_HELP_STRING an alias for AS_HELP_STRING.  As we require only
2.50, use AC_HELP_STRING, not AS_HELP_STRING.
2008-11-18 07:23:04 +00:00
guy c4286ad82b From Peter Volkov:
Currently if there are bluetooth.h headers installed in the system
libpcap will be built with bluetooth support and it's impossible to
disable it. Attached patch adds --{en,dis}able-bluetooth switches.

Also this patch makes use of AS_HELP_STRING to let autoconf manage
output layout.
2008-11-18 07:13:20 +00:00
guy 08cc2c0c57 From Peter Volkov:
Currently if there are bluetooth.h headers installed in the system
libpcap will be built with bluetooth support and it's impossible to
disable it. Attached patch adds --{en,dis}able-bluetooth switches.

Also this patch makes use of AS_HELP_STRING to let autoconf manage
output layout.
2008-11-18 07:03:09 +00:00
guy 3b0ceef967 Propagate from the git tree:
Author: Peter Volkov <pva@gentoo.org>
Date:   Thu Nov 6 01:28:58 2008 -0500

    Currently SITA will be defined and sita code will be tried to build even
    if --without-sita is passed to ./configure. Patch in attachment fixes
    this issue.
2008-11-18 06:59:04 +00:00
guy c15ece2f8c Propagate from the git tree:
Author: Peter Volkov <pva@gentoo.org>
Date:   Thu Nov 6 01:30:04 2008 -0500

    make DESTIDR=/tmp/libpcap install
    fails with the following error:

    /usr/bin/install -c pcap-config /tmp/test/home/pva/work/local/bin/pcap-config
    /usr/bin/install: cannot create regular file `/tmp/test/home/pva/work/local/bin/pcap-config': No such file or directory
    make: *** [install] Error 1

    patch in attachment fixes this issue.
2008-11-18 06:50:29 +00:00