aboutsummaryrefslogtreecommitdiffstats
path: root/pcap
AgeCommit message (Collapse)AuthorFilesLines
2010-01-05Add a pcap/ipnet.h file with IPNET definitions; use the right AF_ values.Guy Harris2-6/+43
2010-01-04Add DLT_IPV4 and DLT_IPV6.Guy Harris1-1/+7
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.
2009-12-27Put in a comment to clarify that PCAP_VERSION_MAJOR/PCAP_VERSION_MINORGuy Harris1-0/+7
are *NOT* the library version number.
2009-12-01Add a #define for 0xffffffff as PCAP_NETMASK_UNKNOWN, for use when youGuy Harris1-0/+6
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-11-25Get rid of redundant definition of DLT_IPNET.Guy Harris1-3/+0
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-24To compile libpcap on OpenSolaris (or Solaris Express Community Edition)Darren Reed1-0/+9
build 125 and later to use the native BPF with both IPNET and traditional MAC (ethernet, etc) packet sniffing, the attached patches are required. The attached patches represent what's in our internal build tree for libpcap.
2009-10-11Add DLT_CAN_SOCKETCAN, for capturing on the Controller Area Network withGuy Harris1-0/+9
Linux SocketCAN.
2009-09-07From Dustin Spicuzza: support ps_ifdrop on Linux, using /proc/net/dev.Guy Harris1-1/+1
Fix the title of the pcap_stats man page, and give more detail - and a lot of caveats.
2009-07-27Note that what follows the ipnet pseudo-header is an IPv4 or IPv6Guy Harris1-0/+3
datagram.
2009-07-27DLT for Solaris ipnet, requested by Darren Reed.Guy Harris1-0/+45
2009-07-23Add another Fibre Channel link-layer type value; this one is for framesGuy Harris1-0/+14
that include an encoding of the frame delimiters.
2009-07-03Add a link-layer type value for Fibre Channel FC-2 frames, as requestedGuy Harris1-1/+7
by Kahou Leu. Clean up a comment.
2009-06-26Add a link-layer type value for Wireless HART.Guy Harris1-0/+9
2009-05-12provided DLT_AOS to eric.lidwa-1@nasa.govMichael Richardson1-0/+11
2009-04-19Add a linktype for DECT packets, requested by Matthias Wenzel.Guy Harris1-0/+6
2008-12-23Update CHANGES for USB fixes.guy2-7/+23
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-23Add missing left parenthesis.guy1-2/+2
2008-12-23From Jon Smirl:guy2-2/+14
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-21New DLT_MPLS link-layer type, for MPLS packets with an MPLS label as theguy1-4/+11
link-layer header.
2008-11-27Link-layer types for GSM Um and Abis interfaces.guy1-1/+9
2008-11-18Propagate from the git tree:guy1-1/+9
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-10-06Implemented pcap_hopen_offline(). This "internal" function allows us togianluca1-1/+12
support pcap_fopen_offline() on windows platforms (where FILE* handles cannot be passed on DLL boundaries).
2008-09-22Link-layer type for 802.15.4 with PHY-level preamble, SFD, and frameguy1-1/+12
length, as requested by Max Filippov <jcmvbkbc@gmail.com>.
2008-08-06From Patrick McHardy:guy1-0/+46
VLAN packets sent over devices supporting VLAN tagging/stripping in hardware don't have a VLAN header when they are received on packet sockets. The VLAN TCI is available through the PACKET_AUXDATA cmsg, reconstruct the entire header when necessary.
2008-07-01When activating a device, return PCAP_ERROR_IFACE_NOT_UP if the deviceguy1-1/+2
isn't up, so applications can report that differently from a generic error (the latter could mean there's a bug somewhere in libpcap). When capturing on a device without mmap on Linux, ignore ENETDOWN, so that we can continue to capture traffic if the interface goes down and comes back up again; comments in the kernel indicate that we'll just block waiting for packets if we try to receive from a socket that delivered ENETDOWN, and, if we're using a memory-mapped buffer, we won't even get notified of "network down" events.
2008-05-30packaging/pcap.spec is generated from packaging/pcap.spec.in; don'tguy3-17/+20
check in the generated version, and don't put it into the distribution. Fix a bunch of references to tcpdump-workers@tcpdump.org to refer to the new address, tcpdump-workers@lists.tcpdump.org. Fix a reference to the pcap man page from the pcap-filter(4) man page. Note that patches should be submitted on the SourceForge site, not sent to the spam-trap patches@tcpdump.org list.
2008-05-26Add pcap_free_datalinks() - on Windows, something allocated in Vegas^Waguy1-1/+2
library has to be freed by the library, as an application or other library using that library might have been built with a different version of the C runtime library.
2008-05-13Pick up pcap_offline_filter() from WinPcap.guy1-1/+3
Add pcap_compile() to the SEE ALSO section for pcap_setfilter().
2008-04-09Rename pcap_errtostr() to pcap_statustostr(), and have it handleguy1-2/+2
PCAP_WARNING values as well.
2008-04-09Add some PCAP_WARNING return values for "success, but you might want toguy1-2/+15
know that..."; currently, only pcap_activate() returns them, but we might want some more warning returns for some other calls, such as the ones that set filters. It's a little cleaner than "clear out the error message buffer and, if it's not empty after a successful return, it has a warning", and a little cleaner than spewing a warning to the standard error (as that might not be visible to the user if they're running a GUI application).
2008-04-09Add an error for "you don't have permission to open that device", asguy1-2/+3
that often means "sorry, this platform requires you to run as root or to somehow tweak the system to give you capture privileges", and applications might want to explain that in a way that does a better job of letting the user know what they have to do. Try to return or PCAP_ERROR_PERM_DENIED for open errors, rather than just returning PCAP_ERROR, so that the application can, if it chooses, try to explain the error better (as those two errors are the ones that don't mean "there's probably some obscure OS or libpcap problem", but mean, instead, "you made an error" or "you need to get permission to capture"). Check for monitor mode *after* checking whether the device exists in the first place; a non-existent device doesn't support monitor mode, but that's because it doesn't, well, exist, and the latter would be a more meaningful error. Have pcap_open_live() supply an error message for return values other than PCAP_ERROR, PCAP_ERROR_NO_SUCH_DEVICE, and PCAP_ERROR_PERM_DENIED - those all supply error strings (PCAP_ERROR because it's for various OS problems that might require debugging, and the other two because there might be multiple causes).
2008-04-06Have a separate pcap_errtostr() routine to turn PCAP_ERROR_ values toguy1-2/+3
strings; leave pcap_strerror() for UN*X errnos.
2008-04-06Add more data types for X2E, requested by Hannes Kaelber.guy1-1/+13
2008-04-04From Paolo Abeni and me: split pcap_open_live() into a "get a pcap_tguy1-1/+20
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.
2008-02-18Fix a typo.guy1-3/+23
Add some new link-layer types for automotive buses, as requested by Hannes Kaelber.
2008-01-02Make some arguments const pointers if that makes sense.guy2-9/+8
Add some additional checks to bpf_validate(), from OpenBSD. Use bpf_validate() in install_bpf_program(), so we validate programs even when they're being processed by userland filters; we make bpf_validate() not reject backward branches, as we use them for the protochain operator. For BPF, don't assume that, just because no_optimize was set, we have a program that we can't hand to the kernel; the user of the application might have specified no optimization (e.g., tcpdump with -O), or we might have generated code to handle 802.11 headers (the optimizer can't handle that code). Instead, try handing the filter to the kernel and, if that fails, try it in userland. Get rid of BPF_MAXINSNS - we don't have a limit on program size in libpcap.
2007-12-23DLT_ value for IPMB with a Linux-specific pseudo-header,a s requested byguy1-1/+7
Alexey Neyman. Add LINKTYPE_ values corresponding to the DLT_ values added earlier.
2007-12-22Some more link-layer types, as requested by Will Barkerguy1-1/+17
<w.barker@zen.co.uk>.
2007-10-21Add DLT_LAPD, for raw LAPD with no pseudo-header, as per Varuna Deguy1-1/+8
Silva.
2007-10-05Add DLT_AX25_KISS, for AX.25 with a KISS header, as per discussions inguy1-1/+10
the tcpdump-workers mailing list in early April, 2007. Add Richard Stearn's support for DLT_AX25_KISS.
2007-10-04From Stephen Donnelly: fix a missing-parenthesis typo.guy1-2/+2
2007-09-29Based on work from Florent Drouin, split the 32-bit link-layer typeguy2-2/+33
field in a capture file into: a 16-bit link-layer type field (it's 16 bits in pcap-NG, and that'll probably be enough for the foreseeable future); a 10-bit "class" field, indicating the group of link-layer type values to which the link-layer type belongs - class 0 is for regular DLT_ values, and class 0x224 grandfathers in the NetBSD "raw address family" link-layer types; a 6-bit "extension" field, storing information about the capture, such an indication of whether the packets include an FCS and, if so, how many bytes of FCS are present.
2007-09-22From Paolo Abeni:guy1-0/+48
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.
2007-09-22Add an RCS ID.guy1-0/+1
2007-09-19New DLT for Bluetooth H:4 with pseudo-header giving direction.guy1-2/+8
Add support for additional link types to gencode.c, so we at least support "link[N:M]" and an empty expression. Sort the DLT_CHOICE values in order by the DLT_ value, add missing ones, and fix some existing descriptions.
2007-09-14From Paolo Abeni: fix copyrights.guy1-4/+2
2007-09-10allocate DLT_JUNIPER_ST as per request from Hannes Gredler <hannes@juniper.net>hannes1-1/+8
2007-08-14Add DLT value for IPMI IPMB packets, beginning with the I2C slaveguy1-1/+8
address, followed by the netFn and LUN, etc.. Requested by Chanthy Toeung.
2007-08-13New DLT value for packets captured from u10 Networks boards; requestedguy1-1/+8
by Phil Mulholland of u10.
2007-08-07DLT_ERF, for encapsulating Endace ERF records and packet data forguy1-1/+8
various link-layer types.