git: ee67461e5682 - main - tpcdump: Update to 4.99.4

From: Joseph Mingrone <jrm_at_FreeBSD.org>
Date: Thu, 08 Jun 2023 17:32:49 UTC
The branch main has been updated by jrm:

URL: https://cgit.FreeBSD.org/src/commit/?id=ee67461e56828dd1f8de165947ba83f6d9148a87

commit ee67461e56828dd1f8de165947ba83f6d9148a87
Merge: f40cd16bfda4 51a183021fce
Author:     Joseph Mingrone <jrm@FreeBSD.org>
AuthorDate: 2023-06-08 17:30:54 +0000
Commit:     Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2023-06-08 17:30:54 +0000

    tpcdump: Update to 4.99.4
    
    Local changes:
    
    - Update some local modifications to fix build
    - Synch config.h with upstream as much as possible
    
    Changelog:      https://git.tcpdump.org/tcpdump/blob/55bc126b0216cfe409b8d6bd378f65679d136ddf:/CHANGES
    Reviewed by:    emaste
    Obtained from:  https://www.tcpdump.org/release/tcpdump-4.99.4.tar.gz
    Sponsored by:   The FreeBSD Foundation

 contrib/tcpdump/CHANGES                        |  289 +-
 contrib/tcpdump/CMakeLists.txt                 | 1371 ++++++++
 contrib/tcpdump/CONTRIBUTING                   |  151 -
 contrib/tcpdump/CONTRIBUTING.md                |  191 ++
 contrib/tcpdump/CREDITS                        |  149 +-
 contrib/tcpdump/{INSTALL.txt => INSTALL.md}    |   61 +-
 contrib/tcpdump/LICENSE                        |    6 +-
 contrib/tcpdump/Makefile.in                    |  230 +-
 contrib/tcpdump/PLATFORMS                      |   16 -
 contrib/tcpdump/README                         |    1 -
 contrib/tcpdump/README.md                      |  100 +-
 contrib/tcpdump/VERSION                        |    2 +-
 contrib/tcpdump/addrtoname.c                   |  493 +--
 contrib/tcpdump/addrtoname.h                   |   86 +-
 contrib/tcpdump/addrtostr.c                    |   12 +-
 contrib/tcpdump/af.c                           |    4 +-
 contrib/tcpdump/af.h                           |    2 +-
 contrib/tcpdump/ah.h                           |   46 +-
 contrib/tcpdump/appletalk.h                    |   60 +-
 contrib/tcpdump/ascii_strcasecmp.c             |    6 +-
 contrib/tcpdump/atime.awk                      |    2 +-
 contrib/tcpdump/bpf_dump.c                     |    5 +-
 contrib/tcpdump/chdlc.h                        |    2 +-
 contrib/tcpdump/checksum.c                     |   10 +-
 contrib/tcpdump/cmake/Modules/FindCRYPTO.cmake |   24 +
 contrib/tcpdump/cmake/Modules/FindPCAP.cmake   |  462 +++
 contrib/tcpdump/cmake/Modules/FindSMI.cmake    |   24 +
 contrib/tcpdump/cmake_uninstall.cmake.in       |   21 +
 contrib/tcpdump/cmakeconfig.h.in               |  290 ++
 contrib/tcpdump/compiler-tests.h               |  196 ++
 contrib/tcpdump/config.guess                   | 1516 +++++----
 contrib/tcpdump/config.h.in                    |  170 +-
 contrib/tcpdump/config.sub                     | 1705 +++++-----
 contrib/tcpdump/configure                      | 3794 +++++++++++----------
 contrib/tcpdump/configure.ac                   |  508 +--
 contrib/tcpdump/cpack.c                        |  103 +-
 contrib/tcpdump/cpack.h                        |   33 +-
 contrib/tcpdump/diag-control.h                 |  186 +
 contrib/tcpdump/doc/README.NetBSD.md           |   22 +
 contrib/tcpdump/doc/README.Win32.md            |  200 ++
 contrib/tcpdump/doc/README.aix.md              |   17 +
 contrib/tcpdump/doc/README.solaris.md          |   41 +
 contrib/tcpdump/ethertype.h                    |   32 +-
 contrib/tcpdump/extract.h                      |  754 ++++-
 contrib/tcpdump/{ether.h => fptype.c}          |   35 +-
 contrib/tcpdump/fptype.h                       |   34 +
 contrib/tcpdump/ftmacros.h                     |  127 +
 contrib/tcpdump/funcattrs.h                    |  110 +-
 contrib/tcpdump/getservent.h                   |   67 +
 contrib/tcpdump/gmpls.c                        |    4 +-
 contrib/tcpdump/gmt2local.c                    |   66 -
 contrib/tcpdump/gmt2local.h                    |   25 -
 contrib/tcpdump/in_cksum.c                     |   12 +-
 contrib/tcpdump/interface.h                    |   18 +-
 contrib/tcpdump/ip.h                           |    6 +-
 contrib/tcpdump/ip6.h                          |   91 +-
 contrib/tcpdump/ipproto.c                      |   10 +-
 contrib/tcpdump/ipproto.h                      |   15 +-
 contrib/tcpdump/l2vpn.c                        |    8 +-
 contrib/tcpdump/machdep.c                      |   24 +-
 contrib/tcpdump/missing/datalinks.c            |    2 +-
 contrib/tcpdump/missing/dlnames.c              |    5 +-
 contrib/tcpdump/missing/getopt_long.c          |   30 +-
 contrib/tcpdump/{ => missing}/getopt_long.h    |    6 +-
 contrib/tcpdump/missing/getservent.c           |  143 +
 contrib/tcpdump/missing/pcap_dump_ftell.c      |   46 +
 contrib/tcpdump/missing/snprintf.c             |  119 +-
 contrib/tcpdump/missing/strlcat.c              |    8 +-
 contrib/tcpdump/missing/strlcpy.c              |    8 +-
 contrib/tcpdump/missing/strsep.c               |    6 +-
 contrib/tcpdump/mkdep                          |   50 +-
 contrib/tcpdump/mpls.h                         |    6 +-
 contrib/tcpdump/nameser.h                      |  187 +-
 contrib/tcpdump/netdissect-alloc.c             |   64 +
 contrib/tcpdump/netdissect-alloc.h             |   32 +
 contrib/tcpdump/netdissect-ctype.h             |   56 +
 contrib/tcpdump/netdissect-stdinc.h            |  375 +-
 contrib/tcpdump/netdissect.c                   |  159 +-
 contrib/tcpdump/netdissect.h                   |  597 ++--
 contrib/tcpdump/nfs.h                          |  169 +-
 contrib/tcpdump/nfsfh.h                        |    2 +-
 contrib/tcpdump/nlpid.c                        |    4 +-
 contrib/tcpdump/ntp.c                          |   74 +
 contrib/tcpdump/{vfprintf.c => ntp.h}          |   58 +-
 contrib/tcpdump/openflow.h                     |   51 +-
 contrib/tcpdump/ospf.h                         |  154 +-
 contrib/tcpdump/oui.c                          |   33 +-
 contrib/tcpdump/oui.h                          |   32 +-
 contrib/tcpdump/parsenfsfh.c                   |  162 +-
 contrib/tcpdump/pcap_dump_ftell.c              |   31 -
 contrib/tcpdump/pflog.h                        |  152 +
 contrib/tcpdump/ppp.h                          |    8 +-
 contrib/tcpdump/print-802_11.c                 | 1769 +++++-----
 contrib/tcpdump/print-802_15_4.c               | 2603 +++++++++++++-
 contrib/tcpdump/print-ah.c                     |   57 +-
 contrib/tcpdump/print-ahcp.c                   |  283 +-
 contrib/tcpdump/print-aodv.c                   |  388 ++-
 contrib/tcpdump/print-aoe.c                    |  257 +-
 contrib/tcpdump/print-ap1394.c                 |   46 +-
 contrib/tcpdump/print-arcnet.c                 |  162 +-
 contrib/tcpdump/print-arista.c                 |  165 +
 contrib/tcpdump/print-arp.c                    |  261 +-
 contrib/tcpdump/print-ascii.c                  |  126 +-
 contrib/tcpdump/print-atalk.c                  |  462 +--
 contrib/tcpdump/print-atm.c                    |  193 +-
 contrib/tcpdump/print-babel.c                  |  504 ++-
 contrib/tcpdump/print-bcm-li.c                 |  130 +
 contrib/tcpdump/print-beep.c                   |   23 +-
 contrib/tcpdump/print-bfd.c                    |  215 +-
 contrib/tcpdump/print-bgp.c                    | 4326 +++++++++++++-----------
 contrib/tcpdump/print-bootp.c                  |  569 ++--
 contrib/tcpdump/print-brcmtag.c                |  151 +
 contrib/tcpdump/print-bt.c                     |   44 +-
 contrib/tcpdump/print-calm-fast.c              |   52 +-
 contrib/tcpdump/print-carp.c                   |   37 +-
 contrib/tcpdump/print-cdp.c                    |  596 ++--
 contrib/tcpdump/print-cfm.c                    |  310 +-
 contrib/tcpdump/print-chdlc.c                  |   94 +-
 contrib/tcpdump/print-cip.c                    |   47 +-
 contrib/tcpdump/print-cnfp.c                   |  456 +--
 contrib/tcpdump/print-dccp.c                   |  365 +-
 contrib/tcpdump/print-decnet.c                 |  680 ++--
 contrib/tcpdump/print-dhcp6.c                  |  373 +-
 contrib/tcpdump/print-domain.c                 |  941 ++++--
 contrib/tcpdump/print-dsa.c                    |  219 ++
 contrib/tcpdump/print-dtp.c                    |   86 +-
 contrib/tcpdump/print-dvmrp.c                  |  341 +-
 contrib/tcpdump/print-eap.c                    |  277 +-
 contrib/tcpdump/print-egp.c                    |  224 +-
 contrib/tcpdump/print-eigrp.c                  |  472 +--
 contrib/tcpdump/print-enc.c                    |   94 +-
 contrib/tcpdump/print-esp.c                    |  544 +--
 contrib/tcpdump/print-ether.c                  |  496 ++-
 contrib/tcpdump/print-fddi.c                   |   93 +-
 contrib/tcpdump/print-forces.c                 |  761 ++---
 contrib/tcpdump/print-fr.c                     |  386 +--
 contrib/tcpdump/print-frag6.c                  |   38 +-
 contrib/tcpdump/print-ftp.c                    |   11 +-
 contrib/tcpdump/print-geneve.c                 |   81 +-
 contrib/tcpdump/print-geonet.c                 |  123 +-
 contrib/tcpdump/print-gre.c                    |  210 +-
 contrib/tcpdump/print-hncp.c                   |  331 +-
 contrib/tcpdump/print-hsrp.c                   |   88 +-
 contrib/tcpdump/print-http.c                   |   11 +-
 contrib/tcpdump/print-icmp.c                   |  523 +--
 contrib/tcpdump/print-icmp6.c                  | 1383 ++++----
 contrib/tcpdump/print-igmp.c                   |  232 +-
 contrib/tcpdump/print-igrp.c                   |  126 +-
 contrib/tcpdump/print-ip-demux.c               |  231 ++
 contrib/tcpdump/print-ip.c                     |  575 +---
 contrib/tcpdump/print-ip6.c                    |  413 ++-
 contrib/tcpdump/print-ip6opts.c                |  188 +-
 contrib/tcpdump/print-ipcomp.c                 |   31 +-
 contrib/tcpdump/print-ipfc.c                   |   50 +-
 contrib/tcpdump/print-ipnet.c                  |   51 +-
 contrib/tcpdump/print-ipoib.c                  |  125 +
 contrib/tcpdump/print-ipx.c                    |  193 +-
 contrib/tcpdump/print-isakmp.c                 | 1425 ++++----
 contrib/tcpdump/print-isoclns.c                | 2757 ++++++++-------
 contrib/tcpdump/print-juniper.c                |  823 +++--
 contrib/tcpdump/print-krb.c                    |  113 +-
 contrib/tcpdump/print-l2tp.c                   |  303 +-
 contrib/tcpdump/print-lane.c                   |   52 +-
 contrib/tcpdump/print-ldp.c                    |  304 +-
 contrib/tcpdump/print-lisp.c                   |  158 +-
 contrib/tcpdump/print-llc.c                    |  124 +-
 contrib/tcpdump/print-lldp.c                   |  651 ++--
 contrib/tcpdump/print-lmp.c                    |  601 ++--
 contrib/tcpdump/print-loopback.c               |   81 +-
 contrib/tcpdump/print-lspping.c                |  546 ++-
 contrib/tcpdump/print-lwapp.c                  |  172 +-
 contrib/tcpdump/print-lwres.c                  |  428 ++-
 contrib/tcpdump/print-m3ua.c                   |   96 +-
 contrib/tcpdump/print-macsec.c                 |  256 ++
 contrib/tcpdump/print-medsa.c                  |  196 --
 contrib/tcpdump/print-mobile.c                 |   35 +-
 contrib/tcpdump/print-mobility.c               |  170 +-
 contrib/tcpdump/print-mpcp.c                   |  146 +-
 contrib/tcpdump/print-mpls.c                   |  108 +-
 contrib/tcpdump/print-mptcp.c                  |  279 +-
 contrib/tcpdump/print-msdp.c                   |   64 +-
 contrib/tcpdump/print-msnlb.c                  |   27 +-
 contrib/tcpdump/print-nflog.c                  |  177 +-
 contrib/tcpdump/print-nfs.c                    | 1419 ++++----
 contrib/tcpdump/print-nsh.c                    |  233 +-
 contrib/tcpdump/print-ntp.c                    |  473 ++-
 contrib/tcpdump/print-null.c                   |   45 +-
 contrib/tcpdump/print-olsr.c                   |  285 +-
 contrib/tcpdump/print-openflow-1.0.c           | 2478 ++++++--------
 contrib/tcpdump/print-openflow-1.3.c           | 1209 +++++++
 contrib/tcpdump/print-openflow.c               |  214 +-
 contrib/tcpdump/print-ospf.c                   |  773 ++---
 contrib/tcpdump/print-ospf6.c                  |  515 ++-
 contrib/tcpdump/print-otv.c                    |   36 +-
 contrib/tcpdump/print-pflog.c                  |  188 +-
 contrib/tcpdump/print-pfsync.c                 |  136 +-
 contrib/tcpdump/print-pgm.c                    |  543 ++-
 contrib/tcpdump/print-pim.c                    |  667 ++--
 contrib/tcpdump/print-pktap.c                  |   94 +-
 contrib/tcpdump/print-ppi.c                    |  108 +-
 contrib/tcpdump/print-ppp.c                    |  869 ++---
 contrib/tcpdump/print-pppoe.c                  |   81 +-
 contrib/tcpdump/print-pptp.c                   |  731 ++--
 contrib/tcpdump/print-ptp.c                    |  634 ++++
 contrib/tcpdump/print-radius.c                 |  881 ++++-
 contrib/tcpdump/print-raw.c                    |   12 +-
 contrib/tcpdump/print-realtek.c                |  248 ++
 contrib/tcpdump/print-resp.c                   |  114 +-
 contrib/tcpdump/print-rip.c                    |  425 ++-
 contrib/tcpdump/print-ripng.c                  |  125 +-
 contrib/tcpdump/print-rpki-rtr.c               |  147 +-
 contrib/tcpdump/print-rrcp.c                   |  129 -
 contrib/tcpdump/print-rsvp.c                   | 1179 ++++---
 contrib/tcpdump/print-rt6.c                    |   96 +-
 contrib/tcpdump/print-rtsp.c                   |   11 +-
 contrib/tcpdump/print-rx.c                     | 1411 ++++----
 contrib/tcpdump/print-sctp.c                   |  382 +--
 contrib/tcpdump/print-sflow.c                  |  725 ++--
 contrib/tcpdump/print-sip.c                    |    8 +-
 contrib/tcpdump/print-sl.c                     |  161 +-
 contrib/tcpdump/print-sll.c                    |  316 +-
 contrib/tcpdump/print-slow.c                   |  363 +-
 contrib/tcpdump/print-smb.c                    |  759 ++---
 contrib/tcpdump/print-smtp.c                   |   11 +-
 contrib/tcpdump/print-snmp.c                   |  399 ++-
 contrib/tcpdump/print-someip.c                 |  142 +
 contrib/tcpdump/print-ssh.c                    |   99 +
 contrib/tcpdump/print-stp.c                    |  349 +-
 contrib/tcpdump/print-sunatm.c                 |   26 +-
 contrib/tcpdump/print-sunrpc.c                 |   85 +-
 contrib/tcpdump/print-symantec.c               |   52 +-
 contrib/tcpdump/print-syslog.c                 |   72 +-
 contrib/tcpdump/print-tcp.c                    |  508 +--
 contrib/tcpdump/print-telnet.c                 |   81 +-
 contrib/tcpdump/print-tftp.c                   |   71 +-
 contrib/tcpdump/print-timed.c                  |  111 +-
 contrib/tcpdump/print-tipc.c                   |  181 +-
 contrib/tcpdump/print-token.c                  |   94 +-
 contrib/tcpdump/print-udld.c                   |  115 +-
 contrib/tcpdump/print-udp.c                    |  563 +--
 contrib/tcpdump/print-unsupported.c            |   34 +
 contrib/tcpdump/print-usb.c                    |  186 +-
 contrib/tcpdump/print-vjc.c                    |   34 +-
 contrib/tcpdump/print-vqp.c                    |  107 +-
 contrib/tcpdump/print-vrrp.c                   |  101 +-
 contrib/tcpdump/print-vsock.c                  |  262 ++
 contrib/tcpdump/print-vtp.c                    |  181 +-
 contrib/tcpdump/print-vxlan-gpe.c              |   67 +-
 contrib/tcpdump/print-vxlan.c                  |   41 +-
 contrib/tcpdump/print-wb.c                     |  365 +-
 contrib/tcpdump/print-whois.c                  |   31 +
 contrib/tcpdump/print-zep.c                    |  181 +
 contrib/tcpdump/print-zephyr.c                 |  128 +-
 contrib/tcpdump/print-zeromq.c                 |   83 +-
 contrib/tcpdump/print.c                        |  411 ++-
 contrib/tcpdump/print.h                        |    5 +-
 contrib/tcpdump/rpc_auth.h                     |   11 +-
 contrib/tcpdump/rpc_msg.h                      |   24 +-
 contrib/tcpdump/rpl.h                          |  174 -
 contrib/tcpdump/setsignal.c                    |   90 -
 contrib/tcpdump/setsignal.h                    |   25 -
 contrib/tcpdump/signature.c                    |   26 +-
 contrib/tcpdump/slcompress.h                   |    4 +-
 contrib/tcpdump/smb.h                          |    6 +-
 contrib/tcpdump/smbutil.c                      |  535 +--
 contrib/tcpdump/status-exit-codes.h            |   32 +
 contrib/tcpdump/stime.awk                      |    2 +-
 contrib/tcpdump/strtoaddr.c                    |   20 +-
 contrib/tcpdump/tcp.h                          |   29 +-
 contrib/tcpdump/tcpdump.1.in                   |  364 +-
 contrib/tcpdump/tcpdump.c                      | 1232 +++++--
 contrib/tcpdump/timeval-operations.h           |   23 +-
 contrib/tcpdump/udp.h                          |  118 +-
 contrib/tcpdump/util-print.c                   |  614 ++--
 contrib/tcpdump/varattrs.h                     |   59 +
 usr.sbin/tcpdump/tcpdump/Makefile              |   25 +-
 usr.sbin/tcpdump/tcpdump/config.h              |  208 +-
 277 files changed, 47688 insertions(+), 32990 deletions(-)

diff --cc contrib/tcpdump/CMakeLists.txt
index 000000000000,9495b5d4c234..9495b5d4c234
mode 000000,100644..100644
--- a/contrib/tcpdump/CMakeLists.txt
+++ b/contrib/tcpdump/CMakeLists.txt
diff --cc contrib/tcpdump/CONTRIBUTING.md
index 000000000000,000000000000..26f226ebd973
new file mode 100644
--- /dev/null
+++ b/contrib/tcpdump/CONTRIBUTING.md
@@@ -1,0 -1,0 +1,191 @@@
++# Some Information for Contributors
++Thank you for considering to make a contribution to tcpdump! Please use the
++guidelines below to achieve the best results and experience for everyone.
++
++## How to report bugs and other problems
++**To report a security issue (segfault, buffer overflow, infinite loop, arbitrary
++code execution etc) please send an e-mail to security@tcpdump.org, do not use
++the bug tracker!**
++
++To report a non-security problem (failure to compile, incorrect output in the
++protocol printout, missing support for a particular protocol etc) please check
++first that it reproduces with the latest stable release of tcpdump and the latest
++stable release of libpcap. If it does, please check that the problem reproduces
++with the current git master branch of tcpdump and the current git master branch of
++libpcap. If it does (and it is not a security-related problem, otherwise see
++above), please navigate to the
++[bug tracker](https://github.com/the-tcpdump-group/tcpdump/issues)
++and check if the problem has already been reported. If it has not, please open
++a new issue and provide the following details:
++
++* tcpdump and libpcap version (`tcpdump --version`)
++* operating system name and version and any other details that may be relevant
++  (`uname -a`, compiler name and version, CPU type etc.)
++* custom `configure`/`cmake` flags, if any
++* statement of the problem
++* steps to reproduce
++
++Please note that if you know exactly how to solve the problem and the solution
++would not be too intrusive, it would be best to contribute some development time
++and to open a pull request instead as discussed below.
++
++Still not sure how to do? Feel free to
++[subscribe to the mailing list](https://www.tcpdump.org/#mailing-lists)
++and ask!
++
++
++## How to add new code and to update existing code
++
++0) Check that there isn't a pull request already opened for the changes you
++   intend to make.
++
++1) [Fork](https://help.github.com/articles/fork-a-repo/) the Tcpdump
++   [repository](https://github.com/the-tcpdump-group/tcpdump).
++
++2) The easiest way to test your changes on multiple operating systems and
++   architectures is to let the upstream CI test your pull request (more on
++   this below).
++
++3) Setup your git working copy
++   ```
++   git clone https://github.com/<username>/tcpdump.git
++   cd tcpdump
++   git remote add upstream https://github.com/the-tcpdump-group/tcpdump
++   git fetch upstream
++   ```
++
++4) Do a `touch .devel` in your working directory.
++   Currently, the effect is
++   * add (via `configure`, in `Makefile`) some warnings options (`-Wall`,
++     `-Wmissing-prototypes`, `-Wstrict-prototypes`, ...) to the compiler if it
++     supports these options,
++   * have the `Makefile` support `make depend` and the `configure` script run it.
++
++5) Configure and build
++   ```
++   ./configure && make -s && make check
++   ```
++
++6) Add/update tests
++   The `tests` directory contains regression tests of the dissection of captured
++   packets.  Those captured packets were saved running tcpdump with option
++   `-w sample.pcap`.  Additional options, such as `-n`, are used to create relevant
++   and reproducible output; `-#` is used to indicate which particular packets
++   have output that differs.  The tests are run with the `TZ` environment
++   variable set to `GMT0`, so that UTC, rather than the local time where the
++   tests are being run, is used when "local time" values are printed.  The
++   actual test compares the current text output with the expected result
++   (`sample.out`) saved from a previous version.
++
++   Any new/updated fields in a dissector must be present in a `sample.pcap` file
++   and the corresponding output file.
++
++   Configuration is set in `tests/TESTLIST`.
++   Each line in this file has the following format:
++   ```
++   test-name   sample.pcap   sample.out   tcpdump-options
++   ```
++
++   The `sample.out` file can be produced as follows:
++   ```
++   (cd tests && TZ=GMT0 ../tcpdump -# -n -r sample.pcap tcpdump-options > sample.out)
++   ```
++
++   Or, for convenience, use `./update-test.sh test-name`
++
++   It is often useful to have test outputs with different verbosity levels
++   (none, `-v`, `-vv`, `-vvv`, etc.) depending on the code.
++
++7) Test using `make check` (current build options) and `./build_matrix.sh`
++   (a multitude of build options, build systems and compilers). If you can,
++   test on more than one operating system. Don't send a pull request until
++   all tests pass.
++
++8) Try to rebase your commits to keep the history simple.
++   ```
++   git fetch upstream
++   git rebase upstream/master
++   ```
++   (If the rebase fails and you cannot resolve, issue `git rebase --abort`
++   and ask for help in the pull request comment.)
++
++9) Once 100% happy, put your work into your forked repository using `git push`.
++
++10) [Initiate and send](https://help.github.com/articles/using-pull-requests/)
++    a pull request.
++    This will trigger the upstream repository CI tests.
++
++
++## Code style and generic remarks
++*  A thorough reading of some other printers code is useful.
++
++*  Put the normative reference if any as comments (RFC, etc.).
++
++*  Put the format of packets/headers/options as comments if there is no
++   published normative reference.
++
++*  The printer may receive incomplete packet in the buffer, truncated at any
++   random position, for example by capturing with `-s size` option.
++   If your code reads and decodes every byte of the protocol packet, then to
++   ensure proper and complete bounds checks it would be sufficient to read all
++   packet data using the `GET_*()` macros, typically:
++   ```
++   GET_U_1(p)
++   GET_S_1(p)
++   GET_BE_U_n(p), n in { 2, 3, 4, 5, 6, 7, 8 }
++   GET_BE_S_n(p), n in { 2, 3, 4, 5, 6, 7, 8 }
++   ```
++   If your code uses the macros above only on some packet data, then the gaps
++   would have to be bounds-checked using the `ND_TCHECK_*()` macros:
++   ```
++   ND_TCHECK_n(p), n in { 1, 2, 3, 4, 5, 6, 7, 8, 16 }
++   ND_TCHECK_SIZE(p)
++   ND_TCHECK_LEN(p, l)
++   ```
++   For the `ND_TCHECK_*` macros (if not already done):
++   * Assign: `ndo->ndo_protocol = "protocol";`
++   * Define: `ND_LONGJMP_FROM_TCHECK` before including `netdissect.h`
++   * Make sure that the intersection of `GET_*()` and `ND_TCHECK_*()` is minimal,
++     but at the same time their union covers all packet data in all cases.
++
++   You can test the code via:
++   ```
++   sudo ./tcpdump -s snaplen [-v][v][...] -i lo # in a terminal
++   sudo tcpreplay -i lo sample.pcap             # in another terminal
++   ```
++   You should try several values for snaplen to do various truncation.
++
++*  Do invalid packet checks in code: Think that your code can receive in input
++   not only a valid packet but any arbitrary random sequence of octets (packet
++   * built malformed originally by the sender or by a fuzz tester,
++   * became corrupted in transit or for some other reason).
++
++   Print with: `nd_print_invalid(ndo);	/* to print " (invalid)" */`
++
++*  Use `struct tok` for indexed strings and print them with
++   `tok2str()` or `bittok2str()` (for flags).
++
++*  Avoid empty lines in output of printers.
++
++*  A commit message must have:
++   ```
++   First line: Capitalized short summary in the imperative (50 chars or less)
++
++   If the commit concerns a protocol, the summary line must start with
++   "protocol: ".
++
++   Body: Detailed explanatory text, if necessary. Fold it to approximately
++   72 characters. There must be an empty line separating the summary from
++   the body.
++   ```
++
++*  Avoid non-ASCII characters in code and commit messages.
++
++*  Use the style of the modified sources.
++
++*  Don't mix declarations and code.
++
++*  Don't use `//` for comments.
++   Not all C compilers accept C++/C99 comments by default.
++
++*  Avoid trailing tabs/spaces
diff --cc contrib/tcpdump/LICENSE
index dea5f7d54d6b,000000000000..a10474d54aeb
mode 100644,000000..100644
--- a/contrib/tcpdump/LICENSE
+++ b/contrib/tcpdump/LICENSE
@@@ -1,19 -1,0 +1,19 @@@
 +License: BSD
-  
++
 +Redistribution and use in source and binary forms, with or without
 +modification, are permitted provided that the following conditions
 +are met:
-   
++
 +  1. Redistributions of source code must retain the above copyright
 +     notice, this list of conditions and the following disclaimer.
 +  2. Redistributions in binary form must reproduce the above copyright
 +     notice, this list of conditions and the following disclaimer in
 +     the documentation and/or other materials provided with the
 +     distribution.
 +  3. The names of the authors may not be used to endorse or promote
 +     products derived from this software without specific prior
 +     written permission.
-   
++
 +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --cc contrib/tcpdump/README.md
index a1fba9bca6d4,000000000000..566b7b7a874f
mode 100644,000000..100644
--- a/contrib/tcpdump/README.md
+++ b/contrib/tcpdump/README.md
@@@ -1,225 -1,0 +1,225 @@@
- # tcpdump
++# TCPDUMP 4.x.y by [The Tcpdump Group](https://www.tcpdump.org/)
 +
- [![Build
- Status](https://travis-ci.org/the-tcpdump-group/tcpdump.png)](https://travis-ci.org/the-tcpdump-group/tcpdump)
- 
- To report a security issue please send an e-mail to security@tcpdump.org.
++**To report a security issue please send an e-mail to security@tcpdump.org.**
 +
 +To report bugs and other problems, contribute patches, request a
- feature, provide generic feedback etc please see the file
- CONTRIBUTING in the tcpdump source tree root.
- 
- TCPDUMP 4.x.y
- Now maintained by "The Tcpdump Group"
- See 		www.tcpdump.org
++feature, provide generic feedback etc please see the
++[guidelines for contributing](CONTRIBUTING.md) in the tcpdump source tree root.
 +
- Anonymous Git is available via:
++Anonymous Git is available via
 +
- 	git clone git://bpf.tcpdump.org/tcpdump
- 
- formerly from 	Lawrence Berkeley National Laboratory
- 		Network Research Group <tcpdump@ee.lbl.gov>  
- 		ftp://ftp.ee.lbl.gov/old/tcpdump.tar.Z (3.4)
++	https://github.com/the-tcpdump-group/tcpdump.git
 +
 +This directory contains source code for tcpdump, a tool for network
- monitoring and data acquisition.  This software was originally
- developed by the Network Research Group at the Lawrence Berkeley
- National Laboratory.  The original distribution is available via
- anonymous ftp to `ftp.ee.lbl.gov`, in `tcpdump.tar.Z`.  More recent
- development is performed at tcpdump.org, http://www.tcpdump.org/
++monitoring and data acquisition.
 +
++Over the past few years, tcpdump has been steadily improved by the
++excellent contributions from the Internet community (just browse
++through the [change log](CHANGES)).  We are grateful for all the input.
++
++### Supported platforms
++In many operating systems tcpdump is available as a native package or port,
++which simplifies installation of updates and long-term maintenance. However,
++the native packages are sometimes a few versions behind and to try a more
++recent snapshot it will take to compile tcpdump from the source code.
++
++tcpdump compiles and works on at least the following platforms:
++
++* AIX
++* DragonFly BSD
++* FreeBSD
++* Haiku
++* HP-UX 11i
++* illumos (OmniOS, OpenIndiana)
++* GNU/Linux
++* {Mac} OS X / macOS
++* NetBSD
++* OpenBSD
++* OpenWrt
++* Solaris
++* Windows (requires WinPcap or Npcap, and Visual Studio with CMake)
++
++### Dependency on libpcap
 +Tcpdump uses libpcap, a system-independent interface for user-level
 +packet capture.  Before building tcpdump, you must first retrieve and
- build libpcap, also originally from LBL and now being maintained by
- tcpdump.org; see http://www.tcpdump.org/ .
++build libpcap.
 +
 +Once libpcap is built (either install it or make sure it's in
- `../libpcap`), you can build tcpdump using the procedure in the `INSTALL.txt`
- file.
++`../libpcap`), you can build tcpdump using the procedure in the
++[installation notes](INSTALL.md).
 +
++### Origins of tcpdump
 +The program is loosely based on SMI's "etherfind" although none of the
 +etherfind code remains.  It was originally written by Van Jacobson as
- part of an ongoing research project to investigate and improve tcp and
- internet gateway performance.  The parts of the program originally
++part of an ongoing research project to investigate and improve TCP and
++Internet gateway performance.  The parts of the program originally
 +taken from Sun's etherfind were later re-written by Steven McCanne of
 +LBL.  To insure that there would be no vestige of proprietary code in
 +tcpdump, Steve wrote these pieces from the specification given by the
 +manual entry, with no access to the source of tcpdump or etherfind.
++```text
++formerly from	Lawrence Berkeley National Laboratory
++		Network Research Group <tcpdump@ee.lbl.gov>
++		ftp://ftp.ee.lbl.gov/old/tcpdump.tar.Z (3.4)
++```
 +
- Over the past few years, tcpdump has been steadily improved by the
- excellent contributions from the Internet community (just browse
- through the `CHANGES` file).  We are grateful for all the input.
- 
++### See also
 +Richard Stevens gives an excellent treatment of the Internet protocols
 +in his book *"TCP/IP Illustrated, Volume 1"*. If you want to learn more
 +about tcpdump and how to interpret its output, pick up this book.
 +
- Some tools for viewing and analyzing tcpdump trace files are available
- from the Internet Traffic Archive:
- 
- * http://www.sigcomm.org/ITA/
- 
- Another tool that tcpdump users might find useful is tcpslice:
- 
- * https://github.com/the-tcpdump-group/tcpslice
- 
++Another tool that tcpdump users might find useful is
++[tcpslice](https://github.com/the-tcpdump-group/tcpslice).
 +It is a program that can be used to extract portions of tcpdump binary
- trace files. See the above distribution for further details and
- documentation.
- 
- Current versions can be found at www.tcpdump.org.
- 
-  - The TCPdump team
- 
- original text by: Steve McCanne, Craig Leres, Van Jacobson
++trace files.
 +
- -------------------------------------
++### The original LBL README by Steve McCanne, Craig Leres and Van Jacobson
 +```
 +This directory also contains some short awk programs intended as
 +examples of ways to reduce tcpdump data when you're tracking
 +particular network problems:
 +
 +send-ack.awk
 +	Simplifies the tcpdump trace for an ftp (or other unidirectional
 +	tcp transfer).  Since we assume that one host only sends and
 +	the other only acks, all address information is left off and
 +	we just note if the packet is a "send" or an "ack".
 +
 +	There is one output line per line of the original trace.
 +	Field 1 is the packet time in decimal seconds, relative
 +	to the start of the conversation.  Field 2 is delta-time
 +	from last packet.  Field 3 is packet type/direction.
 +	"Send" means data going from sender to receiver, "ack"
 +	means an ack going from the receiver to the sender.  A
 +	preceding "*" indicates that the data is a retransmission.
 +	A preceding "-" indicates a hole in the sequence space
 +	(i.e., missing packet(s)), a "#" means an odd-size (not max
 +	seg size) packet.  Field 4 has the packet flags
 +	(same format as raw trace).  Field 5 is the sequence
 +	number (start seq. num for sender, next expected seq number
 +	for acks).  The number in parens following an ack is
 +	the delta-time from the first send of the packet to the
 +	ack.  A number in parens following a send is the
 +	delta-time from the first send of the packet to the
 +	current send (on duplicate packets only).  Duplicate
 +	sends or acks have a number in square brackets showing
 +	the number of duplicates so far.
 +
 +	Here is a short sample from near the start of an ftp:
 +		3.00    0.20   send . 512
 +		3.20    0.20    ack . 1024  (0.20)
 +		3.20    0.00   send P 1024
 +		3.40    0.20    ack . 1536  (0.20)
 +		3.80    0.40 * send . 0  (3.80) [2]
 +		3.82    0.02 *  ack . 1536  (0.62) [2]
 +	Three seconds into the conversation, bytes 512 through 1023
 +	were sent.  200ms later they were acked.  Shortly thereafter
 +	bytes 1024-1535 were sent and again acked after 200ms.
 +	Then, for no apparent reason, 0-511 is retransmitted, 3.8
 +	seconds after its initial send (the round trip time for this
 +	ftp was 1sec, +-500ms).  Since the receiver is expecting
 +	1536, 1536 is re-acked when 0 arrives.
 +
 +packetdat.awk
 +	Computes chunk summary data for an ftp (or similar
 +	unidirectional tcp transfer). [A "chunk" refers to
 +	a chunk of the sequence space -- essentially the packet
 +	sequence number divided by the max segment size.]
 +
 +	A summary line is printed showing the number of chunks,
 +	the number of packets it took to send that many chunks
 +	(if there are no lost or duplicated packets, the number
 +	of packets should equal the number of chunks) and the
 +	number of acks.
 +
 +	Following the summary line is one line of information
 +	per chunk.  The line contains eight fields:
 +	   1 - the chunk number
 +	   2 - the start sequence number for this chunk
 +	   3 - time of first send
 +	   4 - time of last send
 +	   5 - time of first ack
 +	   6 - time of last ack
 +	   7 - number of times chunk was sent
 +	   8 - number of times chunk was acked
 +	(all times are in decimal seconds, relative to the start
 +	of the conversation.)
 +
 +	As an example, here is the first part of the output for
 +	an ftp trace:
 +
 +	# 134 chunks.  536 packets sent.  508 acks.
 +	1       1       0.00    5.80    0.20    0.20    4       1
 +	2       513     0.28    6.20    0.40    0.40    4       1
 +	3       1025    1.16    6.32    1.20    1.20    4       1
 +	4       1561    1.86    15.00   2.00    2.00    6       1
 +	5       2049    2.16    15.44   2.20    2.20    5       1
 +	6       2585    2.64    16.44   2.80    2.80    5       1
 +	7       3073    3.00    16.66   3.20    3.20    4       1
 +	8       3609    3.20    17.24   3.40    5.82    4       11
 +	9       4097    6.02    6.58    6.20    6.80    2       5
 +
 +	This says that 134 chunks were transferred (about 70K
 +	since the average packet size was 512 bytes).  It took
 +	536 packets to transfer the data (i.e., on the average
 +	each chunk was transmitted four times).  Looking at,
 +	say, chunk 4, we see it represents the 512 bytes of
 +	sequence space from 1561 to 2048.  It was first sent
 +	1.86 seconds into the conversation.  It was last
 +	sent 15 seconds into the conversation and was sent
 +	a total of 6 times (i.e., it was retransmitted every
 +	2 seconds on the average).  It was acked once, 140ms
 +	after it first arrived.
 +
 +stime.awk
 +atime.awk
 +	Output one line per send or ack, respectively, in the form
 +		<time> <seq. number>
 +	where <time> is the time in seconds since the start of the
 +	transfer and <seq. number> is the sequence number being sent
 +	or acked.  I typically plot this data looking for suspicious
 +	patterns.
 +
 +
 +The problem I was looking at was the bulk-data-transfer
 +throughput of medium delay network paths (1-6 sec.  round trip
 +time) under typical DARPA Internet conditions.  The trace of the
 +ftp transfer of a large file was used as the raw data source.
 +The method was:
 +
 +  - On a local host (but not the Sun running tcpdump), connect to
 +    the remote ftp.
 +
 +  - On the monitor Sun, start the trace going.  E.g.,
 +      tcpdump host local-host and remote-host and port ftp-data >tracefile
 +
 +  - On local, do either a get or put of a large file (~500KB),
 +    preferably to the null device (to minimize effects like
 +    closing the receive window while waiting for a disk write).
 +
 +  - When transfer is finished, stop tcpdump.  Use awk to make up
 +    two files of summary data (maxsize is the maximum packet size,
 +    tracedata is the file of tcpdump tracedata):
 +      awk -f send-ack.awk packetsize=avgsize tracedata >sa
 +      awk -f packetdat.awk packetsize=avgsize tracedata >pd
 +
 +  - While the summary data files are printing, take a look at
 +    how the transfer behaved:
 +      awk -f stime.awk tracedata | xgraph
 +    (90% of what you learn seems to happen in this step).
 +
 +  - Do all of the above steps several times, both directions,
 +    at different times of day, with different protocol
 +    implementations on the other end.
 +
 +  - Using one of the Unix data analysis packages (in my case,
 +    S and Gary Perlman's Unix|Stat), spend a few months staring
 +    at the data.
 +
 +  - Change something in the local protocol implementation and
 +    redo the steps above.
 +
 +  - Once a week, tell your funding agent that you're discovering
 +    wonderful things and you'll write up that research report
 +    "real soon now".
 +```
diff --cc contrib/tcpdump/cmake/Modules/FindCRYPTO.cmake
index 000000000000,453c6516e071..453c6516e071
mode 000000,100644..100644
--- a/contrib/tcpdump/cmake/Modules/FindCRYPTO.cmake
+++ b/contrib/tcpdump/cmake/Modules/FindCRYPTO.cmake
diff --cc contrib/tcpdump/cmake/Modules/FindPCAP.cmake
index 000000000000,11074655f457..11074655f457
mode 000000,100644..100644
--- a/contrib/tcpdump/cmake/Modules/FindPCAP.cmake
+++ b/contrib/tcpdump/cmake/Modules/FindPCAP.cmake
diff --cc contrib/tcpdump/cmake/Modules/FindSMI.cmake
index 000000000000,98c107126722..98c107126722
mode 000000,100644..100644
--- a/contrib/tcpdump/cmake/Modules/FindSMI.cmake
+++ b/contrib/tcpdump/cmake/Modules/FindSMI.cmake
diff --cc contrib/tcpdump/cmake_uninstall.cmake.in
index 000000000000,000000000000..2037e365393a
new file mode 100644
--- /dev/null
+++ b/contrib/tcpdump/cmake_uninstall.cmake.in
@@@ -1,0 -1,0 +1,21 @@@
++if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
++  message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
++endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
++
++file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
++string(REGEX REPLACE "\n" ";" files "${files}")
++foreach(file ${files})
++  message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
++  if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
++    exec_program(
++      "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
++      OUTPUT_VARIABLE rm_out
++      RETURN_VALUE rm_retval
++      )
++    if(NOT "${rm_retval}" STREQUAL 0)
++      message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
++    endif(NOT "${rm_retval}" STREQUAL 0)
++  else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
++    message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
++  endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
++endforeach(file)
diff --cc contrib/tcpdump/cmakeconfig.h.in
index 000000000000,02a4a352e42a..02a4a352e42a
mode 000000,100644..100644
--- a/contrib/tcpdump/cmakeconfig.h.in
+++ b/contrib/tcpdump/cmakeconfig.h.in
diff --cc contrib/tcpdump/compiler-tests.h
index 000000000000,d4fe177bc247..d4fe177bc247
mode 000000,100644..100644
--- a/contrib/tcpdump/compiler-tests.h
+++ b/contrib/tcpdump/compiler-tests.h
diff --cc contrib/tcpdump/config.guess
index 2b79f6d837b9,000000000000..69188da73d74
mode 100755,000000..100755
--- a/contrib/tcpdump/config.guess
+++ b/contrib/tcpdump/config.guess
@@@ -1,1476 -1,0 +1,1774 @@@
 +#! /bin/sh
 +# Attempt to guess a canonical system name.
- #   Copyright 1992-2018 Free Software Foundation, Inc.
++#   Copyright 1992-2023 Free Software Foundation, Inc.
 +
- timestamp='2018-07-06'
++# shellcheck disable=SC2006,SC2268 # see below for rationale
++
++timestamp='2023-01-01'
 +
 +# This file is free software; you can redistribute it and/or modify it
 +# under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 3 of the License, or
++# the Free Software Foundation, either version 3 of the License, or
 +# (at your option) any later version.
 +#
 +# This program is distributed in the hope that it will be useful, but
 +# WITHOUT ANY WARRANTY; without even the implied warranty of
 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 +# General Public License for more details.
 +#
 +# You should have received a copy of the GNU General Public License
 +# along with this program; if not, see <https://www.gnu.org/licenses/>.
 +#
 +# As a special exception to the GNU General Public License, if you
 +# distribute this file as part of a program that contains a
 +# configuration script generated by Autoconf, you may include it under
 +# the same distribution terms that you use for the rest of that
 +# program.  This Exception is an additional permission under section 7
 +# of the GNU General Public License, version 3 ("GPLv3").
 +#
 +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 +#
 +# You can get the latest version of this script from:
- # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
++# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
 +#
 +# Please send patches to <config-patches@gnu.org>.
 +
 +
++# The "shellcheck disable" line above the timestamp inhibits complaints
++# about features and limitations of the classic Bourne shell that were
++# superseded or lifted in POSIX.  However, this script identifies a wide
++# variety of pre-POSIX systems that do not have POSIX shells at all, and
++# even some reasonably current systems (Solaris 10 as case-in-point) still
++# have a pre-POSIX /bin/sh.
++
++
 +me=`echo "$0" | sed -e 's,.*/,,'`
 +
 +usage="\
 +Usage: $0 [OPTION]
 +
 +Output the configuration name of the system \`$me' is run on.
 +
 +Options:
 +  -h, --help         print this help, then exit
 +  -t, --time-stamp   print date of last modification, then exit
 +  -v, --version      print version number, then exit
 +
 +Report bugs and patches to <config-patches@gnu.org>."
 +
 +version="\
 +GNU config.guess ($timestamp)
 +
 +Originally written by Per Bothner.
- Copyright 1992-2018 Free Software Foundation, Inc.
++Copyright 1992-2023 Free Software Foundation, Inc.
 +
 +This is free software; see the source for copying conditions.  There is NO
 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
 +
 +help="
 +Try \`$me --help' for more information."
 +
 +# Parse command line
 +while test $# -gt 0 ; do
 +  case $1 in
 +    --time-stamp | --time* | -t )
 +       echo "$timestamp" ; exit ;;
 +    --version | -v )
 +       echo "$version" ; exit ;;
 +    --help | --h* | -h )
 +       echo "$usage"; exit ;;
 +    -- )     # Stop option processing
 +       shift; break ;;
 +    - )	# Use stdin as input.
 +       break ;;
 +    -* )
 +       echo "$me: invalid option $1$help" >&2
 +       exit 1 ;;
 +    * )
 +       break ;;
 +  esac
 +done
 +
 +if test $# != 0; then
 +  echo "$me: too many arguments$help" >&2
 +  exit 1
 +fi
 +
- trap 'exit 1' 1 2 15
++# Just in case it came from the environment.
++GUESS=
 +
 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 +# compiler to aid in system detection is discouraged as it requires
 +# temporary files to be created and, as you can see below, it is a
 +# headache to deal with in a portable fashion.
 +
 +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
 +# use `HOST_CC' if defined, but it is deprecated.
 +
 +# Portable tmp directory creation inspired by the Autoconf team.
 +
- set_cc_for_build='
*** 7006 LINES SKIPPED ***