dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

1440 Commits

Author SHA1 Message Date
Guy Harris 6d2fcdfaa1 Again, we're using Git now. 2010-02-08 11:26:05 -08:00
Guy Harris a6942e7596 Put date into version.h for Git versions, too. 2010-02-08 02:49:42 -08:00
Guy Harris 916b450e31 For PRE-GIT releases, put a date stamp in the version string.
This is similar to what we do for tcpdump.
2010-02-08 02:40:11 -08:00
Guy Harris 3da6116350 We're using Git, not CVS, now. 2010-02-08 02:38:18 -08:00
Guy Harris 1f436f90eb Include headers that should cause u_int64_t to be defined. 2010-01-27 00:56:18 -08:00
Guy Harris c69ec3857b Include headers that should cause u_int64_t to be defined. 2010-01-27 00:46:43 -08:00
Guy Harris 88285f982b Include headers that should cause u_int64_t to be defined. 2010-01-27 00:04:36 -08:00
Guy Harris a52a49b582 Include headers that should cause u_int64_t to be defined. 2010-01-26 23:18:30 -08:00
Guy Harris c9d9609809 Include headers that should cause u_int64_t to be defined. 2010-01-26 20:28:51 -08:00
Guy Harris d1c86de80c Include headers that should cause u_int64_t to be defined. 2010-01-26 20:16:44 -08:00
Guy Harris 9934984be5 Put pcap-snf.c and pcap-snf.h into the release tarball. 2010-01-26 19:52:05 -08:00
Guy Harris 06446f52c4 Include headers that should cause u_int64_t to be defined. 2010-01-26 19:50:36 -08:00
Christian Bell 271747b20b Fix --with-pcap={linux,bpf} when SNF API is present.
Signed-off-by: Guy Harris <guy@alum.mit.edu>
2010-01-26 12:02:38 -08:00
Christian Bell e1539bdbcb Add Myricom SNF API support as a new pcap device.
This patch adds support for our NICs when run in a specialized capture mode.
It is diffed against the current master.

The Myricom Sniffer10G software uses Myri-10G programmable Network Interface
Cards (NICs), a firmware extension, a specialized driver and a user-level
library (libsnf) to enable sustained capture of 10-Gigabit Ethernet traffic.
Small-packet coalescing and an efficient zero-copy path to host memory allow
Sniffer10G to capture streams at line rate for all Ethernet packet sizes.

Optionally, libpcap can be used concurrently by multiple processes on a single
NIC port to partition the incoming traffic across processes.  While the Linux
kernel enables this through multiple receive queues, the difference is that the
myri_snf driver cooperates with libsnf to set up multiple queues that are each
independently accessible through user-space.

More information here: http://www.myri.com/scs/SNF/doc

Signed-off-by: Guy Harris <guy@alum.mit.edu>
2010-01-26 11:58:37 -08:00
Guy Harris ecd955e0df Byte-swap the extra fields in the "version 1" USB monitor header. 2010-01-25 15:12:43 -08:00
Guy Harris f9c2f9a852 Include pcap-common.h in the tarball. 2010-01-10 14:21:02 -08:00
Guy Harris 1715346ad0 Ignore directories in /sys/class/net. 2010-01-10 11:05:00 -08:00
Guy Harris a9a939af2a Correctly handle errors other than problems reading /sys/class/net. 2010-01-10 11:01:56 -08:00
Guy Harris 1eb25ea82a Fix some errors in the previous checkin. 2010-01-10 10:59:22 -08:00
Guy Harris 81a96c3226 Scan /sys/class/net if we have it.
It's a bit easier to scan than /proc/net/dev, as it's a directory.
2010-01-10 10:56:25 -08:00
Guy Harris 2fd233b16d On Linux, always at least try to scan /proc/net/dev.
If we fail to open it, we just drive on, so it's not a fatal error; yes,
it'll slow us down a little, but it's probably not much, and most Linux
kernels probably have it in any case.
2010-01-10 00:32:13 -08:00
Guy Harris 27636b9a98 Include <ctype.h>, as we use macros from it.
Also, use isascii() to avoid surprises from characters with the 8th bit
set, rather than playing signed vs. unsigned character games.
2010-01-09 18:50:52 -08:00
Guy Harris 6831a81489 Scan /proc/net/dev on Linux regardless of how we get the interface list.
It's a Linuxism, so it's not necessary on other platforms, and is useful
even if we have getifaddrs().
2010-01-09 18:46:02 -08:00
Guy Harris fc03e2cbb6 Squelch some (valid) compiler warnings. 2010-01-09 18:25:22 -08:00
Guy Harris ed73055294 Mention that we can read some pcap-ng files. 2010-01-09 17:06:10 -08:00
Guy Harris b4b664817b Add limited support for reading pcap-ng files.
All sections of the file must have the same byte order, so that the
result of pcap_is_swapped() is the same throughout the file; all
interfaces in the file must have the same link-layer type and snapshot
length, so that pcap_datalink() and pcap_snapshot() can return a single
value for the entire file; and all interfaces must have the same time
resolution and offset.
2010-01-09 16:58:15 -08:00
Guy Harris 753c9432ab Fix pcap_lookupnet().
From NetBSD; to quote the checkin comment:

	Fix pcap_lookupnet(): reset ifr before SIOCGIFNETMASK. Without
	it we get back a bogus netmask.

Presumably some stuff left over in ifr from the previous ioctl confuses
the next ioctl.
2010-01-09 12:51:15 -08:00
Guy Harris ffd6b10d87 Add Christian Bell to the CREDITS file. 2010-01-08 12:39:54 -08:00
Christian Bell df6ab8d1a6 Minor VPATH build fixes in top-level Makefile.
Signed-off-by: Guy Harris <guy@alum.mit.edu>
2010-01-08 12:38:56 -08:00
Guy Harris 25b78e4fe3 Update config.guess and config.sub to the latest versions. 2010-01-08 10:37:10 -08:00
Guy Harris 2d78729d0f Add a pcap/ipnet.h file with IPNET definitions; use the right AF_ values. 2010-01-05 20:35:25 -08:00
Guy Harris add31c2e28 Add DLT_IPV4 and DLT_IPV6.
DLT_IPV4 and DLT_IPV6 are like DLT_RAW, except that you know the version
of IP.

Also, get rid of some duplicate stuff for DLT_IPNET in savefile.c.
2010-01-04 12:06:40 -08:00
Guy Harris ded813e278 When removing conftest*, use "-r", to clean up OS X .dSYM turds. 2010-01-02 15:58:15 -08:00
Guy Harris 9662c40522 Split off the shared-library tests into a separate macro.
Split off the shared-library tests into a separate AC_LBL_SHLIBS_INIT
macro, so the libpcap and tcpdump versions of AC_LBL_C_INIT can be the
same.  While we're at it, clean up some of the AC_PREREQ and AC_BEFORE
stuff.
2010-01-02 15:08:06 -08:00
Guy Harris cef4d17b1d Fix a comment. 2010-01-02 14:20:28 -08:00
Guy Harris d1a3a92fab Fix some problems that show up in autoconf 2.64 and later. 2010-01-02 14:15:46 -08:00
Guy Harris 1daef06321 Fix some problems pointed out by compiler warnings.
Include <arpa/inet.h> to declare htons().  Get rid of unused variables.
Fix an intended ioctl() call.
2009-12-31 15:10:02 -08:00
Felix Obenhuber 03238ec05d Check for <linux/can.h> rather than <linux/can/version.h>.
Not all Linux kernels that can support SocketCAN sniffing have
<linux/can/version.h>, and we don't include it directly.  We *do*
include <linux/can.h>, so check for that.

Patch changed not to bother checking for the existence of <sys/socket.h>
- we already assume it exists on all platforms that support packet
capture, including Linux.  I also changed the Bluetooth "not supported
on this OS" message to look like the one for CANbus, giving the host OS.

Signed-off-by: Guy Harris <guy@alum.mit.edu>
2009-12-30 17:14:20 -08:00
Guy Harris 72f5572c50 Capitalize "Bluetooth" and "CAN" in help messages and comments. 2009-12-29 11:56:57 -08:00
Guy Harris b0c5f4c658 Un-split a line. 2009-12-29 11:53:32 -08:00
Felix Obenhuber 1c1816f670 Add support for CANbus capture.
Signed-off-by: Guy Harris <guy@alum.mit.edu>
2009-12-29 01:04:20 -08:00
Guy Harris d32a10c10d Put in a comment to clarify that PCAP_VERSION_MAJOR/PCAP_VERSION_MINOR
are *NOT* the library version number.
2009-12-27 12:10:25 -08:00
Ken Bantoft 8b907b6cd1 Update CHANGES for 1.0.2 release 2009-12-21 21:01:02 -05:00
Guy Harris b02e7c185e One include of <fcntl.h> suffices. 2009-12-18 14:33:09 -08:00
Guy Harris 117cb5eb2e Add a #define for 0xffffffff as PCAP_NETMASK_UNKNOWN, for use when you
don't know the netmask.  (It also lets you test, at compile time,
whether you can rely on "ip broadcast" failing to compile when you pass
0xffffffff to pcap_compile().)
2009-12-01 19:23:21 -08:00
Guy Harris 74b2de364f When generating code for "ip broadcast", treat a netmask of 0xffffffff
(255.255.255.255) be an indication that the netmask is unknown, and
return an error.  Document that as the way to tell pcap_compile() that
the netmask is unknown.  Have filtertest default to that as the netmask,
and add a -m flag to let you specify the netmask.
2009-12-01 19:07:11 -08:00
Guy Harris 8b52a90cd9 Get rid of some unused variables.
Get rid of an unnecessary #ifdef.
2009-11-25 12:03:06 -08:00
Guy Harris b8c57c9529 Don't check for DLT_IPNET if it's not defined - in pcap-bpf.c, the bpf.h
we're using is the OS's, not libpcap's, so it's not necessarily defined.

Explain why we're checking for DLT_IPNET.
2009-11-25 12:02:06 -08:00
Guy Harris 272bbe3dfe Regnerated configure. 2009-11-25 11:56:59 -08:00
Guy Harris 05b4572af9 Get rid of redundant definition of DLT_IPNET.
Don't define DLT_IPOIB with the same value as one of the DLT_USERn
definitions - it's not used, and we don't want to make anybody think
that value belongs to any particular link-layer type.
2009-11-25 11:50:11 -08:00