History log of /openbsd-current/usr.sbin/tcpdump/Makefile
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.67 04-Dec-2020 mvs

Don't link tcpdump(8) with libl and remove reference to `yydebug'.

From Martin Vahlensieck.


Revision tags: OPENBSD_6_8_BASE
# 1.66 21-Jun-2020 dlg

wire the wireguard packet printer into tcpdump.

from Matt Dunwoodie and Jason A. Donenfeld


Revision tags: OPENBSD_6_7_BASE
# 1.65 15-Apr-2020 remi

add support for printing RfC 2332 NBMA Next Hop Resolution Protocol (NHRP)

ok dlg@


# 1.64 03-Dec-2019 dlg

add support for printing RFC 8300 Network Service Header (NSH)

ok deraadt@


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.63 03-Feb-2018 mpi

Simple USBPcap parser for tcpdump(8). Raw dumps can be nicely analysed
in wireshark.

ok deraadt@, dlg@


# 1.62 30-Oct-2017 mpi

Kill <net/slip.h>.

The ioctl(2) it defines is not supported since a long time and most of
its defines are already present in tcpdump(8).

ok jca@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.61 18-Nov-2016 reyk

Updates tcpdump's OpenFlow printer to use the string maps from switchd
(manually synced). Also make the output a bit more like other printers.

OK rzalamena@


# 1.60 22-Oct-2016 rzalamena

Teach tcpdump(8) how to read OpenFlow packets. This initial implementation
supports the following message types: hello, error, echo request/reply,
feature request/reply, set config, packet-in, packet-out, flow removed and
flow mod.

We currently only support printing this messages for OpenFlow 1.3.5, however
it is possible to reuse some functions and get other versions working too.

ok deraadt@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.59 14-Oct-2015 guenther

Remove conditional compilation and #defines around signal handling
Don't catch signals that were ignored on entry
Suppress SIGCHLD if our kid is stopped: we don't care and it's not an error

ok millert@


# 1.58 13-Oct-2015 stsp

Don't use exp2f(), it breaks build on vax. Use a shift instead.
reported by deraadt@


# 1.57 10-Oct-2015 stsp

Make tcpdump(1) print more information from the HT Capabilities element.
tweak + ok sthen@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.56 30-Jun-2014 deraadt

remove backwards compat layer for alpha osf1. back then compilers and
the parsers sucked, so byte misalignment repair was requested. These
days it means the parsers should improve.
ok lteo


# 1.55 20-Jun-2014 lteo

Import in_cksum_shouldbe() from mainline tcpdump; this is needed by my
upcoming commit which will fix and improve the display of bad checksums
for the major protocols.

ok henning@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.54 19-Jun-2013 lteo

Do not install pcap-int.h to /usr/include as it is an internal library
header (pointed out by matthew@). Let only pflogd and tcpdump include
pcap-int.h directly since they need it for privilege separation.

"looks good" sthen
feedback/ok deraadt matthew millert


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.53 04-Nov-2009 jsing

Add support to tcpdump for decoding the GPRS Tunnelling Protocol (GTP),
used to carry GPRS data over IP for GSM and UMTS networks. The decoder
understands GTPv0, GTPv0', GTPv1-C, GTPv1-U and GTPv1' traffic, however
at this stage not all TLV fields are fully decoded.

This work has been kindly sponsored by SystemNet AS (www.systemnet.no).

"commit" deraadt@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.52 16-Oct-2008 mpf

Add support for IEEE "slow protocols" LACP, MARKER as per 802.3ad.
Code from tcpdump.org with cleanup and shrinkage by me.
Help and ideas for extra sanity checks from canacar@
OK canacar@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.51 23-May-2006 stevesk

add VLAN Query Protocol (VQP) dissector; ok canacar@ markus@


# 1.50 28-Mar-2006 reyk

Add a simple printer for IEEE 802.1AB LLDP, the Link Layer Discovery
Protocol.

LLDP is used by some switch vendors as a replacement for the non-free
Cizzco Discovery Protocol (CDP) due to some Cisco patentry...

ok brad@


Revision tags: OPENBSD_3_9_BASE
# 1.49 22-Nov-2005 reyk

add printer for IAPP and hostapd(8) messages

ok canacar@, tested by aanriot@ and others


# 1.48 08-Oct-2005 canacar

Add a best effort mpls decoder. From Jason L. Wright.
Since the encapsulated protocol information is not always
available in the MPLS tag stack. The decoder attempts
to guess the protocol.
ok brad@


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.47 07-Mar-2005 reyk

add a printer for 802.11 and for additional radiotap headers,
use -y IEEE802_11 or IEEE802_11_RADIO if supported by the driver.

ok canacar@


Revision tags: OPENBSD_3_6_BASE
# 1.46 28-Apr-2004 mcbride

Make tcpdump print carp as carp. Printing vrrp can be forced with -T vrrp.

ok markus@ pb@


Revision tags: OPENBSD_3_5_BASE
# 1.45 02-Feb-2004 otto

Do away with non-aligned memory accesses.
ok deraadt@ hshoexer@


# 1.44 31-Jan-2004 otto

general cleanup and better SIGCHLD handling from millert@
ok canacar@


# 1.43 28-Jan-2004 canacar

privilege separated tcpdump, joint work with otto@

tested by avsm@ vincent@ dhartmei@ markus@ hshoexer@ and others
go for it deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.42 21-Aug-2003 frantzen

print the operating system of TCP SYN packets with the -o option


# 1.41 17-Jul-2003 markus

add support for ESP decryption; ok deraadt@; feedback mickey@;
many manpage fixes from jmc@


# 1.40 11-Jun-2003 markus

support for NAT-T (draft-ietf-ipsec-udp-encaps-06.txt); ok deraadt@


# 1.39 22-May-2003 pvalchev

remove -Werror; ok millert


Revision tags: OPENBSD_3_3_BASE
# 1.38 30-Nov-2002 mickey

pfsync support; deraadt@ ok


# 1.37 30-Nov-2002 deraadt

stop breaking the damn tree mickey


# 1.36 29-Nov-2002 mickey

tcpdump support for pfsync; henning@ ok


Revision tags: OPENBSD_3_2_BASE
# 1.35 18-Sep-2002 jakob

remove egp support; unresolved non-bsd license for a decoder of protocol that
noone uses anymore is not worth the amount of work needed to be resolved.


Revision tags: OPENBSD_3_1_BASE
# 1.34 22-Jan-2002 mickey

HSRP dissector, from Julian Cowley <julian@lava.net> via tcpdump.org


# 1.33 06-Nov-2001 art

sparc64 needs LBL_ALIGN.


Revision tags: OPENBSD_3_0_BASE
# 1.32 11-Jul-2001 pvalchev

remove mips leftovers; ok brad


# 1.31 25-Jun-2001 provos

interpret DLT_PFLOG


# 1.30 25-Jun-2001 itojun

disable smb decoder, as there seems to be fewer bound checks than needed


Revision tags: OPENBSD_2_9_BASE
# 1.29 08-Apr-2001 jakob

add support for printing cdp (Cisco Discovery Protocol), from tcpdump.org


# 1.28 06-Mar-2001 jakob

add lwres (BINDv9 resolver) printing. from tcpdump.org and modified by ho@


# 1.27 05-Feb-2001 jason

etherip printing code... handles draft (v2) and current (v3)


# 1.26 07-Dec-2000 mickey

timed printing; from Ben Smithurst <ben@scientia.demon.co.uk>; via tcpdump.org


# 1.25 07-Dec-2000 mickey

smb printing; from Andrew Tridgell; via tcpdump.org


# 1.24 07-Dec-2000 mickey

add vrrp printing; from tcpdump.org


Revision tags: OPENBSD_2_8_BASE
# 1.23 19-Oct-2000 jason

code for printing bridge spanning tree packets
also fix a bug where llc encoded frames are hex dumped twice when -x is used


# 1.22 03-Oct-2000 ho

Add -Wall -Werror to CFLAGS. (niklas@, jakob@ ok)


Revision tags: OPENBSD_2_7_BASE
# 1.21 26-Apr-2000 jakob

INET6
DHCP/BOOTP
tcp & udp checksum detection
numerous bugfixes


# 1.20 16-Jan-2000 jakob

enable INET6


# 1.19 16-Jan-2000 jakob

BGP support (from KAME/WIDE). INET6 parts not done yet.


# 1.18 16-Jan-2000 jakob

Mobile IP support (from KAME/NetBSD)


# 1.17 16-Jan-2000 jakob

L2TP support (from KAME)


Revision tags: OPENBSD_2_6_BASE
# 1.16 16-Sep-1999 brad

add raw support


# 1.15 11-Aug-1999 deraadt

HAVE_FDDI


# 1.14 28-Jul-1999 jakob

- Merge some changes from tcpdump 3.4
-a flag; attempt to convert network and broadcast addresses to names
Improved signal handling
Miscellaneous fixes and typos
OSPF MD5 authentication support

- -X flag; emacs-hexl print (including ascii)

- Add ECN bits to TCP and IP headers

- IKE & IPsec (ESP & AH) support

OK deraadt@


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE
# 1.13 25-Jun-1998 mickey

add cisco netflow proto printing; not tested w/ version 5, but should work anyways


# 1.12 11-Jun-1998 provos

handle IPSec processed packets (DLT_ENC) in libpcap, display them with
tcpdump + additional info (SPI + which type of transforms where passed).


Revision tags: OPENBSD_2_3_BASE
# 1.11 26-Feb-1998 niklas

Use YP ethers


Revision tags: OPENBSD_2_2_BASE
# 1.10 21-Sep-1997 deraadt

$OpenBSD$


# 1.9 31-Jul-1997 tqbf

Add RADIUS printing support. Blech.


# 1.8 14-Jul-1997 deraadt

HAVE_NET_SLIP_H; PR286, felix@mamba.pond.sub.org


# 1.7 06-Jul-1997 niklas

Some architectures need strict alignment


Revision tags: OPENBSD_2_1_BASE
# 1.6 12-Dec-1996 bitblt

*** empty log message ***


# 1.5 12-Nov-1996 mickey

add NetBIOS printing.


Revision tags: OPENBSD_2_0_BASE
# 1.4 13-Jul-1996 mickey

it is 3.2 now.


# 1.3 10-Jun-1996 deraadt

sync to latest


# 1.2 04-Mar-1996 mickey

Updating to the latest LBL release.
Sun's SKIP support added.


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.66 21-Jun-2020 dlg

wire the wireguard packet printer into tcpdump.

from Matt Dunwoodie and Jason A. Donenfeld


Revision tags: OPENBSD_6_7_BASE
# 1.65 15-Apr-2020 remi

add support for printing RfC 2332 NBMA Next Hop Resolution Protocol (NHRP)

ok dlg@


# 1.64 03-Dec-2019 dlg

add support for printing RFC 8300 Network Service Header (NSH)

ok deraadt@


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.63 03-Feb-2018 mpi

Simple USBPcap parser for tcpdump(8). Raw dumps can be nicely analysed
in wireshark.

ok deraadt@, dlg@


# 1.62 30-Oct-2017 mpi

Kill <net/slip.h>.

The ioctl(2) it defines is not supported since a long time and most of
its defines are already present in tcpdump(8).

ok jca@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.61 18-Nov-2016 reyk

Updates tcpdump's OpenFlow printer to use the string maps from switchd
(manually synced). Also make the output a bit more like other printers.

OK rzalamena@


# 1.60 22-Oct-2016 rzalamena

Teach tcpdump(8) how to read OpenFlow packets. This initial implementation
supports the following message types: hello, error, echo request/reply,
feature request/reply, set config, packet-in, packet-out, flow removed and
flow mod.

We currently only support printing this messages for OpenFlow 1.3.5, however
it is possible to reuse some functions and get other versions working too.

ok deraadt@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.59 14-Oct-2015 guenther

Remove conditional compilation and #defines around signal handling
Don't catch signals that were ignored on entry
Suppress SIGCHLD if our kid is stopped: we don't care and it's not an error

ok millert@


# 1.58 13-Oct-2015 stsp

Don't use exp2f(), it breaks build on vax. Use a shift instead.
reported by deraadt@


# 1.57 10-Oct-2015 stsp

Make tcpdump(1) print more information from the HT Capabilities element.
tweak + ok sthen@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.56 30-Jun-2014 deraadt

remove backwards compat layer for alpha osf1. back then compilers and
the parsers sucked, so byte misalignment repair was requested. These
days it means the parsers should improve.
ok lteo


# 1.55 20-Jun-2014 lteo

Import in_cksum_shouldbe() from mainline tcpdump; this is needed by my
upcoming commit which will fix and improve the display of bad checksums
for the major protocols.

ok henning@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.54 19-Jun-2013 lteo

Do not install pcap-int.h to /usr/include as it is an internal library
header (pointed out by matthew@). Let only pflogd and tcpdump include
pcap-int.h directly since they need it for privilege separation.

"looks good" sthen
feedback/ok deraadt matthew millert


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.53 04-Nov-2009 jsing

Add support to tcpdump for decoding the GPRS Tunnelling Protocol (GTP),
used to carry GPRS data over IP for GSM and UMTS networks. The decoder
understands GTPv0, GTPv0', GTPv1-C, GTPv1-U and GTPv1' traffic, however
at this stage not all TLV fields are fully decoded.

This work has been kindly sponsored by SystemNet AS (www.systemnet.no).

"commit" deraadt@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.52 16-Oct-2008 mpf

Add support for IEEE "slow protocols" LACP, MARKER as per 802.3ad.
Code from tcpdump.org with cleanup and shrinkage by me.
Help and ideas for extra sanity checks from canacar@
OK canacar@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.51 23-May-2006 stevesk

add VLAN Query Protocol (VQP) dissector; ok canacar@ markus@


# 1.50 28-Mar-2006 reyk

Add a simple printer for IEEE 802.1AB LLDP, the Link Layer Discovery
Protocol.

LLDP is used by some switch vendors as a replacement for the non-free
Cizzco Discovery Protocol (CDP) due to some Cisco patentry...

ok brad@


Revision tags: OPENBSD_3_9_BASE
# 1.49 22-Nov-2005 reyk

add printer for IAPP and hostapd(8) messages

ok canacar@, tested by aanriot@ and others


# 1.48 08-Oct-2005 canacar

Add a best effort mpls decoder. From Jason L. Wright.
Since the encapsulated protocol information is not always
available in the MPLS tag stack. The decoder attempts
to guess the protocol.
ok brad@


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.47 07-Mar-2005 reyk

add a printer for 802.11 and for additional radiotap headers,
use -y IEEE802_11 or IEEE802_11_RADIO if supported by the driver.

ok canacar@


Revision tags: OPENBSD_3_6_BASE
# 1.46 28-Apr-2004 mcbride

Make tcpdump print carp as carp. Printing vrrp can be forced with -T vrrp.

ok markus@ pb@


Revision tags: OPENBSD_3_5_BASE
# 1.45 02-Feb-2004 otto

Do away with non-aligned memory accesses.
ok deraadt@ hshoexer@


# 1.44 31-Jan-2004 otto

general cleanup and better SIGCHLD handling from millert@
ok canacar@


# 1.43 28-Jan-2004 canacar

privilege separated tcpdump, joint work with otto@

tested by avsm@ vincent@ dhartmei@ markus@ hshoexer@ and others
go for it deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.42 21-Aug-2003 frantzen

print the operating system of TCP SYN packets with the -o option


# 1.41 17-Jul-2003 markus

add support for ESP decryption; ok deraadt@; feedback mickey@;
many manpage fixes from jmc@


# 1.40 11-Jun-2003 markus

support for NAT-T (draft-ietf-ipsec-udp-encaps-06.txt); ok deraadt@


# 1.39 22-May-2003 pvalchev

remove -Werror; ok millert


Revision tags: OPENBSD_3_3_BASE
# 1.38 30-Nov-2002 mickey

pfsync support; deraadt@ ok


# 1.37 30-Nov-2002 deraadt

stop breaking the damn tree mickey


# 1.36 29-Nov-2002 mickey

tcpdump support for pfsync; henning@ ok


Revision tags: OPENBSD_3_2_BASE
# 1.35 18-Sep-2002 jakob

remove egp support; unresolved non-bsd license for a decoder of protocol that
noone uses anymore is not worth the amount of work needed to be resolved.


Revision tags: OPENBSD_3_1_BASE
# 1.34 22-Jan-2002 mickey

HSRP dissector, from Julian Cowley <julian@lava.net> via tcpdump.org


# 1.33 06-Nov-2001 art

sparc64 needs LBL_ALIGN.


Revision tags: OPENBSD_3_0_BASE
# 1.32 11-Jul-2001 pvalchev

remove mips leftovers; ok brad


# 1.31 25-Jun-2001 provos

interpret DLT_PFLOG


# 1.30 25-Jun-2001 itojun

disable smb decoder, as there seems to be fewer bound checks than needed


Revision tags: OPENBSD_2_9_BASE
# 1.29 08-Apr-2001 jakob

add support for printing cdp (Cisco Discovery Protocol), from tcpdump.org


# 1.28 06-Mar-2001 jakob

add lwres (BINDv9 resolver) printing. from tcpdump.org and modified by ho@


# 1.27 05-Feb-2001 jason

etherip printing code... handles draft (v2) and current (v3)


# 1.26 07-Dec-2000 mickey

timed printing; from Ben Smithurst <ben@scientia.demon.co.uk>; via tcpdump.org


# 1.25 07-Dec-2000 mickey

smb printing; from Andrew Tridgell; via tcpdump.org


# 1.24 07-Dec-2000 mickey

add vrrp printing; from tcpdump.org


Revision tags: OPENBSD_2_8_BASE
# 1.23 19-Oct-2000 jason

code for printing bridge spanning tree packets
also fix a bug where llc encoded frames are hex dumped twice when -x is used


# 1.22 03-Oct-2000 ho

Add -Wall -Werror to CFLAGS. (niklas@, jakob@ ok)


Revision tags: OPENBSD_2_7_BASE
# 1.21 26-Apr-2000 jakob

INET6
DHCP/BOOTP
tcp & udp checksum detection
numerous bugfixes


# 1.20 16-Jan-2000 jakob

enable INET6


# 1.19 16-Jan-2000 jakob

BGP support (from KAME/WIDE). INET6 parts not done yet.


# 1.18 16-Jan-2000 jakob

Mobile IP support (from KAME/NetBSD)


# 1.17 16-Jan-2000 jakob

L2TP support (from KAME)


Revision tags: OPENBSD_2_6_BASE
# 1.16 16-Sep-1999 brad

add raw support


# 1.15 11-Aug-1999 deraadt

HAVE_FDDI


# 1.14 28-Jul-1999 jakob

- Merge some changes from tcpdump 3.4
-a flag; attempt to convert network and broadcast addresses to names
Improved signal handling
Miscellaneous fixes and typos
OSPF MD5 authentication support

- -X flag; emacs-hexl print (including ascii)

- Add ECN bits to TCP and IP headers

- IKE & IPsec (ESP & AH) support

OK deraadt@


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE
# 1.13 25-Jun-1998 mickey

add cisco netflow proto printing; not tested w/ version 5, but should work anyways


# 1.12 11-Jun-1998 provos

handle IPSec processed packets (DLT_ENC) in libpcap, display them with
tcpdump + additional info (SPI + which type of transforms where passed).


Revision tags: OPENBSD_2_3_BASE
# 1.11 26-Feb-1998 niklas

Use YP ethers


Revision tags: OPENBSD_2_2_BASE
# 1.10 21-Sep-1997 deraadt

$OpenBSD$


# 1.9 31-Jul-1997 tqbf

Add RADIUS printing support. Blech.


# 1.8 14-Jul-1997 deraadt

HAVE_NET_SLIP_H; PR286, felix@mamba.pond.sub.org


# 1.7 06-Jul-1997 niklas

Some architectures need strict alignment


Revision tags: OPENBSD_2_1_BASE
# 1.6 12-Dec-1996 bitblt

*** empty log message ***


# 1.5 12-Nov-1996 mickey

add NetBIOS printing.


Revision tags: OPENBSD_2_0_BASE
# 1.4 13-Jul-1996 mickey

it is 3.2 now.


# 1.3 10-Jun-1996 deraadt

sync to latest


# 1.2 04-Mar-1996 mickey

Updating to the latest LBL release.
Sun's SKIP support added.


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.65 15-Apr-2020 remi

add support for printing RfC 2332 NBMA Next Hop Resolution Protocol (NHRP)

ok dlg@


# 1.64 03-Dec-2019 dlg

add support for printing RFC 8300 Network Service Header (NSH)

ok deraadt@


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.63 03-Feb-2018 mpi

Simple USBPcap parser for tcpdump(8). Raw dumps can be nicely analysed
in wireshark.

ok deraadt@, dlg@


# 1.62 30-Oct-2017 mpi

Kill <net/slip.h>.

The ioctl(2) it defines is not supported since a long time and most of
its defines are already present in tcpdump(8).

ok jca@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.61 18-Nov-2016 reyk

Updates tcpdump's OpenFlow printer to use the string maps from switchd
(manually synced). Also make the output a bit more like other printers.

OK rzalamena@


# 1.60 22-Oct-2016 rzalamena

Teach tcpdump(8) how to read OpenFlow packets. This initial implementation
supports the following message types: hello, error, echo request/reply,
feature request/reply, set config, packet-in, packet-out, flow removed and
flow mod.

We currently only support printing this messages for OpenFlow 1.3.5, however
it is possible to reuse some functions and get other versions working too.

ok deraadt@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.59 14-Oct-2015 guenther

Remove conditional compilation and #defines around signal handling
Don't catch signals that were ignored on entry
Suppress SIGCHLD if our kid is stopped: we don't care and it's not an error

ok millert@


# 1.58 13-Oct-2015 stsp

Don't use exp2f(), it breaks build on vax. Use a shift instead.
reported by deraadt@


# 1.57 10-Oct-2015 stsp

Make tcpdump(1) print more information from the HT Capabilities element.
tweak + ok sthen@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.56 30-Jun-2014 deraadt

remove backwards compat layer for alpha osf1. back then compilers and
the parsers sucked, so byte misalignment repair was requested. These
days it means the parsers should improve.
ok lteo


# 1.55 20-Jun-2014 lteo

Import in_cksum_shouldbe() from mainline tcpdump; this is needed by my
upcoming commit which will fix and improve the display of bad checksums
for the major protocols.

ok henning@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.54 19-Jun-2013 lteo

Do not install pcap-int.h to /usr/include as it is an internal library
header (pointed out by matthew@). Let only pflogd and tcpdump include
pcap-int.h directly since they need it for privilege separation.

"looks good" sthen
feedback/ok deraadt matthew millert


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.53 04-Nov-2009 jsing

Add support to tcpdump for decoding the GPRS Tunnelling Protocol (GTP),
used to carry GPRS data over IP for GSM and UMTS networks. The decoder
understands GTPv0, GTPv0', GTPv1-C, GTPv1-U and GTPv1' traffic, however
at this stage not all TLV fields are fully decoded.

This work has been kindly sponsored by SystemNet AS (www.systemnet.no).

"commit" deraadt@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.52 16-Oct-2008 mpf

Add support for IEEE "slow protocols" LACP, MARKER as per 802.3ad.
Code from tcpdump.org with cleanup and shrinkage by me.
Help and ideas for extra sanity checks from canacar@
OK canacar@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.51 23-May-2006 stevesk

add VLAN Query Protocol (VQP) dissector; ok canacar@ markus@


# 1.50 28-Mar-2006 reyk

Add a simple printer for IEEE 802.1AB LLDP, the Link Layer Discovery
Protocol.

LLDP is used by some switch vendors as a replacement for the non-free
Cizzco Discovery Protocol (CDP) due to some Cisco patentry...

ok brad@


Revision tags: OPENBSD_3_9_BASE
# 1.49 22-Nov-2005 reyk

add printer for IAPP and hostapd(8) messages

ok canacar@, tested by aanriot@ and others


# 1.48 08-Oct-2005 canacar

Add a best effort mpls decoder. From Jason L. Wright.
Since the encapsulated protocol information is not always
available in the MPLS tag stack. The decoder attempts
to guess the protocol.
ok brad@


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.47 07-Mar-2005 reyk

add a printer for 802.11 and for additional radiotap headers,
use -y IEEE802_11 or IEEE802_11_RADIO if supported by the driver.

ok canacar@


Revision tags: OPENBSD_3_6_BASE
# 1.46 28-Apr-2004 mcbride

Make tcpdump print carp as carp. Printing vrrp can be forced with -T vrrp.

ok markus@ pb@


Revision tags: OPENBSD_3_5_BASE
# 1.45 02-Feb-2004 otto

Do away with non-aligned memory accesses.
ok deraadt@ hshoexer@


# 1.44 31-Jan-2004 otto

general cleanup and better SIGCHLD handling from millert@
ok canacar@


# 1.43 28-Jan-2004 canacar

privilege separated tcpdump, joint work with otto@

tested by avsm@ vincent@ dhartmei@ markus@ hshoexer@ and others
go for it deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.42 21-Aug-2003 frantzen

print the operating system of TCP SYN packets with the -o option


# 1.41 17-Jul-2003 markus

add support for ESP decryption; ok deraadt@; feedback mickey@;
many manpage fixes from jmc@


# 1.40 11-Jun-2003 markus

support for NAT-T (draft-ietf-ipsec-udp-encaps-06.txt); ok deraadt@


# 1.39 22-May-2003 pvalchev

remove -Werror; ok millert


Revision tags: OPENBSD_3_3_BASE
# 1.38 30-Nov-2002 mickey

pfsync support; deraadt@ ok


# 1.37 30-Nov-2002 deraadt

stop breaking the damn tree mickey


# 1.36 29-Nov-2002 mickey

tcpdump support for pfsync; henning@ ok


Revision tags: OPENBSD_3_2_BASE
# 1.35 18-Sep-2002 jakob

remove egp support; unresolved non-bsd license for a decoder of protocol that
noone uses anymore is not worth the amount of work needed to be resolved.


Revision tags: OPENBSD_3_1_BASE
# 1.34 22-Jan-2002 mickey

HSRP dissector, from Julian Cowley <julian@lava.net> via tcpdump.org


# 1.33 06-Nov-2001 art

sparc64 needs LBL_ALIGN.


Revision tags: OPENBSD_3_0_BASE
# 1.32 11-Jul-2001 pvalchev

remove mips leftovers; ok brad


# 1.31 25-Jun-2001 provos

interpret DLT_PFLOG


# 1.30 25-Jun-2001 itojun

disable smb decoder, as there seems to be fewer bound checks than needed


Revision tags: OPENBSD_2_9_BASE
# 1.29 08-Apr-2001 jakob

add support for printing cdp (Cisco Discovery Protocol), from tcpdump.org


# 1.28 06-Mar-2001 jakob

add lwres (BINDv9 resolver) printing. from tcpdump.org and modified by ho@


# 1.27 05-Feb-2001 jason

etherip printing code... handles draft (v2) and current (v3)


# 1.26 07-Dec-2000 mickey

timed printing; from Ben Smithurst <ben@scientia.demon.co.uk>; via tcpdump.org


# 1.25 07-Dec-2000 mickey

smb printing; from Andrew Tridgell; via tcpdump.org


# 1.24 07-Dec-2000 mickey

add vrrp printing; from tcpdump.org


Revision tags: OPENBSD_2_8_BASE
# 1.23 19-Oct-2000 jason

code for printing bridge spanning tree packets
also fix a bug where llc encoded frames are hex dumped twice when -x is used


# 1.22 03-Oct-2000 ho

Add -Wall -Werror to CFLAGS. (niklas@, jakob@ ok)


Revision tags: OPENBSD_2_7_BASE
# 1.21 26-Apr-2000 jakob

INET6
DHCP/BOOTP
tcp & udp checksum detection
numerous bugfixes


# 1.20 16-Jan-2000 jakob

enable INET6


# 1.19 16-Jan-2000 jakob

BGP support (from KAME/WIDE). INET6 parts not done yet.


# 1.18 16-Jan-2000 jakob

Mobile IP support (from KAME/NetBSD)


# 1.17 16-Jan-2000 jakob

L2TP support (from KAME)


Revision tags: OPENBSD_2_6_BASE
# 1.16 16-Sep-1999 brad

add raw support


# 1.15 11-Aug-1999 deraadt

HAVE_FDDI


# 1.14 28-Jul-1999 jakob

- Merge some changes from tcpdump 3.4
-a flag; attempt to convert network and broadcast addresses to names
Improved signal handling
Miscellaneous fixes and typos
OSPF MD5 authentication support

- -X flag; emacs-hexl print (including ascii)

- Add ECN bits to TCP and IP headers

- IKE & IPsec (ESP & AH) support

OK deraadt@


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE
# 1.13 25-Jun-1998 mickey

add cisco netflow proto printing; not tested w/ version 5, but should work anyways


# 1.12 11-Jun-1998 provos

handle IPSec processed packets (DLT_ENC) in libpcap, display them with
tcpdump + additional info (SPI + which type of transforms where passed).


Revision tags: OPENBSD_2_3_BASE
# 1.11 26-Feb-1998 niklas

Use YP ethers


Revision tags: OPENBSD_2_2_BASE
# 1.10 21-Sep-1997 deraadt

$OpenBSD$


# 1.9 31-Jul-1997 tqbf

Add RADIUS printing support. Blech.


# 1.8 14-Jul-1997 deraadt

HAVE_NET_SLIP_H; PR286, felix@mamba.pond.sub.org


# 1.7 06-Jul-1997 niklas

Some architectures need strict alignment


Revision tags: OPENBSD_2_1_BASE
# 1.6 12-Dec-1996 bitblt

*** empty log message ***


# 1.5 12-Nov-1996 mickey

add NetBIOS printing.


Revision tags: OPENBSD_2_0_BASE
# 1.4 13-Jul-1996 mickey

it is 3.2 now.


# 1.3 10-Jun-1996 deraadt

sync to latest


# 1.2 04-Mar-1996 mickey

Updating to the latest LBL release.
Sun's SKIP support added.


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.64 03-Dec-2019 dlg

add support for printing RFC 8300 Network Service Header (NSH)

ok deraadt@


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.63 03-Feb-2018 mpi

Simple USBPcap parser for tcpdump(8). Raw dumps can be nicely analysed
in wireshark.

ok deraadt@, dlg@


# 1.62 30-Oct-2017 mpi

Kill <net/slip.h>.

The ioctl(2) it defines is not supported since a long time and most of
its defines are already present in tcpdump(8).

ok jca@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.61 18-Nov-2016 reyk

Updates tcpdump's OpenFlow printer to use the string maps from switchd
(manually synced). Also make the output a bit more like other printers.

OK rzalamena@


# 1.60 22-Oct-2016 rzalamena

Teach tcpdump(8) how to read OpenFlow packets. This initial implementation
supports the following message types: hello, error, echo request/reply,
feature request/reply, set config, packet-in, packet-out, flow removed and
flow mod.

We currently only support printing this messages for OpenFlow 1.3.5, however
it is possible to reuse some functions and get other versions working too.

ok deraadt@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.59 14-Oct-2015 guenther

Remove conditional compilation and #defines around signal handling
Don't catch signals that were ignored on entry
Suppress SIGCHLD if our kid is stopped: we don't care and it's not an error

ok millert@


# 1.58 13-Oct-2015 stsp

Don't use exp2f(), it breaks build on vax. Use a shift instead.
reported by deraadt@


# 1.57 10-Oct-2015 stsp

Make tcpdump(1) print more information from the HT Capabilities element.
tweak + ok sthen@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.56 30-Jun-2014 deraadt

remove backwards compat layer for alpha osf1. back then compilers and
the parsers sucked, so byte misalignment repair was requested. These
days it means the parsers should improve.
ok lteo


# 1.55 20-Jun-2014 lteo

Import in_cksum_shouldbe() from mainline tcpdump; this is needed by my
upcoming commit which will fix and improve the display of bad checksums
for the major protocols.

ok henning@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.54 19-Jun-2013 lteo

Do not install pcap-int.h to /usr/include as it is an internal library
header (pointed out by matthew@). Let only pflogd and tcpdump include
pcap-int.h directly since they need it for privilege separation.

"looks good" sthen
feedback/ok deraadt matthew millert


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.53 04-Nov-2009 jsing

Add support to tcpdump for decoding the GPRS Tunnelling Protocol (GTP),
used to carry GPRS data over IP for GSM and UMTS networks. The decoder
understands GTPv0, GTPv0', GTPv1-C, GTPv1-U and GTPv1' traffic, however
at this stage not all TLV fields are fully decoded.

This work has been kindly sponsored by SystemNet AS (www.systemnet.no).

"commit" deraadt@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.52 16-Oct-2008 mpf

Add support for IEEE "slow protocols" LACP, MARKER as per 802.3ad.
Code from tcpdump.org with cleanup and shrinkage by me.
Help and ideas for extra sanity checks from canacar@
OK canacar@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.51 23-May-2006 stevesk

add VLAN Query Protocol (VQP) dissector; ok canacar@ markus@


# 1.50 28-Mar-2006 reyk

Add a simple printer for IEEE 802.1AB LLDP, the Link Layer Discovery
Protocol.

LLDP is used by some switch vendors as a replacement for the non-free
Cizzco Discovery Protocol (CDP) due to some Cisco patentry...

ok brad@


Revision tags: OPENBSD_3_9_BASE
# 1.49 22-Nov-2005 reyk

add printer for IAPP and hostapd(8) messages

ok canacar@, tested by aanriot@ and others


# 1.48 08-Oct-2005 canacar

Add a best effort mpls decoder. From Jason L. Wright.
Since the encapsulated protocol information is not always
available in the MPLS tag stack. The decoder attempts
to guess the protocol.
ok brad@


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.47 07-Mar-2005 reyk

add a printer for 802.11 and for additional radiotap headers,
use -y IEEE802_11 or IEEE802_11_RADIO if supported by the driver.

ok canacar@


Revision tags: OPENBSD_3_6_BASE
# 1.46 28-Apr-2004 mcbride

Make tcpdump print carp as carp. Printing vrrp can be forced with -T vrrp.

ok markus@ pb@


Revision tags: OPENBSD_3_5_BASE
# 1.45 02-Feb-2004 otto

Do away with non-aligned memory accesses.
ok deraadt@ hshoexer@


# 1.44 31-Jan-2004 otto

general cleanup and better SIGCHLD handling from millert@
ok canacar@


# 1.43 28-Jan-2004 canacar

privilege separated tcpdump, joint work with otto@

tested by avsm@ vincent@ dhartmei@ markus@ hshoexer@ and others
go for it deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.42 21-Aug-2003 frantzen

print the operating system of TCP SYN packets with the -o option


# 1.41 17-Jul-2003 markus

add support for ESP decryption; ok deraadt@; feedback mickey@;
many manpage fixes from jmc@


# 1.40 11-Jun-2003 markus

support for NAT-T (draft-ietf-ipsec-udp-encaps-06.txt); ok deraadt@


# 1.39 22-May-2003 pvalchev

remove -Werror; ok millert


Revision tags: OPENBSD_3_3_BASE
# 1.38 30-Nov-2002 mickey

pfsync support; deraadt@ ok


# 1.37 30-Nov-2002 deraadt

stop breaking the damn tree mickey


# 1.36 29-Nov-2002 mickey

tcpdump support for pfsync; henning@ ok


Revision tags: OPENBSD_3_2_BASE
# 1.35 18-Sep-2002 jakob

remove egp support; unresolved non-bsd license for a decoder of protocol that
noone uses anymore is not worth the amount of work needed to be resolved.


Revision tags: OPENBSD_3_1_BASE
# 1.34 22-Jan-2002 mickey

HSRP dissector, from Julian Cowley <julian@lava.net> via tcpdump.org


# 1.33 06-Nov-2001 art

sparc64 needs LBL_ALIGN.


Revision tags: OPENBSD_3_0_BASE
# 1.32 11-Jul-2001 pvalchev

remove mips leftovers; ok brad


# 1.31 25-Jun-2001 provos

interpret DLT_PFLOG


# 1.30 25-Jun-2001 itojun

disable smb decoder, as there seems to be fewer bound checks than needed


Revision tags: OPENBSD_2_9_BASE
# 1.29 08-Apr-2001 jakob

add support for printing cdp (Cisco Discovery Protocol), from tcpdump.org


# 1.28 06-Mar-2001 jakob

add lwres (BINDv9 resolver) printing. from tcpdump.org and modified by ho@


# 1.27 05-Feb-2001 jason

etherip printing code... handles draft (v2) and current (v3)


# 1.26 07-Dec-2000 mickey

timed printing; from Ben Smithurst <ben@scientia.demon.co.uk>; via tcpdump.org


# 1.25 07-Dec-2000 mickey

smb printing; from Andrew Tridgell; via tcpdump.org


# 1.24 07-Dec-2000 mickey

add vrrp printing; from tcpdump.org


Revision tags: OPENBSD_2_8_BASE
# 1.23 19-Oct-2000 jason

code for printing bridge spanning tree packets
also fix a bug where llc encoded frames are hex dumped twice when -x is used


# 1.22 03-Oct-2000 ho

Add -Wall -Werror to CFLAGS. (niklas@, jakob@ ok)


Revision tags: OPENBSD_2_7_BASE
# 1.21 26-Apr-2000 jakob

INET6
DHCP/BOOTP
tcp & udp checksum detection
numerous bugfixes


# 1.20 16-Jan-2000 jakob

enable INET6


# 1.19 16-Jan-2000 jakob

BGP support (from KAME/WIDE). INET6 parts not done yet.


# 1.18 16-Jan-2000 jakob

Mobile IP support (from KAME/NetBSD)


# 1.17 16-Jan-2000 jakob

L2TP support (from KAME)


Revision tags: OPENBSD_2_6_BASE
# 1.16 16-Sep-1999 brad

add raw support


# 1.15 11-Aug-1999 deraadt

HAVE_FDDI


# 1.14 28-Jul-1999 jakob

- Merge some changes from tcpdump 3.4
-a flag; attempt to convert network and broadcast addresses to names
Improved signal handling
Miscellaneous fixes and typos
OSPF MD5 authentication support

- -X flag; emacs-hexl print (including ascii)

- Add ECN bits to TCP and IP headers

- IKE & IPsec (ESP & AH) support

OK deraadt@


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE
# 1.13 25-Jun-1998 mickey

add cisco netflow proto printing; not tested w/ version 5, but should work anyways


# 1.12 11-Jun-1998 provos

handle IPSec processed packets (DLT_ENC) in libpcap, display them with
tcpdump + additional info (SPI + which type of transforms where passed).


Revision tags: OPENBSD_2_3_BASE
# 1.11 26-Feb-1998 niklas

Use YP ethers


Revision tags: OPENBSD_2_2_BASE
# 1.10 21-Sep-1997 deraadt

$OpenBSD$


# 1.9 31-Jul-1997 tqbf

Add RADIUS printing support. Blech.


# 1.8 14-Jul-1997 deraadt

HAVE_NET_SLIP_H; PR286, felix@mamba.pond.sub.org


# 1.7 06-Jul-1997 niklas

Some architectures need strict alignment


Revision tags: OPENBSD_2_1_BASE
# 1.6 12-Dec-1996 bitblt

*** empty log message ***


# 1.5 12-Nov-1996 mickey

add NetBIOS printing.


Revision tags: OPENBSD_2_0_BASE
# 1.4 13-Jul-1996 mickey

it is 3.2 now.


# 1.3 10-Jun-1996 deraadt

sync to latest


# 1.2 04-Mar-1996 mickey

Updating to the latest LBL release.
Sun's SKIP support added.


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.63 03-Feb-2018 mpi

Simple USBPcap parser for tcpdump(8). Raw dumps can be nicely analysed
in wireshark.

ok deraadt@, dlg@


# 1.62 30-Oct-2017 mpi

Kill <net/slip.h>.

The ioctl(2) it defines is not supported since a long time and most of
its defines are already present in tcpdump(8).

ok jca@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.61 18-Nov-2016 reyk

Updates tcpdump's OpenFlow printer to use the string maps from switchd
(manually synced). Also make the output a bit more like other printers.

OK rzalamena@


# 1.60 22-Oct-2016 rzalamena

Teach tcpdump(8) how to read OpenFlow packets. This initial implementation
supports the following message types: hello, error, echo request/reply,
feature request/reply, set config, packet-in, packet-out, flow removed and
flow mod.

We currently only support printing this messages for OpenFlow 1.3.5, however
it is possible to reuse some functions and get other versions working too.

ok deraadt@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.59 14-Oct-2015 guenther

Remove conditional compilation and #defines around signal handling
Don't catch signals that were ignored on entry
Suppress SIGCHLD if our kid is stopped: we don't care and it's not an error

ok millert@


# 1.58 13-Oct-2015 stsp

Don't use exp2f(), it breaks build on vax. Use a shift instead.
reported by deraadt@


# 1.57 10-Oct-2015 stsp

Make tcpdump(1) print more information from the HT Capabilities element.
tweak + ok sthen@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.56 30-Jun-2014 deraadt

remove backwards compat layer for alpha osf1. back then compilers and
the parsers sucked, so byte misalignment repair was requested. These
days it means the parsers should improve.
ok lteo


# 1.55 20-Jun-2014 lteo

Import in_cksum_shouldbe() from mainline tcpdump; this is needed by my
upcoming commit which will fix and improve the display of bad checksums
for the major protocols.

ok henning@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.54 19-Jun-2013 lteo

Do not install pcap-int.h to /usr/include as it is an internal library
header (pointed out by matthew@). Let only pflogd and tcpdump include
pcap-int.h directly since they need it for privilege separation.

"looks good" sthen
feedback/ok deraadt matthew millert


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.53 04-Nov-2009 jsing

Add support to tcpdump for decoding the GPRS Tunnelling Protocol (GTP),
used to carry GPRS data over IP for GSM and UMTS networks. The decoder
understands GTPv0, GTPv0', GTPv1-C, GTPv1-U and GTPv1' traffic, however
at this stage not all TLV fields are fully decoded.

This work has been kindly sponsored by SystemNet AS (www.systemnet.no).

"commit" deraadt@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.52 16-Oct-2008 mpf

Add support for IEEE "slow protocols" LACP, MARKER as per 802.3ad.
Code from tcpdump.org with cleanup and shrinkage by me.
Help and ideas for extra sanity checks from canacar@
OK canacar@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.51 23-May-2006 stevesk

add VLAN Query Protocol (VQP) dissector; ok canacar@ markus@


# 1.50 28-Mar-2006 reyk

Add a simple printer for IEEE 802.1AB LLDP, the Link Layer Discovery
Protocol.

LLDP is used by some switch vendors as a replacement for the non-free
Cizzco Discovery Protocol (CDP) due to some Cisco patentry...

ok brad@


Revision tags: OPENBSD_3_9_BASE
# 1.49 22-Nov-2005 reyk

add printer for IAPP and hostapd(8) messages

ok canacar@, tested by aanriot@ and others


# 1.48 08-Oct-2005 canacar

Add a best effort mpls decoder. From Jason L. Wright.
Since the encapsulated protocol information is not always
available in the MPLS tag stack. The decoder attempts
to guess the protocol.
ok brad@


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.47 07-Mar-2005 reyk

add a printer for 802.11 and for additional radiotap headers,
use -y IEEE802_11 or IEEE802_11_RADIO if supported by the driver.

ok canacar@


Revision tags: OPENBSD_3_6_BASE
# 1.46 28-Apr-2004 mcbride

Make tcpdump print carp as carp. Printing vrrp can be forced with -T vrrp.

ok markus@ pb@


Revision tags: OPENBSD_3_5_BASE
# 1.45 02-Feb-2004 otto

Do away with non-aligned memory accesses.
ok deraadt@ hshoexer@


# 1.44 31-Jan-2004 otto

general cleanup and better SIGCHLD handling from millert@
ok canacar@


# 1.43 28-Jan-2004 canacar

privilege separated tcpdump, joint work with otto@

tested by avsm@ vincent@ dhartmei@ markus@ hshoexer@ and others
go for it deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.42 21-Aug-2003 frantzen

print the operating system of TCP SYN packets with the -o option


# 1.41 17-Jul-2003 markus

add support for ESP decryption; ok deraadt@; feedback mickey@;
many manpage fixes from jmc@


# 1.40 11-Jun-2003 markus

support for NAT-T (draft-ietf-ipsec-udp-encaps-06.txt); ok deraadt@


# 1.39 22-May-2003 pvalchev

remove -Werror; ok millert


Revision tags: OPENBSD_3_3_BASE
# 1.38 30-Nov-2002 mickey

pfsync support; deraadt@ ok


# 1.37 30-Nov-2002 deraadt

stop breaking the damn tree mickey


# 1.36 29-Nov-2002 mickey

tcpdump support for pfsync; henning@ ok


Revision tags: OPENBSD_3_2_BASE
# 1.35 18-Sep-2002 jakob

remove egp support; unresolved non-bsd license for a decoder of protocol that
noone uses anymore is not worth the amount of work needed to be resolved.


Revision tags: OPENBSD_3_1_BASE
# 1.34 22-Jan-2002 mickey

HSRP dissector, from Julian Cowley <julian@lava.net> via tcpdump.org


# 1.33 06-Nov-2001 art

sparc64 needs LBL_ALIGN.


Revision tags: OPENBSD_3_0_BASE
# 1.32 11-Jul-2001 pvalchev

remove mips leftovers; ok brad


# 1.31 25-Jun-2001 provos

interpret DLT_PFLOG


# 1.30 25-Jun-2001 itojun

disable smb decoder, as there seems to be fewer bound checks than needed


Revision tags: OPENBSD_2_9_BASE
# 1.29 08-Apr-2001 jakob

add support for printing cdp (Cisco Discovery Protocol), from tcpdump.org


# 1.28 06-Mar-2001 jakob

add lwres (BINDv9 resolver) printing. from tcpdump.org and modified by ho@


# 1.27 05-Feb-2001 jason

etherip printing code... handles draft (v2) and current (v3)


# 1.26 07-Dec-2000 mickey

timed printing; from Ben Smithurst <ben@scientia.demon.co.uk>; via tcpdump.org


# 1.25 07-Dec-2000 mickey

smb printing; from Andrew Tridgell; via tcpdump.org


# 1.24 07-Dec-2000 mickey

add vrrp printing; from tcpdump.org


Revision tags: OPENBSD_2_8_BASE
# 1.23 19-Oct-2000 jason

code for printing bridge spanning tree packets
also fix a bug where llc encoded frames are hex dumped twice when -x is used


# 1.22 03-Oct-2000 ho

Add -Wall -Werror to CFLAGS. (niklas@, jakob@ ok)


Revision tags: OPENBSD_2_7_BASE
# 1.21 26-Apr-2000 jakob

INET6
DHCP/BOOTP
tcp & udp checksum detection
numerous bugfixes


# 1.20 16-Jan-2000 jakob

enable INET6


# 1.19 16-Jan-2000 jakob

BGP support (from KAME/WIDE). INET6 parts not done yet.


# 1.18 16-Jan-2000 jakob

Mobile IP support (from KAME/NetBSD)


# 1.17 16-Jan-2000 jakob

L2TP support (from KAME)


Revision tags: OPENBSD_2_6_BASE
# 1.16 16-Sep-1999 brad

add raw support


# 1.15 11-Aug-1999 deraadt

HAVE_FDDI


# 1.14 28-Jul-1999 jakob

- Merge some changes from tcpdump 3.4
-a flag; attempt to convert network and broadcast addresses to names
Improved signal handling
Miscellaneous fixes and typos
OSPF MD5 authentication support

- -X flag; emacs-hexl print (including ascii)

- Add ECN bits to TCP and IP headers

- IKE & IPsec (ESP & AH) support

OK deraadt@


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE
# 1.13 25-Jun-1998 mickey

add cisco netflow proto printing; not tested w/ version 5, but should work anyways


# 1.12 11-Jun-1998 provos

handle IPSec processed packets (DLT_ENC) in libpcap, display them with
tcpdump + additional info (SPI + which type of transforms where passed).


Revision tags: OPENBSD_2_3_BASE
# 1.11 26-Feb-1998 niklas

Use YP ethers


Revision tags: OPENBSD_2_2_BASE
# 1.10 21-Sep-1997 deraadt

$OpenBSD$


# 1.9 31-Jul-1997 tqbf

Add RADIUS printing support. Blech.


# 1.8 14-Jul-1997 deraadt

HAVE_NET_SLIP_H; PR286, felix@mamba.pond.sub.org


# 1.7 06-Jul-1997 niklas

Some architectures need strict alignment


Revision tags: OPENBSD_2_1_BASE
# 1.6 12-Dec-1996 bitblt

*** empty log message ***


# 1.5 12-Nov-1996 mickey

add NetBIOS printing.


Revision tags: OPENBSD_2_0_BASE
# 1.4 13-Jul-1996 mickey

it is 3.2 now.


# 1.3 10-Jun-1996 deraadt

sync to latest


# 1.2 04-Mar-1996 mickey

Updating to the latest LBL release.
Sun's SKIP support added.


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.62 30-Oct-2017 mpi

Kill <net/slip.h>.

The ioctl(2) it defines is not supported since a long time and most of
its defines are already present in tcpdump(8).

ok jca@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.61 18-Nov-2016 reyk

Updates tcpdump's OpenFlow printer to use the string maps from switchd
(manually synced). Also make the output a bit more like other printers.

OK rzalamena@


# 1.60 22-Oct-2016 rzalamena

Teach tcpdump(8) how to read OpenFlow packets. This initial implementation
supports the following message types: hello, error, echo request/reply,
feature request/reply, set config, packet-in, packet-out, flow removed and
flow mod.

We currently only support printing this messages for OpenFlow 1.3.5, however
it is possible to reuse some functions and get other versions working too.

ok deraadt@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.59 14-Oct-2015 guenther

Remove conditional compilation and #defines around signal handling
Don't catch signals that were ignored on entry
Suppress SIGCHLD if our kid is stopped: we don't care and it's not an error

ok millert@


# 1.58 13-Oct-2015 stsp

Don't use exp2f(), it breaks build on vax. Use a shift instead.
reported by deraadt@


# 1.57 10-Oct-2015 stsp

Make tcpdump(1) print more information from the HT Capabilities element.
tweak + ok sthen@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.56 30-Jun-2014 deraadt

remove backwards compat layer for alpha osf1. back then compilers and
the parsers sucked, so byte misalignment repair was requested. These
days it means the parsers should improve.
ok lteo


# 1.55 20-Jun-2014 lteo

Import in_cksum_shouldbe() from mainline tcpdump; this is needed by my
upcoming commit which will fix and improve the display of bad checksums
for the major protocols.

ok henning@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.54 19-Jun-2013 lteo

Do not install pcap-int.h to /usr/include as it is an internal library
header (pointed out by matthew@). Let only pflogd and tcpdump include
pcap-int.h directly since they need it for privilege separation.

"looks good" sthen
feedback/ok deraadt matthew millert


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.53 04-Nov-2009 jsing

Add support to tcpdump for decoding the GPRS Tunnelling Protocol (GTP),
used to carry GPRS data over IP for GSM and UMTS networks. The decoder
understands GTPv0, GTPv0', GTPv1-C, GTPv1-U and GTPv1' traffic, however
at this stage not all TLV fields are fully decoded.

This work has been kindly sponsored by SystemNet AS (www.systemnet.no).

"commit" deraadt@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.52 16-Oct-2008 mpf

Add support for IEEE "slow protocols" LACP, MARKER as per 802.3ad.
Code from tcpdump.org with cleanup and shrinkage by me.
Help and ideas for extra sanity checks from canacar@
OK canacar@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.51 23-May-2006 stevesk

add VLAN Query Protocol (VQP) dissector; ok canacar@ markus@


# 1.50 28-Mar-2006 reyk

Add a simple printer for IEEE 802.1AB LLDP, the Link Layer Discovery
Protocol.

LLDP is used by some switch vendors as a replacement for the non-free
Cizzco Discovery Protocol (CDP) due to some Cisco patentry...

ok brad@


Revision tags: OPENBSD_3_9_BASE
# 1.49 22-Nov-2005 reyk

add printer for IAPP and hostapd(8) messages

ok canacar@, tested by aanriot@ and others


# 1.48 08-Oct-2005 canacar

Add a best effort mpls decoder. From Jason L. Wright.
Since the encapsulated protocol information is not always
available in the MPLS tag stack. The decoder attempts
to guess the protocol.
ok brad@


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.47 07-Mar-2005 reyk

add a printer for 802.11 and for additional radiotap headers,
use -y IEEE802_11 or IEEE802_11_RADIO if supported by the driver.

ok canacar@


Revision tags: OPENBSD_3_6_BASE
# 1.46 28-Apr-2004 mcbride

Make tcpdump print carp as carp. Printing vrrp can be forced with -T vrrp.

ok markus@ pb@


Revision tags: OPENBSD_3_5_BASE
# 1.45 02-Feb-2004 otto

Do away with non-aligned memory accesses.
ok deraadt@ hshoexer@


# 1.44 31-Jan-2004 otto

general cleanup and better SIGCHLD handling from millert@
ok canacar@


# 1.43 28-Jan-2004 canacar

privilege separated tcpdump, joint work with otto@

tested by avsm@ vincent@ dhartmei@ markus@ hshoexer@ and others
go for it deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.42 21-Aug-2003 frantzen

print the operating system of TCP SYN packets with the -o option


# 1.41 17-Jul-2003 markus

add support for ESP decryption; ok deraadt@; feedback mickey@;
many manpage fixes from jmc@


# 1.40 11-Jun-2003 markus

support for NAT-T (draft-ietf-ipsec-udp-encaps-06.txt); ok deraadt@


# 1.39 22-May-2003 pvalchev

remove -Werror; ok millert


Revision tags: OPENBSD_3_3_BASE
# 1.38 30-Nov-2002 mickey

pfsync support; deraadt@ ok


# 1.37 30-Nov-2002 deraadt

stop breaking the damn tree mickey


# 1.36 29-Nov-2002 mickey

tcpdump support for pfsync; henning@ ok


Revision tags: OPENBSD_3_2_BASE
# 1.35 18-Sep-2002 jakob

remove egp support; unresolved non-bsd license for a decoder of protocol that
noone uses anymore is not worth the amount of work needed to be resolved.


Revision tags: OPENBSD_3_1_BASE
# 1.34 22-Jan-2002 mickey

HSRP dissector, from Julian Cowley <julian@lava.net> via tcpdump.org


# 1.33 06-Nov-2001 art

sparc64 needs LBL_ALIGN.


Revision tags: OPENBSD_3_0_BASE
# 1.32 11-Jul-2001 pvalchev

remove mips leftovers; ok brad


# 1.31 25-Jun-2001 provos

interpret DLT_PFLOG


# 1.30 25-Jun-2001 itojun

disable smb decoder, as there seems to be fewer bound checks than needed


Revision tags: OPENBSD_2_9_BASE
# 1.29 08-Apr-2001 jakob

add support for printing cdp (Cisco Discovery Protocol), from tcpdump.org


# 1.28 06-Mar-2001 jakob

add lwres (BINDv9 resolver) printing. from tcpdump.org and modified by ho@


# 1.27 05-Feb-2001 jason

etherip printing code... handles draft (v2) and current (v3)


# 1.26 07-Dec-2000 mickey

timed printing; from Ben Smithurst <ben@scientia.demon.co.uk>; via tcpdump.org


# 1.25 07-Dec-2000 mickey

smb printing; from Andrew Tridgell; via tcpdump.org


# 1.24 07-Dec-2000 mickey

add vrrp printing; from tcpdump.org


Revision tags: OPENBSD_2_8_BASE
# 1.23 19-Oct-2000 jason

code for printing bridge spanning tree packets
also fix a bug where llc encoded frames are hex dumped twice when -x is used


# 1.22 03-Oct-2000 ho

Add -Wall -Werror to CFLAGS. (niklas@, jakob@ ok)


Revision tags: OPENBSD_2_7_BASE
# 1.21 26-Apr-2000 jakob

INET6
DHCP/BOOTP
tcp & udp checksum detection
numerous bugfixes


# 1.20 16-Jan-2000 jakob

enable INET6


# 1.19 16-Jan-2000 jakob

BGP support (from KAME/WIDE). INET6 parts not done yet.


# 1.18 16-Jan-2000 jakob

Mobile IP support (from KAME/NetBSD)


# 1.17 16-Jan-2000 jakob

L2TP support (from KAME)


Revision tags: OPENBSD_2_6_BASE
# 1.16 16-Sep-1999 brad

add raw support


# 1.15 11-Aug-1999 deraadt

HAVE_FDDI


# 1.14 28-Jul-1999 jakob

- Merge some changes from tcpdump 3.4
-a flag; attempt to convert network and broadcast addresses to names
Improved signal handling
Miscellaneous fixes and typos
OSPF MD5 authentication support

- -X flag; emacs-hexl print (including ascii)

- Add ECN bits to TCP and IP headers

- IKE & IPsec (ESP & AH) support

OK deraadt@


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE
# 1.13 25-Jun-1998 mickey

add cisco netflow proto printing; not tested w/ version 5, but should work anyways


# 1.12 11-Jun-1998 provos

handle IPSec processed packets (DLT_ENC) in libpcap, display them with
tcpdump + additional info (SPI + which type of transforms where passed).


Revision tags: OPENBSD_2_3_BASE
# 1.11 26-Feb-1998 niklas

Use YP ethers


Revision tags: OPENBSD_2_2_BASE
# 1.10 21-Sep-1997 deraadt

$OpenBSD$


# 1.9 31-Jul-1997 tqbf

Add RADIUS printing support. Blech.


# 1.8 14-Jul-1997 deraadt

HAVE_NET_SLIP_H; PR286, felix@mamba.pond.sub.org


# 1.7 06-Jul-1997 niklas

Some architectures need strict alignment


Revision tags: OPENBSD_2_1_BASE
# 1.6 12-Dec-1996 bitblt

*** empty log message ***


# 1.5 12-Nov-1996 mickey

add NetBIOS printing.


Revision tags: OPENBSD_2_0_BASE
# 1.4 13-Jul-1996 mickey

it is 3.2 now.


# 1.3 10-Jun-1996 deraadt

sync to latest


# 1.2 04-Mar-1996 mickey

Updating to the latest LBL release.
Sun's SKIP support added.


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision