Subject: importing libpcap 0.8.3, UPDATE
To: None <tech-net@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: tech-net
Date: 09/22/2004 17:56:05
On Sun, Sep 19, 2004 at 10:41:12AM -0500, David Young wrote:
> I am going to import libpcap 0.8.3 and tcpdump 3.8.3, and then apply my
> patches for radiotap (802.11 radio capture header) support to tcpdump.
> Any problems with that?
>
> (Right now we have libpcap 0.4 and tcpdump 3.7.1.)
I have resolved all conflicts on libpcap-0.8.3. This was easy except for
lib/libpcap/gencode.c, which contained a lot of NetBSD-private patches
from thorpej, itojun, and others. I have carefully gone through the
commit logs and patches on that file to make sure that I did not discard
any important patches. Except for one instance where NetBSD's libpcap
API diverges from tcpdump.org's API, I protected all of NetBSD's patches.
Here is an overview:
Do we still want to diverge from the tcpdump.org API, as in this revision?
----------------------------
revision 1.24
date: 2000/10/06 16:39:24; author: thorpej; state: Exp; lines: +53 -2
Add pcap_compile_nopcap() from the most recent libpcap release
from tcpdump.org, although with a slightly different signature.
The tcpdump.org version has no way to report an error string back
to the caller. This version takes an additional "errbuf" argument
(similar to pcap_open_*()).
Ignoring for now:
----------------------------
revision 1.14
date: 1999/07/02 16:03:41; author: simonb; state: Exp; lines: +3 -3
More trailing white space.
Outmoded by other patches:
----------------------------
revision 1.11
date: 1999/05/11 06:36:26; author: thorpej; state: Exp; lines: +7 -7
Math is hard.
It is reasonable to assume that these are in libpcap-0.8.3:
----------------------------
revision 1.32
date: 2002/09/22 16:13:01; author: thorpej; state: Exp; lines: +7 -2
* Add support for DLT_IEEE802_11.
* When opening a live pcap, obtain the list of supported DLTs from
the BPF.
* Add pcap_list_datalinks() to obtain a list of supported DLTs
supported by the interface associated with the pcap descriptor.
* Add pcap_set_datalink() to set the current DLT of the pcap.
* Bump shlib 1.2 -> 1.3; new functions added.
From David Young <dyoung@ojctech.com>, with some minor changes by me.
----------------------------
revision 1.31
date: 2002/08/26 11:21:18; author: yamt; state: Exp; lines: +8 -8
sync partly with tcpdump.org. ok'ed by itojun
patches #454 from yamt@mwd.biglobe.ne.jp
- avoid optimization involving subtract operations
- correct optimization of bitwise operations
TODO: re-introduce subtract optimization
----------------------------
revision 1.13
date: 1999/07/02 10:05:22; author: itojun; state: Exp; lines: +807 -18
support IPv6 address and IPv6 protocols.
"tcp" will match both IPv4 TCP and IPv6 TCP.
"ip6" will match IPv6.
you can chase header chain by using "protochain" instead of "proto"
(but bpf code is not optimizable in this case)
commit to tcpdump will follow.
I've sent this fix to LBL guys to get no response. I wonder why it was.
----------------------------
revision 1.5
date: 1996/12/13 08:26:03; author: mikel; state: Exp; lines: +291 -160
Merge libpcap-0.2.1.
Includes numerous improvements (see CHANGES), fixes PR bin/2031.
----------------------------
revision 1.2
date: 1995/03/06 11:38:21; author: mycroft; state: Exp; lines: +2 -0
branches: 1.2.6;
Port to NetBSD, and add NetBSD RCS tags.
----------------------------
revision 1.1
date: 1995/03/06 11:33:00; author: mycroft; state: Exp;
branches: 1.1.1;
Initial revision
----------------------------
revision 1.1.1.5
date: 2004/09/19 21:57:50; author: dyoung; state: Exp; lines: +2 -2
Import libpcap 0.8.3 from tcpdump.org---getting it right this time, I hope.
----------------------------
revision 1.1.1.4
date: 2004/09/19 21:31:41; author: dyoung; state: Exp; lines: +4675 -1093
Import libpcap 0.8.3 from tcpdump.org
----------------------------
revision 1.1.1.3
date: 1997/10/03 15:38:40; author: christos; state: Exp; lines: +73 -14
Import LBL's libpcap 0.4a3
----------------------------
revision 1.1.1.2
date: 1996/12/11 08:15:31; author: mikel; state: Exp; lines: +290 -159
Import of LBL libpcap version 0.2.1
----------------------------
revision 1.1.1.1
date: 1995/03/06 11:33:00; author: mycroft; state: Exp; lines: +0 -0
Import LBL libpcap, version 0.0 patch level 3.
----------------------------
revision 1.2.6.1
date: 1996/06/05 18:04:23; author: cgd; state: Exp; lines: +62 -62
pull up from trunk:
>switch from long to int32_t, where appropriate, so that this actually
>works on NetBSD/Alpha for non-trivial filters.
----------------------------
revision 1.17.2.1
date: 1999/12/27 18:30:06; author: wrstuden; state: Exp; lines: +124 -28
Pull up to last week's -current.
----------------------------
revision 1.6.2.1
date: 1997/03/11 16:23:40; author: is; state: Exp; lines: +5 -1
Convert to new ARP code.
Needs more work to support ARCnet, Metricom, ATM etc.
=============================================================================
Survived import:
----------------------------
revision 1.33
date: 2002/12/19 16:33:47; author: hannken; state: Exp; lines: +54 -2
Add support for VLAN (IEEE 802.1Q) frames.
Built after libpcap-0.7 from tcpdump-3.7.1.
Approved by: Jason R. Thorpe <thorpej@netbsd.org>
----------------------------
revision 1.34
date: 2004/06/25 12:22:23; author: itojun; state: Exp; lines: +144 -2
support format for if_pflog.c (new format only/old format not supported)
Peter Postma
----------------------------
revision 1.29
date: 2001/06/01 15:49:53; author: itojun; state: Exp; lines: +6 -3
compile without INET6. PR 13080
----------------------------
revision 1.28
date: 2001/04/29 10:25:50; author: martin; state: Exp; lines: +8 -8
Adapt to (temporary) DLT_PPP_ETHER useage by the pppoe code in tree
now. This needs to be fixed when a generic PPP sheme is implemented.
----------------------------
revision 1.27
date: 2001/01/19 09:02:40; author: kleink; state: Exp; lines: +21 -2
Add VRRP support.
----------------------------
revision 1.26
date: 2001/01/06 02:11:18; author: christos; state: Exp; lines: +3 -4
remove redundant declarations.
----------------------------
revision 1.23
date: 2000/04/14 14:26:35; author: itojun; state: Exp; lines: +17 -6
more fallback #define. more friendly message on "ip host ip6only-host"
or "ip6 host ip4only-host". (sync with tcpdump.org)
----------------------------
revision 1.22
date: 2000/03/01 03:47:48; author: itojun; state: Exp; lines: +11 -5
fix "ip host foo" or "ip6 host foo" where foo has
both A and AAAA. fix from Bill Fenner, FreeBSD PR: 17083.
----------------------------
revision 1.21
date: 1999/12/13 01:44:31; author: itojun; state: Exp; lines: +30 -27
be more pedant. remove unused vars and such.
don't use s6_addr{8,16,32} directly, they are not in standard.
hide not-supposed-to-be-visible functions as static.
increase shlib minor.
----------------------------
revision 1.20
date: 1999/10/25 16:39:37; author: is; state: Exp; lines: +56 -2
Add code to do link level address matching for ARCnet interfaces.
ARCnet link level addresses are encoded as :HH (``:'' followed by a
byte encoded in hexadecimal notation).
----------------------------
revision 1.19
date: 1999/10/18 19:44:12; author: is; state: Exp; lines: +37 -3
Limited support for matching on ARCnet payload:
- oldstyle and PHDS IPv4+ARP; RARP, IPv6, Appletalk are matched now.
- in case this is an unfragmented or first-fragment IPv4, IPv6, ARP, RARP or
Appletalk packet, matching inside the payload is possible to the extent
already supported by tcpdump/libpcap. For 2nd and next fragments, this
won't work; it also won't work for oldstyle (RFC1051) IPv4 and ARP.
----------------------------
revision 1.18
date: 1999/10/05 20:37:23; author: is; state: Exp; lines: +8 -3
First part of ARCnet support.
Matching for anything won't work (as we need to teach the stuff about
variable length link level headers), but printing is fine.
----------------------------
revision 1.17
date: 1999/07/25 05:52:16; author: itojun; state: Exp; lines: +9 -3
branches: 1.17.2;
add several ETHERTYPE_IPV6 case.
add DLT_PPP_SERIAL case into link type recognition,
hoping this to fix ppp packet recognition problem.
----------------------------
revision 1.16
date: 1999/07/25 00:15:22; author: itojun; state: Exp; lines: +13 -3
support for PPP_IPV6.
----------------------------
revision 1.15
date: 1999/07/05 20:04:50; author: mjacob; state: Exp; lines: +3 -3
quiesce the alpha compiler
----------------------------
revision 1.10
date: 1999/05/11 02:20:56; author: thorpej; state: Exp; lines: +17 -2
Handle the new NetBSD PPP data link types.
----------------------------
revision 1.9
date: 1998/07/26 07:23:53; author: explorer; state: Exp; lines: +7 -2
make DLT_HDLC interfaces work
----------------------------
revision 1.8
date: 1997/10/03 15:53:05; author: christos; state: Exp; lines: +72 -15
Resolve conflicts
----------------------------
revision 1.7
date: 1997/03/15 18:34:01; author: is; state: Exp; lines: +5 -1
New ARP system, supports IPv4 over any hardware link.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.
For the detailed change history, look at the commit log entries for
the is-newarp branch.
----------------------------
revision 1.6
date: 1997/01/23 14:02:58; author: mrg; state: Exp; lines: +4 -3
branches: 1.6.2;
- convert unsafe strcpy(), strcat() and sprintf() to the `n' versions.
- some KNF.
----------------------------
revision 1.4
date: 1996/05/29 04:05:52; author: cgd; state: Exp; lines: +4 -4
use 'ALIGN' from <sys/param.h> rather than generating a custom alignment expr
----------------------------
revision 1.3
date: 1996/05/26 23:50:37; author: cgd; state: Exp; lines: +61 -61
switch from long to int32_t, where appropriate, so that this actually
works on NetBSD/Alpha for non-trivial filters.
Lost in import, but easily repaired:
----------------------------
revision 1.30
date: 2002/05/16 19:57:22; author: wiz; state: Exp; lines: +3 -3
Space before comment after #endif.
----------------------------
revision 1.12
date: 1999/05/15 17:39:07; author: thorpej; state: Exp; lines: +18 -2
The only two data link types that support the "inbound" and "outbound"
qualifiers are DLT_SLIP and DLT_PPP (i.e. old-style serial encap PPP).
If an attempt to use these qualifiers is used for any other link type,
cause a BPF program compilation error.
Lost in import, but painfully repaired:
----------------------------
revision 1.25
date: 2000/12/28 22:04:22; author: thorpej; state: Exp; lines: +77 -17
Add support for the DLT_RAWAF() data link type.
Dave
--
David Young OJC Technologies
dyoung@ojctech.com Urbana, IL * (217) 278-3933