dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

1459 Commits

Author SHA1 Message Date
Guy Harris 7326e1ad48 prev_pkt is in the pcap_md structure, not the pcap_t structure itself. 2009-03-25 08:53:58 -07:00
Guy Harris 64b88abf98 Move "union thdr" to pcap-int.h, as we use it in pcap-int.h. 2009-03-25 08:48:57 -07:00
Guy Harris 54ef309e92 In memory-mapped mode, don't release the packet as soon as the callback
finishes processing the packet; in some cases, such as pcap_next() and
pcap_next_ex(), the packet data is expected to be available after the
callback returns, and only discarded when the next packet is read.
2009-03-23 23:18:25 -07:00
Guy Harris f5af8a7ce4 Fix typo in Romain's name. 2009-03-19 10:23:53 -07:00
Guy Harris 3866e83123 From Roman Francoise: rename the USB-sniffing devices to "usbmonN", so
as not to collide with the "usbN" names for USB-based networking
devices.
2009-03-19 09:37:03 -07:00
Guy Harris 05326b0246 Add some more generated files. 2009-03-19 09:28:01 -07:00
Guy Harris 35a12bf7e4 Add a .gitignore file. 2009-02-26 01:20:37 -08:00
Guy Harris 8cd961c944 From Sebastien Roy: fix compilation problems on versions of Solaris with
libdlpi.
2009-02-26 01:16:26 -08:00
Guy Harris 936df0fbc1 From Gisle Vanem:
* nametoaddr.c with DECNETLIB defined needs <netdnet/dnetdb.h>
  included. And which again needs <sys/types.h>.

* Remove "IP6_misc.h" since it's already included in pcap-stdinc.h
  (ref. my patch to pcap-stdinc.h).
2009-02-14 14:36:34 -08:00
Guy Harris 5fb89099c6 From Gisle Vanem:
* Added header-guard.

* Include IP6_misc.h unconditionally (why treat MingW specially?)
2009-02-14 14:31:47 -08:00
Guy Harris 4380c64a7d Update to the new style, wherein each capture type has its own
pcap_create() routine, and pcap_activate() calls through the activate_op
pointer in a pcap_t.
2009-02-14 14:13:52 -08:00
Guy Harris 0359240b1c From Tobias Poschwatta: correctly check the requested packet directions
when processing packets in memory-mapped mode.
2009-02-14 13:19:13 -08:00
Guy Harris 55685bd38c Revert to defining the USB stuff ourselves; whether there's a
<linux/usb_ch9.h> or <linux/usb/ch9.h> header depends on the version of
the kernel (and that assumes that one of those headers is even
installed, which isn't necessarily the case).
2009-01-03 12:12:12 -08:00
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