7 years agocopy config.h from subdirectory on Android rather than run configure android-libpcap-0.9.8
Michael Richardson [Mon, 17 Feb 2014 18:10:26 +0000 (13:10 -0500)] 
copy config.h from subdirectory on Android rather than run configure

7 years agoMerge branch 'android-libpcap-0.9.8' into
Michael Richardson [Mon, 17 Feb 2014 18:01:59 +0000 (13:01 -0500)] 
Merge branch 'android-libpcap-0.9.8' into

7 years agoremoved all Android files
Michael Richardson [Mon, 17 Feb 2014 18:01:05 +0000 (13:01 -0500)] 
removed all Android files

Change-Id: I8e6a49e894535bc5d3c573f57a9c921e97b1d92e

7 years agoAdd an empty
Jean-Baptiste Queru [Tue, 9 Mar 2010 02:04:31 +0000 (18:04 -0800)] 
Add an empty

Change-Id: I5587777658a5b2148289aeb8c1c996a4014ce85e

7 years agoInitial Contribution
Michael Richardson [Mon, 17 Feb 2014 17:56:25 +0000 (12:56 -0500)] 
Initial Contribution

11 years agoAdd an empty android-2.2.1_r1 android-2.2.1_r2 android-2.2.2_r1 android-2.2.3_r1 android-2.2.3_r2 android-2.2.3_r2.1 android-2.2_r1 android-2.2_r1.1 android-2.2_r1.2 android-2.2_r1.3 android-2.3.1_r1 android-2.3.2_r1 android-2.3.3_r1 android-2.3.3_r1.1 android-2.3.4_r0.9 android-2.3.4_r1 android-2.3.5_r1 android-2.3.6_r0.9 android-2.3.6_r1 android-2.3.7_r1 android-2.3_r1 android-4.0.1_r1 android-4.0.1_r1.1 android-4.0.1_r1.2 android-4.0.2_r1 android-4.0.3_r1 android-4.0.3_r1.1 android-4.0.4_r1 android-4.0.4_r1.1 android-4.0.4_r1.2 android-4.0.4_r2 android-4.0.4_r2.1 android-4.1.1_r1 android-4.1.1_r1.1 android-4.1.1_r2 android-4.1.1_r3 android-4.1.1_r4 android-4.1.1_r5 android-4.1.1_r6 android-4.1.1_r6.1 android-4.1.2_r1 android-4.1.2_r2 android-4.1.2_r2.1 android-4.2.1_r1 android-4.2.1_r1.1 android-4.2.1_r1.2 android-4.2.2_r1 android-4.2.2_r1.1 android-4.2.2_r1.2 android-4.2_r1 android-4.3.1_r1 android-4.3_r0.9 android-4.3_r0.9.1 android-4.3_r1 android-4.3_r1.1 android-4.3_r2 android-4.3_r2.1 android-4.3_r2.2 android-4.3_r2.3 android-4.3_r3 android-4.3_r3.1 android-4.4.1_r1 android-4.4.2_r1 android-4.4_r0.7 android-4.4_r0.8 android-4.4_r0.9 android-4.4_r1 android-4.4_r1.1 android-4.4_r1.2 android-cts-2.2_r8 android-cts-2.3_r10 android-cts-2.3_r11 android-cts-2.3_r12 android-cts-4.0.3_r1 android-cts-4.0.3_r2 android-cts-4.0_r1 android-cts-4.1_r1 android-cts-4.1_r2 android-cts-4.2_r1 android-cts-4.2_r2 android-cts-4.4_r1 android-cts-verifier-4.0.3_r1 android-cts-verifier-4.0_r1 android-sdk-4.0.3-tools_r1 android-sdk-4.0.3_r1 android-sdk-4.4.2_r1 android-sdk-adt_r16.0.1 android-sdk-adt_r20 android-sdk-support_r11
Jean-Baptiste Queru [Tue, 9 Mar 2010 02:04:31 +0000 (18:04 -0800)] 
Add an empty

Change-Id: I5587777658a5b2148289aeb8c1c996a4014ce85e

11 years agoreconcile main tree with open-source eclair
The Android Open Source Project [Fri, 5 Feb 2010 16:09:35 +0000 (08:09 -0800)] 
reconcile main tree with open-source eclair

11 years agoreconcile android-2.1_r1 snapshot
The Android Open Source Project [Fri, 29 Jan 2010 22:08:09 +0000 (14:08 -0800)] 
reconcile android-2.1_r1 snapshot

11 years agoandroid-2.1_r1 snapshot
The Android Open Source Project [Tue, 12 Jan 2010 23:18:28 +0000 (15:18 -0800)] 
android-2.1_r1 snapshot

12 years agoreconcile korg/master into goog/master android-2.0.1_r1 android-2.0_r1 android-2.1_r1 android-2.1_r2 android-2.1_r2.1p android-2.1_r2.1p2 android-2.1_r2.1s
Jean-Baptiste Queru [Sun, 26 Jul 2009 18:43:54 +0000 (11:43 -0700)] 
reconcile korg/master into goog/master

12 years agoMerge korg/donut into korg/master
Jean-Baptiste Queru [Sun, 26 Jul 2009 00:48:01 +0000 (17:48 -0700)] 
Merge korg/donut into korg/master

12 years agoam f341270e: remove a *.orig file left over from a merge
Iliyan Malchev [Wed, 27 May 2009 00:55:27 +0000 (17:55 -0700)] 
am f341270e: remove a *.orig file left over from a merge

Merge commit 'f341270e30dd82bf004f2b87cacae1482ca4d50e'

* commit 'f341270e30dd82bf004f2b87cacae1482ca4d50e':
  remove a *.orig file left over from a merge

12 years agoremove a *.orig file left over from a merge android-1.6_r1 android-1.6_r1.1 android-1.6_r1.2 android-1.6_r1.3 android-1.6_r1.4 android-1.6_r1.5 android-1.6_r2
Iliyan Malchev [Tue, 28 Apr 2009 21:09:07 +0000 (14:09 -0700)] 
remove a *.orig file left over from a merge

Signed-off-by: Iliyan Malchev <>
12 years agoMerge donut into master
Jean-Baptiste Queru [Thu, 23 Apr 2009 00:12:20 +0000 (17:12 -0700)] 
Merge donut into master

12 years agoMerge branch 'open_source_no_contributions' into google_internal
The Android Open Source Project [Sun, 29 Mar 2009 15:55:07 +0000 (08:55 -0700)] 
Merge branch 'open_source_no_contributions' into google_internal

12 years agoMerge commit 'remotes/korg/cupcake' into cupcake_to_master
Jean-Baptiste Queru [Wed, 18 Mar 2009 23:57:37 +0000 (16:57 -0700)] 
Merge commit 'remotes/korg/cupcake' into cupcake_to_master

12 years agoauto import from //depot/cupcake/@135843
The Android Open Source Project [Wed, 4 Mar 2009 03:30:05 +0000 (19:30 -0800)] 
auto import from //depot/cupcake/@135843

12 years agoauto import from //depot/cupcake/@135843
The Android Open Source Project [Wed, 4 Mar 2009 02:28:30 +0000 (18:28 -0800)] 
auto import from //depot/cupcake/@135843

12 years agoMerge branch 'cupcake'
The Android Open Source Project [Sat, 10 Jan 2009 02:04:15 +0000 (18:04 -0800)] 
Merge branch 'cupcake'

12 years agoauto import from //branches/cupcake/...@125939
The Android Open Source Project [Sat, 10 Jan 2009 01:51:21 +0000 (17:51 -0800)] 
auto import from //branches/cupcake/...@125939

12 years agoCode drop from //branches/cupcake/...@124589
The Android Open Source Project [Thu, 18 Dec 2008 02:04:37 +0000 (18:04 -0800)] 
Code drop from //branches/cupcake/...@124589

13 years agoInitial Contribution
The Android Open Source Project [Tue, 21 Oct 2008 14:00:00 +0000 (07:00 -0700)] 
Initial Contribution

14 years agoDo not compile gai_strerrorA on Windows under MingW. gai_strerror is already
gianluca [Wed, 19 Sep 2007 16:18:57 +0000 (16:18 +0000)] 
Do not compile gai_strerrorA on Windows under MingW. gai_strerror is already
available on MingW, it's only missing from Cygwin.

14 years agoAdd some recent DLT_ values (to further remind people that they can't
guy [Wed, 19 Sep 2007 02:52:12 +0000 (02:52 +0000)] 
Add some recent DLT_ values (to further remind people that they can't
take them for their own purposes), and fix a comment to reflect current
reality (as of many many years ago).

14 years agoUpdate the version string. (This is used only if this is built without
guy [Wed, 19 Sep 2007 02:50:52 +0000 (02:50 +0000)] 
Update the version string.  (This is used only if this is built without
the configure script; is that only an issue for WinPcap?)

14 years agoFrom RCB-ISIS on SourceForge: handle LynxOS, which has AF_PACKET but
guy [Fri, 14 Sep 2007 00:45:17 +0000 (00:45 +0000)] 
From RCB-ISIS on SourceForge: handle LynxOS, which has AF_PACKET but
puts the if_packet.h header in a different directory from Linux.

14 years agoUpdate with todays patches
ken [Wed, 12 Sep 2007 22:40:04 +0000 (22:40 +0000)] 
Update with todays patches

14 years agoFrom OpenBSD: use calloc() to avoid malloc(n * m) overflows.
guy [Wed, 12 Sep 2007 21:29:45 +0000 (21:29 +0000)] 
From OpenBSD: use calloc() to avoid malloc(n * m) overflows.

14 years agoFrom Max Laier: check whether the system has <net/pfvar.h> and:
guy [Wed, 12 Sep 2007 19:17:24 +0000 (19:17 +0000)] 
From Max Laier: check whether the system has <net/pfvar.h> and:

if it does, use that for the pf definitions;

if it doesn't, don't compile in pf support;

as both OpenBSD and FreeBSD have changed the pf definitions and header
format without changing the DLT value, so you can't reliably read
pflog-format libpcap files on a machine running an OS version other than
the one on which the file was generated.

14 years agoPrep for 0.9.8 release
ken [Tue, 11 Sep 2007 00:00:20 +0000 (00:00 +0000)] 
Prep for 0.9.8 release

14 years agoAdd DLT value for IPMI IPMB packets, beginning with the I2C slave
guy [Tue, 14 Aug 2007 20:57:49 +0000 (20:57 +0000)] 
Add DLT value for IPMI IPMB packets, beginning with the I2C slave
address, followed by the netFn and LUN, etc..  Requested by Chanthy

14 years agoNew DLT value for packets captured from u10 Networks boards; requested
guy [Mon, 13 Aug 2007 16:52:34 +0000 (16:52 +0000)] 
New DLT value for packets captured from u10 Networks boards; requested
by Phil Mulholland of u10.

14 years agoDLT_ERF, for encapsulating Endace ERF records and packet data for
guy [Tue, 7 Aug 2007 23:54:15 +0000 (23:54 +0000)] 
DLT_ERF, for encapsulating Endace ERF records and packet data for
various link-layer types.

14 years agoworking releasetar target.
mcr [Tue, 24 Jul 2007 02:35:15 +0000 (02:35 +0000)] 
working releasetar target.

14 years ago0.9.7 changelog.
mcr [Tue, 24 Jul 2007 02:27:32 +0000 (02:27 +0000)] 
0.9.7 changelog.

14 years agoVarious link-layer types, with a pseudo-header, for SITA
guy [Thu, 19 Jul 2007 06:20:53 +0000 (06:20 +0000)] 
Various link-layer types, with a pseudo-header, for SITA
(; requested by Fulko Hew (

14 years agoSo far, two people have submitted patches to "fix" the "memory leak" in
guy [Sun, 15 Jul 2007 19:55:04 +0000 (19:55 +0000)] 
So far, two people have submitted patches to "fix" the "memory leak" in
icode_to_fcode() by having it free the bpf_insn array before returning a
pointer to it.  Add a comment to icode_to_fcode() explaining why this is
not a leak in icode_to_fcode(), it's a leak in their program, and
indicating how to fix the leak.

14 years agoFrom Stephen Donnelly of Endace:
guy [Fri, 22 Jun 2007 06:43:58 +0000 (06:43 +0000)] 
From Stephen Donnelly of Endace:

This patch introduces support for the DAG ERF type

The patch also allows appropriate DAG cards (DAG 3.7T, DAG 7.1S)
to optionally produce DLT_MTP2_WITH_PHDR (139) traces when
capturing from channelised HDLC links, as an alternative to
DLT_MTP2 (140).  When using the new DLT, the 'DAG channel' is
recorded in the pcap record pseudo header as the 'link_number'.

Basic BPF filtering support for DLT_MTP2_WITH_PHDR is also

Fix some warnings.

Update the version numbers.

Rename SWAP_TS() to SWAPLL() and move it to pcap-int.h, to make the x.9
code more closely match the top-of-tree code.

14 years agoCheck for "/dev/bpf"; if we find it, use BPF as the capture mechanism,
guy [Fri, 15 Jun 2007 17:57:26 +0000 (17:57 +0000)] 
Check for "/dev/bpf"; if we find it, use BPF as the capture mechanism,
and assume it's a cloning device.

14 years agoAdded support for PPI.
gianluca [Thu, 14 Jun 2007 22:07:14 +0000 (22:07 +0000)] 
Added support for PPI.

14 years agoFixed the code that verifies if a PPI packet encapsulates 802.11 frames.
gianluca [Thu, 14 Jun 2007 20:54:12 +0000 (20:54 +0000)] 
Fixed the code that verifies if a PPI packet encapsulates 802.11 frames.
The bug was causing side effects even when the linktype was not PPI.

14 years agoAdded more code in the compilation for the PPI linktype: now we generate
gianluca [Thu, 14 Jun 2007 18:42:43 +0000 (18:42 +0000)] 
Added more code in the compilation for the PPI linktype: now we generate
code that discards non-802.11 packets.
A couple of mods to remove some compilation warnings with VC6.

14 years agoAdded some initial support for PPI filter generation.
gianluca [Wed, 13 Jun 2007 22:51:07 +0000 (22:51 +0000)] 
Added some initial support for PPI filter generation.

14 years agoPick up changes from NetBSD:
guy [Mon, 11 Jun 2007 09:52:04 +0000 (09:52 +0000)] 
Pick up changes from NetBSD:

    several files:

date: 2006/02/27 15:53:24;  author: drochner;  state: Exp;
avoid shadowing globals, for WARNS=2

date: 2006/02/27 15:55:30;  author: drochner;  state: Exp;
minor constification, good for WARNS=3 now

date: 2006/02/27 15:57:17;  author: drochner;  state: Exp;
NetBSD adaption:


-const pcap_strerror() for consistency


date: 2006/04/26 09:24:33;  author: tron;  state: Exp;
Add missing "const" keywords to match declarations in "pcap.h".

date: 2006/10/15 19:27:21;  author: christos;  state: Exp;
add a volatile variable to prevent vfork/longjmp clobbering.


date: 2006/05/17 17:48:36;  author: drochner;  state: Exp;
Make the optimizer use unsigned numbers as the kernel does.
While it is not agreed on that purely unsigned arithmetics is nice,
different behaviour of optimized and unoptimized code is less desirable.


date: 2006/02/27 15:51:38;  author: drochner;  state: Exp;
pull in from NetBSD's libpcap: use cloning bpf device on NetBSD

Have the configure script check for paths.h, so that we can include it
only if we have it, and use the cloning BPF device only if we're on
NetBSD *and* _PATH_BPF is defined (hopefully this will keep us from
using it on versions of NetBSD that don't have a cloning BPF device; if,
in the future, other OSes with BPF get cloning BPF devices, we can make
this work for them as well).

14 years agoAllocate DLT_ for 802.15.4 without any header munging, for Mikko
guy [Tue, 5 Jun 2007 18:07:03 +0000 (18:07 +0000)] 
Allocate DLT_ for 802.15.4 without any header munging, for Mikko

Fix a comment.

Also, propagate

  revision 1.156
  date: 2007-05-24 23:57:36 +0000;  author: hannes;  state: Exp;  lines: +13 -1
  add support for DLT_JUNIPER_ISM

to the x.9 branch.

14 years agoTests for the transport-layer protocol differ based on whether the
guy [Wed, 30 May 2007 18:06:38 +0000 (18:06 +0000)] 
Tests for the transport-layer protocol differ based on whether the
network-layer protocol is IPv4 or IPv6, regardless of the link-layer
protocol.  Therefore, we have to check for IPv4 and IPv6, even for
DLT_RAW - do so by checking the version field in the header.

14 years agoHeader for 802.16 MAC Common Part Sublayer plus a radiotap radio header;
guy [Fri, 4 May 2007 09:47:45 +0000 (09:47 +0000)] 
Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header;
requested by Charles Clancy.

14 years agoPrep for 0.9.6 release
ken [Mon, 23 Apr 2007 21:22:17 +0000 (21:22 +0000)] 
Prep for 0.9.6 release

14 years agoIt's LINKTYPE_PPI, not SAVEFILE_PPI.
guy [Thu, 19 Apr 2007 18:34:26 +0000 (18:34 +0000)] 

14 years agoReserved a DLT_ and SAVEFILE_ value for PPI (Per Packet Info)
gianluca [Thu, 19 Apr 2007 17:36:41 +0000 (17:36 +0000)] 
Reserved a DLT_ and SAVEFILE_ value for PPI (Per Packet Info)
encapsulated packets. Requested by Gianluca Varenni.

14 years agoDefine DLT_LOOP as 12 on OpenBSD, for compatibility with its definition.
guy [Thu, 5 Apr 2007 18:44:18 +0000 (18:44 +0000)] 
Define DLT_LOOP as 12 on OpenBSD, for compatibility with its definition.
(LINKTYPE_LOOP is still 108 on all platforms.)

14 years agoLinktype for IEEE 802.15.4, with address fields padded as done by Linux
guy [Tue, 3 Apr 2007 07:27:56 +0000 (07:27 +0000)] 
Linktype for IEEE 802.15.4, with address fields padded as done by Linux
drivers; requested by Juergen Schimmer.

Also, propagate some changes fromt he main branch, so the x.9 branch has
all the DLT_ and LINKTYPE_ values that the main branch does (so if any
OSes pick up any future x.9-branch releases, people with those OSes will
see the full list, and, if they miss the comments saying "ask
tcpdump-workers if you want a DLT_ value", will perhaps be less likely
to pick their own values and reuse a value we've already assigned).

14 years agoWork around a bug in some older versions of libpcap, where the snapshot
guy [Sun, 1 Apr 2007 17:08:02 +0000 (17:08 +0000)] 
Work around a bug in some older versions of libpcap, where the snapshot
length value in the file header is 14 less than the actual maximum
packet length.

14 years agoFrom Jung-uk Kim: add support for new FreeBSD BIOCSDIRECTION ioctl.
guy [Mon, 26 Mar 2007 01:38:46 +0000 (01:38 +0000)] 
From Jung-uk Kim: add support for new FreeBSD BIOCSDIRECTION ioctl.

14 years agoOn NetBSD, include <sys/param.h>; we need it to declare
guy [Sun, 11 Mar 2007 21:44:51 +0000 (21:44 +0000)] 
On NetBSD, include <sys/param.h>; we need it to declare

14 years agoFixed a bug in pcap_open_live(). The return value of PacketSetHwFilter was
gianluca [Mon, 19 Feb 2007 18:33:37 +0000 (18:33 +0000)] 
Fixed a bug in pcap_open_live(). The return value of PacketSetHwFilter was
not checked. This was the culprit of WinPcap failing to capture on wireless
adapters when in promiscuous mode. Most of the wireless adapters drivers
do not support the promiscuous hardware, and fail the HW filter OID request.
This failure was not detected by pcap_open_live(), and resulted in no packets
being captured as no hw filter was actually set at the driver level (no hw filter
means "reject all").

14 years agoFrom Florent Drouin: a Link Status Signal Unit is called an LSSU, not an
guy [Thu, 8 Feb 2007 07:17:25 +0000 (07:17 +0000)] 
From Florent Drouin: a Link Status Signal Unit is called an LSSU, not an
LSU.  (Leave "lsu" as an alias for backwards compatibility.)

14 years agoFrom Stephen Donnelly: change to handle some name changes in the DAG
guy [Thu, 8 Feb 2007 06:03:32 +0000 (06:03 +0000)] 
From Stephen Donnelly: change to handle some name changes in the DAG
library resulting from Endace switching to libtool.

14 years agoFrom Florent Drouin: clean up resources when an open fails.
guy [Thu, 1 Feb 2007 02:59:34 +0000 (02:59 +0000)] 
From Florent Drouin: clean up resources when an open fails.

In addition, clean up the allocation and freeing of the temporary
pathname string buffer.

Also, there's no need to set "md.device" (it's only used on Linux, and
even then used only with the old SOCK_PACKET sockets, where you have to
turn promiscuous mode off explicitly rather than having it turn off
automatically when you close the socket) or "md.timeout".

14 years agoFor wltN devices, open the corresponding enN device, so that, for
guy [Sat, 30 Dec 2006 09:54:16 +0000 (09:54 +0000)] 
For wltN devices, open the corresponding enN device, so that, for
example, if you don't have permission to open BPF devices, you don't end
up with a list of devices that includes the wltN devices but nothing

14 years agoOn Mac OS X, assume any device whose name begins with "wlt" can be
guy [Fri, 29 Dec 2006 19:34:48 +0000 (19:34 +0000)] 
On Mac OS X, assume any device whose name begins with "wlt" can be
captured on, without trying to open it - if "enN" is an AirPort device,
opening "wltN" is like opening "enN", except that the device is put into
monitor mode, which, for many devices, causes the device to deassociate
from the network with which it's associated.

14 years agoFrom Florent Drouin: add support for filtering on MTP2 frame types.
guy [Thu, 21 Dec 2006 19:45:03 +0000 (19:45 +0000)] 
From Florent Drouin: add support for filtering on MTP2 frame types.

15 years agoAdd a LINKTYPE_ value corresponding to DLT_IEEE802_16_MAC_CPS.
guy [Mon, 27 Nov 2006 18:37:25 +0000 (18:37 +0000)] 
Add a LINKTYPE_ value corresponding to DLT_IEEE802_16_MAC_CPS.

15 years agoDLT for IEEE 802.16 (WiMAX) MAC Common Part Sublayer; requested by Maria
guy [Mon, 27 Nov 2006 18:05:03 +0000 (18:05 +0000)] 
DLT for IEEE 802.16 (WiMAX) MAC Common Part Sublayer; requested by Maria
Cruz (<>).

15 years agobackout last commit - wrong tree
hannes [Tue, 24 Oct 2006 17:00:48 +0000 (17:00 +0000)] 
backout last commit - wrong tree

15 years agoadding a proper prototype for gen_slarp()
hannes [Tue, 24 Oct 2006 16:50:55 +0000 (16:50 +0000)] 
adding a proper prototype for gen_slarp()

15 years agoDLT_ value added for the Bluetooth HCI UART transport layer for Paolo
guy [Fri, 13 Oct 2006 08:56:07 +0000 (08:56 +0000)] 
DLT_ value added for the Bluetooth HCI UART transport layer for Paolo

Added DLT/DLT name table mappings and linktype values and DLT/linktype
mappings for USB and for the Bluetooth NCI UART transport layer.

Fix up indentation.

Copy some stuff for DLT_JUNIPER_VP and DLT_USB from the top of the main

15 years agoSquelch another valgrind complaint.
guy [Thu, 12 Oct 2006 17:26:58 +0000 (17:26 +0000)] 
Squelch another valgrind complaint.

15 years agoClarify that the structure that pcap_stats() fills in is pointed to by
guy [Thu, 12 Oct 2006 08:01:16 +0000 (08:01 +0000)] 
Clarify that the structure that pcap_stats() fills in is pointed to by
the second argument, in the hopes that people will be less likely to
expect the routine to do something other than crash if passed a null
pointer as the second argument.

15 years agoIn "add_or_find_if()", first check whether we already have an entry in
guy [Tue, 10 Oct 2006 07:09:40 +0000 (07:09 +0000)] 
In "add_or_find_if()", first check whether we already have an entry in
the list for the interface, and try to open the interface only if we
don't already have an interface, so if you have multiple addresses for
an interface, you don't open the interface for each of them.  (See
Wireshark bug 1151:

for the reason to do this; pcap_findalldevs() spent a *lot* of time and
energy opening en0 over and over again for all 64K-128K(!) addresses.)

15 years agoNo, that's not the right fix for the Linux kernel interface; the right
guy [Wed, 4 Oct 2006 18:17:07 +0000 (18:17 +0000)] 
No, that's not the right fix for the Linux kernel interface; the right
fix is to discard unread packets when changing the filter, as that fixes
not only the problem with the *first* filter you set, it fixes the
problem you get when *changing* the filter.  That fix is now in the code.

15 years agoAdd a link-layer type for USB.
guy [Tue, 3 Oct 2006 00:12:57 +0000 (00:12 +0000)] 
Add a link-layer type for USB.

15 years agoSquelch a valgrind warning.
guy [Thu, 28 Sep 2006 07:35:19 +0000 (07:35 +0000)] 
Squelch a valgrind warning.

15 years agoFrom Stephen Donnelly: add support for new DAG ERF types.
guy [Mon, 25 Sep 2006 18:18:30 +0000 (18:18 +0000)] 
From Stephen Donnelly: add support for new DAG ERF types.

15 years agoClean up indentation.
guy [Mon, 25 Sep 2006 18:17:26 +0000 (18:17 +0000)] 
Clean up indentation.

From Stephen Donnelly: add DLT_MTP2 to the table of DLT choices.

15 years agoFrom Stephen Donnelly:
guy [Mon, 25 Sep 2006 18:06:00 +0000 (18:06 +0000)] 
From Stephen Donnelly:

when building a shared library, build with "-fPIC" on Linux, to
support x86_64;

link with "$(CC) -shared" rather than "ld -shared" when building
a ".so" shared library (as would be done with ELF systems that
use GCC);

add an explicit "-ldag" when building the shared library, so the
DAG library dependency is explicit.

15 years agoupdated version
mcr [Tue, 19 Sep 2006 19:27:07 +0000 (19:27 +0000)] 
updated version

15 years agoUpdate for 0.9.5
ken [Tue, 19 Sep 2006 17:49:59 +0000 (17:49 +0000)] 
Update for 0.9.5

15 years agoCheck in the current version.
guy [Mon, 18 Sep 2006 17:36:33 +0000 (17:36 +0000)] 
Check in the current version.

15 years agoIndicate *which* ioctl failed.
guy [Mon, 18 Sep 2006 17:34:31 +0000 (17:34 +0000)] 
Indicate *which* ioctl failed.

15 years agoAdd off_ll to off_nl in cases where that's required and that we missed
guy [Wed, 13 Sep 2006 07:36:19 +0000 (07:36 +0000)] 
Add off_ll to off_nl in cases where that's required and that we missed
in earlier checkins, now that off_nl no longer includes off_ll.

Add in more comments explaining what we're doing.

15 years agoPropagate from the main branch:
guy [Wed, 13 Sep 2006 07:04:07 +0000 (07:04 +0000)] 
Propagate from the main branch:

revision 1.266
date: 2006-03-16 08:46:13 +0000;  author: hannes;  state: Exp;  lines: +3 -5
use gen_linktype() rather than a plain gen_cmp() for creating
the link-layer specific match code for MPLS packets

15 years agoPropagate from the main branch:
guy [Wed, 13 Sep 2006 07:02:15 +0000 (07:02 +0000)] 
Propagate from the main branch:

revision 1.265
date: 2006-03-16 08:42:14 +0000;  author: hannes;  state: Exp;  lines: +3 -2
OR_PACKET should match at the beginning of the packet and not at
the beginning of the packet plus variable-length link-layer

15 years agoMake off_linktype, off_nl, and off_nl_nosnap *not* include off_ll.
guy [Wed, 13 Sep 2006 06:57:07 +0000 (06:57 +0000)] 
Make off_linktype, off_nl, and off_nl_nosnap *not* include off_ll.

Make gen_load_llrel() add in off_ll if there isn't a variable-length
radio header, so the offset passed to it is always relative to the
beginning of the link-layer header, not the beginning of the packet.
Don't add in off_ll when calling it.

Those changes centralize the addition of off_ll, so it's only done in
one place (rather than twice, where it was done before, meaning that the
offsets were wrong for the Prism and AVS headers as they had 2*off_ll
rather than just off_ll, as off_ll was added twice).

15 years agoAdded support for DLT_IEEE802_11 and DLT_IEEE802_11_RADIO link layers in windows
gianluca [Wed, 9 Aug 2006 19:18:41 +0000 (19:18 +0000)] 
Added support for DLT_IEEE802_11 and DLT_IEEE802_11_RADIO link layers in windows

15 years agoAdded a new DLT and LINKTYPE value for ARINC 653 Interpartition
gianluca [Thu, 27 Jul 2006 21:06:17 +0000 (21:06 +0000)] 
Added a new DLT and LINKTYPE value for ARINC 653 Interpartition
Communication messages.

15 years agoFixed a typo in a DLT value: it should start with DLT_ and not LINKTYPE_
gianluca [Tue, 25 Jul 2006 21:37:41 +0000 (21:37 +0000)] 
Fixed a typo in a DLT value: it should start with DLT_ and not LINKTYPE_

15 years agoRedefined DLT_CAN20B and LINKTYPE_CAN20B as #190 (as this is the
gianluca [Wed, 19 Jul 2006 20:59:14 +0000 (20:59 +0000)] 
Redefined DLT_CAN20B and LINKTYPE_CAN20B as #190 (as this is the
right value for CAN).
Added the definition of DLT_A429 and LINKTYPE_A429 as #184.
Added these two link layers in the global array dlt_choices.

15 years agoC89 says that the result of shifting an N-bit value by >= N bits is
guy [Sun, 28 May 2006 20:13:42 +0000 (20:13 +0000)] 
C89 says that the result of shifting an N-bit value by >= N bits is
undefined; we want it to be zero, so we explicitly check for a 32-bit
shift count and clear the netmask in that case.

15 years ago[From Hannes] add support for DLT_JUNIPER_VP.
gianluca [Sat, 20 May 2006 00:34:41 +0000 (00:34 +0000)] 
[From Hannes] add support for DLT_JUNIPER_VP.
Added a new DLT and LINKTYPE value for CAN v2.0B frames.

15 years agoFrom Ollie Wild: if we're bound to an interface, discard incoming
guy [Fri, 7 Apr 2006 08:02:45 +0000 (08:02 +0000)] 
From Ollie Wild: if we're bound to an interface, discard incoming
packets that didn't arrive on that interface, so packets from other
interfaces that get onto the socket queue before we bind the socket to
the interface don't get supplied to the application (binding the socket
doesn't discard incoming packets).

15 years agoFrom Stephen Donnelly:
guy [Fri, 7 Apr 2006 07:08:50 +0000 (07:08 +0000)] 
From Stephen Donnelly:

If the DAG API supports asking a card for the set of ERF types
it supports, use that capability, to handle cards that support
multiple ERF types.  This is to support channelised/fractional

Don't set the snapshot length - some DAG cards support multiple
capture streams, but the snapshot length is global, so it'd
affect other captures.

Update README.dag.

15 years agoputmsg() returns 0 or -1, not the number of bytes written.
guy [Tue, 4 Apr 2006 05:33:02 +0000 (05:33 +0000)] 
putmsg() returns 0 or -1, not the number of bytes written.

15 years agoIf we succeed in getting packet statistics with the PACKET_STATISTICS
guy [Thu, 23 Feb 2006 07:35:35 +0000 (07:35 +0000)] 
If we succeed in getting packet statistics with the PACKET_STATISTICS
"getsockopt()" argument, return those statistics, rather than falling
through and returning the statistics the way we would if
PACKET_STATISTICS weren't supported.

15 years agoFixed some capitalization that could cause problems with cross compilers.
gianluca [Wed, 22 Feb 2006 17:09:54 +0000 (17:09 +0000)] 
Fixed some capitalization that could cause problems with cross compilers.

15 years agoFixed some capitalization that could cause problems cross compiling under linux.
gianluca [Wed, 22 Feb 2006 17:09:32 +0000 (17:09 +0000)] 
Fixed some capitalization that could cause problems cross compiling under linux.
Updated the copyright notice.

15 years agocode cosmetics: clean up some if() chains and replace by switch() statements
hannes [Wed, 22 Feb 2006 10:39:49 +0000 (10:39 +0000)] 
code cosmetics: clean up some if() chains and replace by switch() statements

15 years agocode cosmetics: clean up some if() chains and replace by switch() statements
hannes [Wed, 22 Feb 2006 10:23:19 +0000 (10:23 +0000)] 
code cosmetics: clean up some if() chains and replace by switch() statements

15 years agoClean up some comments, and give more details so people understand what
guy [Thu, 9 Feb 2006 22:26:49 +0000 (22:26 +0000)] 
Clean up some comments, and give more details so people understand what
they do, and don't, have to do about 32-bit vs. 64-bit platforms in

15 years agoFrom Daniele Orlandi <>: add support for capturing
guy [Sun, 22 Jan 2006 20:12:09 +0000 (20:12 +0000)] 
From Daniele Orlandi <>: add support for capturing
LAPD frames with vISDN.