git: 6f9cba8f8b5e - main - libpcap: Update to 1.10.3
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 31 Mar 2023 19:03:27 UTC
The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=6f9cba8f8b5efd16249633e52483ea351876b67b commit 6f9cba8f8b5efd16249633e52483ea351876b67b Merge: d860991a7289 35af88c96350 Author: Joseph Mingrone <jrm@FreeBSD.org> AuthorDate: 2023-03-31 19:01:44 +0000 Commit: Joseph Mingrone <jrm@FreeBSD.org> CommitDate: 2023-03-31 19:02:22 +0000 libpcap: Update to 1.10.3 Local changes: - In contrib/libpcap/pcap/bpf.h, do not include pcap/dlt.h. Our system net/dlt.h is pulled in from net/bpf.h. - sys/net/dlt.h: Incorporate changes from libpcap 1.10.3. - lib/libpcap/Makefile: Update for libpcap 1.10.3. Changelog: https://git.tcpdump.org/libpcap/blob/95691ebe7564afa3faa5c6ba0dbd17e351be455a:/CHANGES Reviewed by: emaste Obtained from: https://www.tcpdump.org/release/libpcap-1.10.3.tar.gz Sponsored by: The FreeBSD Foundation contrib/libpcap/CHANGES | 448 +- contrib/libpcap/CMakeLists.txt | 1627 ++++- contrib/libpcap/CONTRIBUTING.md | 6 +- contrib/libpcap/CREDITS | 83 +- contrib/libpcap/INSTALL.md | 481 +- contrib/libpcap/Makefile-devel-adds | 4 +- contrib/libpcap/Makefile.in | 175 +- contrib/libpcap/README.md | 73 +- contrib/libpcap/TODO | 2 - contrib/libpcap/VERSION | 2 +- contrib/libpcap/Win32/Prj/wpcap.sln | 28 - contrib/libpcap/Win32/Prj/wpcap.vcxproj | 233 - contrib/libpcap/Win32/Prj/wpcap.vcxproj.filters | 107 - contrib/libpcap/aclocal.m4 | 585 +- contrib/libpcap/atmuni31.h | 2 +- contrib/libpcap/bpf_filter.c | 86 +- contrib/libpcap/bpf_image.c | 156 +- contrib/libpcap/charconv.c | 217 + contrib/libpcap/charconv.h | 44 + contrib/libpcap/cmake/Modules/FindAirPcap.cmake | 69 + contrib/libpcap/cmake/Modules/FindDAG.cmake | 7 + contrib/libpcap/cmake/Modules/FindPacket.cmake | 63 +- contrib/libpcap/cmake/Modules/FindSNF.cmake | 6 + contrib/libpcap/cmake/Modules/Finddpdk.cmake | 118 + contrib/libpcap/cmakeconfig.h.in | 85 +- contrib/libpcap/config.guess | 1510 +++-- contrib/libpcap/config.h.in | 96 +- contrib/libpcap/config.sub | 1686 ++--- contrib/libpcap/configure | 6968 ++++++++++++++------ contrib/libpcap/configure.ac | 1684 +++-- contrib/libpcap/diag-control.h | 241 +- contrib/libpcap/dlpisubs.c | 31 +- contrib/libpcap/doc/DLT_ALLOCATE_HOWTO.md | 29 - contrib/libpcap/doc/README.Win32.md | 199 +- contrib/libpcap/doc/README.aix | 24 +- contrib/libpcap/doc/README.dag | 6 +- contrib/libpcap/doc/README.hpux | 10 +- contrib/libpcap/doc/README.linux | 36 + contrib/libpcap/doc/README.linux.md | 108 - contrib/libpcap/doc/README.septel | 4 +- contrib/libpcap/doc/README.sita | 13 +- contrib/libpcap/doc/README.solaris.md | 58 + contrib/libpcap/doc/README.tru64 | 49 - contrib/libpcap/etherent.c | 20 +- contrib/libpcap/ethertype.h | 38 +- contrib/libpcap/extract.h | 302 +- contrib/libpcap/fad-getad.c | 3 +- contrib/libpcap/fad-gifc.c | 10 +- contrib/libpcap/fad-glifc.c | 3 +- contrib/libpcap/fmtutils.c | 308 +- contrib/libpcap/fmtutils.h | 8 + contrib/libpcap/ftmacros.h | 28 +- contrib/libpcap/gencode.c | 1045 ++- contrib/libpcap/gencode.h | 82 +- contrib/libpcap/{grammar.y => grammar.y.in} | 246 +- contrib/libpcap/ieee80211.h | 2 +- contrib/libpcap/lbl/os-osf4.h | 4 +- contrib/libpcap/lbl/os-osf5.h | 6 +- contrib/libpcap/lbl/os-solaris2.h | 2 +- contrib/libpcap/lbl/os-sunos4.h | 2 +- contrib/libpcap/libpcap.pc.in | 5 +- contrib/libpcap/missing/asprintf.c | 2 +- contrib/libpcap/missing/getopt.c | 17 +- contrib/libpcap/missing/snprintf.c | 631 -- contrib/libpcap/missing/win_asprintf.c | 4 +- contrib/libpcap/missing/win_snprintf.c | 43 - contrib/libpcap/mkdep | 53 +- contrib/libpcap/msdos/readme.dos | 8 +- contrib/libpcap/nametoaddr.c | 66 +- contrib/libpcap/nomkdep | 0 contrib/libpcap/optimize.c | 677 +- contrib/libpcap/org.tcpdump.chmod_bpf.plist | 2 +- contrib/libpcap/pcap-airpcap.c | 1054 +++ contrib/libpcap/pcap-airpcap.h | 36 + contrib/libpcap/pcap-bpf.c | 688 +- contrib/libpcap/pcap-bt-linux.c | 54 +- contrib/libpcap/pcap-bt-monitor-linux.c | 31 +- contrib/libpcap/pcap-common.c | 450 +- contrib/libpcap/pcap-common.h | 25 - contrib/libpcap/pcap-config.1 | 4 +- contrib/libpcap/pcap-config.in | 98 +- contrib/libpcap/pcap-dag.c | 93 +- contrib/libpcap/pcap-dbus.c | 28 +- contrib/libpcap/pcap-dll.rc | 6 +- contrib/libpcap/pcap-dlpi.c | 148 +- contrib/libpcap/pcap-dos.c | 50 +- contrib/libpcap/pcap-dpdk.c | 1086 +++ contrib/libpcap/pcap-dpdk.h | 28 + contrib/libpcap/pcap-enet.c | 4 +- contrib/libpcap/pcap-filter.manmisc.in | 651 +- contrib/libpcap/pcap-haiku.cpp | 305 + contrib/libpcap/pcap-int.h | 177 +- contrib/libpcap/pcap-libdlpi.c | 52 +- contrib/libpcap/pcap-linktype.manmisc.in | 8 +- contrib/libpcap/pcap-linux.c | 5447 +++++---------- contrib/libpcap/pcap-netfilter-linux.c | 74 +- contrib/libpcap/pcap-netmap.c | 7 +- contrib/libpcap/pcap-new.c | 54 +- contrib/libpcap/pcap-nit.c | 12 +- contrib/libpcap/pcap-npf.c | 803 ++- contrib/libpcap/pcap-pf.c | 26 +- contrib/libpcap/pcap-rdmasniff.c | 63 +- contrib/libpcap/pcap-rpcap.c | 767 ++- contrib/libpcap/pcap-savefile.manfile.in | 8 +- contrib/libpcap/pcap-septel.c | 40 +- contrib/libpcap/pcap-sita.c | 61 +- contrib/libpcap/pcap-sita.html | 28 +- contrib/libpcap/pcap-snf.c | 62 +- contrib/libpcap/pcap-snit.c | 22 +- contrib/libpcap/pcap-snoop.c | 8 +- contrib/libpcap/pcap-tc.c | 178 +- contrib/libpcap/pcap-tstamp.manmisc.in | 61 +- contrib/libpcap/pcap-types.h | 1 - contrib/libpcap/pcap-usb-linux-common.c | 130 + contrib/libpcap/pcap-usb-linux-common.h | 26 + contrib/libpcap/pcap-usb-linux.c | 877 +-- contrib/libpcap/pcap-util.c | 474 ++ contrib/libpcap/pcap-util.h | 55 + contrib/libpcap/pcap.3pcap.in | 136 +- contrib/libpcap/pcap.c | 783 ++- contrib/libpcap/pcap/bpf.h | 44 +- contrib/libpcap/pcap/can_socketcan.h | 7 +- contrib/libpcap/pcap/compiler-tests.h | 52 +- contrib/libpcap/pcap/dlt.h | 210 +- contrib/libpcap/pcap/funcattrs.h | 130 +- contrib/libpcap/pcap/namedb.h | 4 +- contrib/libpcap/pcap/pcap-inttypes.h | 85 +- contrib/libpcap/pcap/pcap.h | 327 +- contrib/libpcap/pcap/socket.h | 9 - contrib/libpcap/pcap_activate.3pcap | 35 +- contrib/libpcap/pcap_breakloop.3pcap | 101 +- contrib/libpcap/pcap_can_set_rfmon.3pcap | 28 +- contrib/libpcap/pcap_close.3pcap | 4 +- contrib/libpcap/pcap_compile.3pcap.in | 26 +- contrib/libpcap/pcap_create.3pcap | 8 +- contrib/libpcap/pcap_datalink.3pcap.in | 15 +- contrib/libpcap/pcap_datalink_name_to_val.3pcap | 8 +- contrib/libpcap/pcap_datalink_val_to_name.3pcap | 22 +- contrib/libpcap/pcap_dump.3pcap | 12 +- contrib/libpcap/pcap_dump_close.3pcap | 6 +- contrib/libpcap/pcap_dump_file.3pcap | 6 +- contrib/libpcap/pcap_dump_flush.3pcap | 13 +- contrib/libpcap/pcap_dump_ftell.3pcap | 16 +- contrib/libpcap/pcap_dump_open.3pcap.in | 51 +- contrib/libpcap/pcap_file.3pcap | 20 +- contrib/libpcap/pcap_fileno.3pcap | 20 +- contrib/libpcap/pcap_findalldevs.3pcap | 30 +- contrib/libpcap/pcap_freecode.3pcap | 8 +- .../libpcap/pcap_get_required_select_timeout.3pcap | 156 +- contrib/libpcap/pcap_get_selectable_fd.3pcap | 77 +- contrib/libpcap/pcap_get_tstamp_precision.3pcap.in | 12 +- contrib/libpcap/pcap_geterr.3pcap | 6 +- contrib/libpcap/pcap_init.3pcap | 99 + contrib/libpcap/pcap_inject.3pcap | 46 +- contrib/libpcap/pcap_is_swapped.3pcap | 16 +- contrib/libpcap/pcap_lib_version.3pcap | 4 +- contrib/libpcap/pcap_list_datalinks.3pcap.in | 22 +- contrib/libpcap/pcap_list_tstamp_types.3pcap.in | 21 +- contrib/libpcap/pcap_lookupdev.3pcap | 33 +- contrib/libpcap/pcap_lookupnet.3pcap | 10 +- contrib/libpcap/pcap_loop.3pcap | 102 +- contrib/libpcap/pcap_major_version.3pcap | 10 +- contrib/libpcap/pcap_next_ex.3pcap | 65 +- contrib/libpcap/pcap_offline_filter.3pcap | 8 +- contrib/libpcap/pcap_open_dead.3pcap.in | 25 +- contrib/libpcap/pcap_open_live.3pcap | 16 +- contrib/libpcap/pcap_open_offline.3pcap.in | 31 +- contrib/libpcap/pcap_set_buffer_size.3pcap | 12 +- contrib/libpcap/pcap_set_datalink.3pcap | 21 +- contrib/libpcap/pcap_set_immediate_mode.3pcap.in | 32 +- contrib/libpcap/pcap_set_promisc.3pcap | 12 +- contrib/libpcap/pcap_set_protocol_linux.3pcap | 20 +- contrib/libpcap/pcap_set_rfmon.3pcap | 14 +- contrib/libpcap/pcap_set_snaplen.3pcap | 12 +- contrib/libpcap/pcap_set_timeout.3pcap | 13 +- contrib/libpcap/pcap_set_tstamp_precision.3pcap.in | 20 +- contrib/libpcap/pcap_set_tstamp_type.3pcap.in | 22 +- contrib/libpcap/pcap_setdirection.3pcap | 22 +- contrib/libpcap/pcap_setfilter.3pcap | 22 +- contrib/libpcap/pcap_setnonblock.3pcap | 55 +- contrib/libpcap/pcap_snapshot.3pcap | 14 +- contrib/libpcap/pcap_stats.3pcap | 23 +- contrib/libpcap/pcap_statustostr.3pcap | 4 +- contrib/libpcap/pcap_strerror.3pcap | 4 +- contrib/libpcap/pcap_tstamp_type_name_to_val.3pcap | 7 +- contrib/libpcap/pcap_tstamp_type_val_to_name.3pcap | 7 +- contrib/libpcap/pflog.h | 157 + contrib/libpcap/portability.h | 70 +- contrib/libpcap/rpcap-protocol.c | 6 +- contrib/libpcap/rpcap-protocol.h | 56 +- contrib/libpcap/rpcapd/CMakeLists.txt | 39 +- contrib/libpcap/rpcapd/Makefile.in | 5 +- contrib/libpcap/rpcapd/daemon.c | 803 ++- contrib/libpcap/rpcapd/daemon.h | 8 +- contrib/libpcap/rpcapd/fileconf.c | 32 +- contrib/libpcap/rpcapd/log.c | 2 +- contrib/libpcap/rpcapd/org.tcpdump.rpcapd.plist | 2 +- contrib/libpcap/rpcapd/rpcapd-config.manfile.in | 8 +- contrib/libpcap/rpcapd/rpcapd.c | 172 +- contrib/libpcap/rpcapd/rpcapd.manadmin.in | 91 +- contrib/libpcap/rpcapd/win32-svc.c | 13 +- contrib/libpcap/rpcapd/win32-svc.h | 2 +- contrib/libpcap/savefile.c | 249 +- contrib/libpcap/scanner.l | 255 +- contrib/libpcap/sf-pcap.c | 147 +- contrib/libpcap/sf-pcapng.c | 114 +- contrib/libpcap/sockutils.c | 817 ++- contrib/libpcap/sockutils.h | 31 +- contrib/libpcap/sslutils.c | 239 + contrib/libpcap/sslutils.h | 66 + contrib/libpcap/testprogs/CMakeLists.txt | 13 +- contrib/libpcap/testprogs/Makefile.in | 54 +- contrib/libpcap/testprogs/can_set_rfmon_test.c | 1 - contrib/libpcap/testprogs/capturetest.c | 89 +- contrib/libpcap/testprogs/filtertest.c | 44 +- contrib/libpcap/testprogs/findalldevstest-perf.c | 97 + contrib/libpcap/testprogs/findalldevstest.c | 29 +- contrib/libpcap/testprogs/fuzz/CMakeLists.txt | 43 + contrib/libpcap/testprogs/fuzz/fuzz_both.c | 101 + contrib/libpcap/testprogs/fuzz/fuzz_both.options | 2 + contrib/libpcap/testprogs/fuzz/fuzz_filter.c | 43 + contrib/libpcap/testprogs/fuzz/fuzz_filter.options | 2 + contrib/libpcap/testprogs/fuzz/fuzz_pcap.c | 80 + contrib/libpcap/testprogs/fuzz/fuzz_pcap.options | 2 + contrib/libpcap/testprogs/fuzz/onefile.c | 54 + contrib/libpcap/testprogs/nonblocktest.c | 187 + contrib/libpcap/testprogs/opentest.c | 19 +- contrib/libpcap/testprogs/reactivatetest.c | 1 - contrib/libpcap/testprogs/selpolltest.c | 66 +- contrib/libpcap/testprogs/threadsignaltest.c | 58 +- contrib/libpcap/testprogs/valgrindtest.c | 34 +- contrib/libpcap/testprogs/visopts.py | 317 + contrib/libpcap/testprogs/writecaptest.c | 556 ++ contrib/libpcap/tests/pcap-invalid-version-1.pcap | Bin 0 -> 530 bytes contrib/libpcap/tests/pcap-invalid-version-2.pcap | Bin 0 -> 530 bytes contrib/libpcap/tests/pcapng-invalid-vers-1.pcapng | Bin 0 -> 260 bytes contrib/libpcap/tests/pcapng-invalid-vers-2.pcapng | Bin 0 -> 260 bytes lib/libpcap/Makefile | 11 +- sys/net/dlt.h | 260 +- 239 files changed, 29060 insertions(+), 15234 deletions(-) diff --cc contrib/libpcap/CONTRIBUTING.md index 69b597260f79,000000000000..fb22c5e38159 mode 100644,000000..100644 --- a/contrib/libpcap/CONTRIBUTING.md +++ b/contrib/libpcap/CONTRIBUTING.md @@@ -1,29 -1,0 +1,29 @@@ +Guidelines for contributing +=========================== + +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, failure to capture packets +properly, missing support for a network interface type or DLT) please check +first that it reproduces with the latest stable release of libpcap. If it does, +please check that the problem reproduces with the current git master branch of +libpcap. If it does (and it is not a security-related problem, otherwise see +above), please navigate to https://github.com/the-tcpdump-group/libpcap/issues +and check if the problem has already been reported. If it has not, please open +a new issue and provide the following details: + - * libpcap version (e.g. from tcpdump --version) ++* libpcap version (e.g. from `tcpdump --version`) +* operating system name and version and any other details that may be relevant - (uname -a, compiler name and version, CPU type etc.) - * configure flags if any were used ++ (`uname -a`, compiler name and version, CPU type etc.) ++* `configure` or `cmake` flags if any were used +* 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 open a pull request instead. + +Still not sure how to do? Feel free to [subscribe](https://www.tcpdump.org/#mailing-lists) +to the mailing list tcpdump-workers@lists.tcpdump.org and ask! diff --cc contrib/libpcap/README.md index 78cc3c4b41b5,000000000000..46c33c24125e mode 100644,000000..100644 --- a/contrib/libpcap/README.md +++ b/contrib/libpcap/README.md @@@ -1,93 -1,0 +1,76 @@@ - To report a security issue please send an e-mail to security@tcpdump.org. ++# LIBPCAP 1.x.y by [The Tcpdump Group](https://www.tcpdump.org) + - To report bugs and other problems, contribute patches, request a - feature, provide generic feedback etc please see the file - [CONTRIBUTING](CONTRIBUTING.md) in the libpcap source tree root. ++**To report a security issue please send an e-mail to security@tcpdump.org.** + - The directory doc/ has README files about specific operating systems and - options. ++To report bugs and other problems, contribute patches, request a ++feature, provide generic feedback etc please see the ++[guidelines for contributing](CONTRIBUTING.md). + - LIBPCAP 1.x.y - Now maintained by "The Tcpdump Group" - https://www.tcpdump.org ++The [documentation directory](doc/) has README files about specific ++operating systems and options. + +Anonymous Git is available via: - https://github.com/the-tcpdump-group/libpcap.git + - formerly from Lawrence Berkeley National Laboratory - Network Research Group <libpcap@ee.lbl.gov> - ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z ++ https://github.com/the-tcpdump-group/libpcap.git + +This directory contains source code for libpcap, a system-independent +interface for user-level packet capture. libpcap provides a portable +framework for low-level network monitoring. Applications include +network statistics collection, security monitoring, network debugging, +etc. Since almost every system vendor provides a different interface +for packet capture, and since we've developed several tools that +require this functionality, we've created this system-independent API +to ease in porting and to alleviate the need for several +system-dependent packet capture modules in each application. + - For some platforms there are README.{system} files that discuss issues ++```text ++formerly from Lawrence Berkeley National Laboratory ++ Network Research Group <libpcap@ee.lbl.gov> ++ ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z ++``` ++ ++### Support for particular platforms and BPF ++For some platforms there are `README.{system}` files that discuss issues +with the OS's interface for packet capture on those platforms, such as +how to enable support for that interface in the OS, if it's not built in +by default. + +The libpcap interface supports a filtering mechanism based on the +architecture in the BSD packet filter. BPF is described in the 1993 +Winter Usenix paper ``The BSD Packet Filter: A New Architecture for - User-level Packet Capture''. A compressed PostScript version can be - found at - - ftp://ftp.ee.lbl.gov/papers/bpf-usenix93.ps.Z - - or - - https://www.tcpdump.org/papers/bpf-usenix93.ps.Z - - and a gzipped version can be found at - - https://www.tcpdump.org/papers/bpf-usenix93.ps.gz - - A PDF version can be found at - - https://www.tcpdump.org/papers/bpf-usenix93.pdf ++User-level Packet Capture'' ++([compressed PostScript](https://www.tcpdump.org/papers/bpf-usenix93.ps.Z), ++[gzipped PostScript](https://www.tcpdump.org/papers/bpf-usenix93.ps.gz), ++[PDF](https://www.tcpdump.org/papers/bpf-usenix93.pdf)). + +Although most packet capture interfaces support in-kernel filtering, +libpcap utilizes in-kernel filtering only for the BPF interface. +On systems that don't have BPF, all packets are read into user-space +and the BPF filters are evaluated in the libpcap library, incurring +added overhead (especially, for selective filters). Ideally, libpcap +would translate BPF filters into a filter program that is compatible +with the underlying kernel subsystem, but this is not yet implemented. + +BPF is standard in 4.4BSD, BSD/OS, NetBSD, FreeBSD, OpenBSD, DragonFly - BSD, and macOS; an older, modified and undocumented version is standard - in AIX. {DEC OSF/1, Digital UNIX, Tru64 UNIX} uses the packetfilter - interface but has been extended to accept BPF filters (which libpcap - utilizes). Also, you can add BPF filter support to Ultrix using the - kernel source and/or object patches available in: - - https://www.tcpdump.org/other/bpfext42.tar.Z ++BSD, macOS, and Solaris 11; an older, modified and undocumented version ++is standard in AIX. {DEC OSF/1, Digital UNIX, Tru64 UNIX} uses the ++packetfilter interface but has been extended to accept BPF filters ++(which libpcap utilizes). + +Linux has a number of BPF based systems, and libpcap does not support +any of the eBPF mechanisms as yet, although it supports many of the +memory mapped receive mechanisms. - See the [README.linux](doc/README.linux.md) file for more information. ++See the [Linux-specific README](doc/README.linux) for more information. + - Note to Linux distributions and *BSD systems that include libpcap: ++### Note to Linux distributions and *BSD systems that include libpcap: + +There's now a rule to make a shared library, which should work on Linux +and *BSD, among other platforms. + - It sets the soname of the library to "libpcap.so.1"; this is what it - should be, *NOT* libpcap.so.1.x or libpcap.so.1.x.y or something such as ++It sets the soname of the library to `libpcap.so.1`; this is what it ++should be, **NOT** `libpcap.so.1.x` or `libpcap.so.1.x.y` or something such as +that. + +We've been maintaining binary compatibility between libpcap releases for +quite a while; there's no reason to tie a binary linked with libpcap to +a particular release of libpcap. - - Current versions can be found at https://www.tcpdump.org. - - - The TCPdump group diff --cc contrib/libpcap/charconv.c index 000000000000,5f97509ab4e3..5f97509ab4e3 mode 000000,100644..100644 --- a/contrib/libpcap/charconv.c +++ b/contrib/libpcap/charconv.c diff --cc contrib/libpcap/charconv.h index 000000000000,93103d461ef7..93103d461ef7 mode 000000,100644..100644 --- a/contrib/libpcap/charconv.h +++ b/contrib/libpcap/charconv.h diff --cc contrib/libpcap/cmake/Modules/FindAirPcap.cmake index 000000000000,56c71b7bf10d..56c71b7bf10d mode 000000,100644..100644 --- a/contrib/libpcap/cmake/Modules/FindAirPcap.cmake +++ b/contrib/libpcap/cmake/Modules/FindAirPcap.cmake diff --cc contrib/libpcap/cmake/Modules/Finddpdk.cmake index 000000000000,323262afa642..323262afa642 mode 000000,100644..100644 --- a/contrib/libpcap/cmake/Modules/Finddpdk.cmake +++ b/contrib/libpcap/cmake/Modules/Finddpdk.cmake diff --cc contrib/libpcap/config.guess index 2b79f6d837b9,000000000000..a419d8643b62 mode 100755,000000..100755 --- a/contrib/libpcap/config.guess +++ b/contrib/libpcap/config.guess @@@ -1,1476 -1,0 +1,1768 @@@ +#! /bin/sh +# Attempt to guess a canonical system name. - # Copyright 1992-2018 Free Software Foundation, Inc. ++# Copyright 1992-2022 Free Software Foundation, Inc. + - timestamp='2018-07-06' ++# shellcheck disable=SC2006,SC2268 # see below for rationale ++ ++timestamp='2022-08-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-2022 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=' - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp 2>/dev/null) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; - dummy=$tmp/dummy ; - tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; - case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; - esac ; set_cc_for_build= ;' ++tmp= ++# shellcheck disable=SC2172 ++trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 ++ ++set_cc_for_build() { ++ # prevent multiple calls if $tmp is already set ++ test "$tmp" && return 0 ++ : "${TMPDIR=/tmp}" ++ # shellcheck disable=SC2039,SC3028 ++ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || ++ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || ++ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || ++ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ++ dummy=$tmp/dummy ++ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ++ ,,) echo "int x;" > "$dummy.c" ++ for driver in cc gcc c89 c99 ; do ++ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then ++ CC_FOR_BUILD=$driver ++ break ++ fi ++ done ++ if test x"$CC_FOR_BUILD" = x ; then ++ CC_FOR_BUILD=no_compiler_found ++ fi ++ ;; ++ ,,*) CC_FOR_BUILD=$CC ;; ++ ,*,*) CC_FOR_BUILD=$HOST_CC ;; ++ esac ++} + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) - if (test -f /.attbin/uname) >/dev/null 2>&1 ; then ++if test -f /.attbin/uname ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown - UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown ++UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + - case "$UNAME_SYSTEM" in ++case $UNAME_SYSTEM in +Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu ++ LIBC=unknown + - eval "$set_cc_for_build" ++ set_cc_for_build + cat <<-EOF > "$dummy.c" + #include <features.h> + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc - #else ++ #elif defined(__GLIBC__) + LIBC=gnu ++ #else ++ #include <stdarg.h> ++ /* First heuristic to detect musl libc. */ ++ #ifdef __DEFINED_va_list ++ LIBC=musl ++ #endif + #endif + EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" ++ cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ++ eval "$cc_set_libc" + - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl ++ # Second heuristic to detect musl libc. ++ if [ "$LIBC" = unknown ] && ++ command -v ldd >/dev/null && ++ ldd --version 2>&1 | grep -q ^musl; then ++ LIBC=musl ++ fi ++ ++ # If the system lacks a compiler, then just pick glibc. ++ # We could probably try harder. ++ if [ "$LIBC" = unknown ]; then ++ LIBC=gnu + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + - case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in ++case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ ++ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ ++ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + echo unknown)` - case "$UNAME_MACHINE_ARCH" in ++ case $UNAME_MACHINE_ARCH in ++ aarch64eb) machine=aarch64_be-unknown ;; + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown ++ machine=${arch}${endian}-unknown + ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; ++ *) machine=$UNAME_MACHINE_ARCH-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in ++ case $UNAME_MACHINE_ARCH in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" ++ set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in ++ case $UNAME_MACHINE_ARCH in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in ++ case $UNAME_VERSION in + Debian*) + release='-gnu' + ;; + *) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi-}" - exit ;; ++ GUESS=$machine-${os}${release}${abi-} ++ ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; ++ GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE ++ ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; ++ GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE ++ ;; ++ *:SecBSD:*:*) ++ UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` ++ GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE ++ ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; ++ GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE ++ ;; + *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; ++ GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE ++ ;; + *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; ++ GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE ++ ;; + *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; ++ GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE ++ ;; ++ *:OS108:*:*) ++ GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE ++ ;; + macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; ++ GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE ++ ;; + *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; ++ GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE ++ ;; + *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; ++ GUESS=$UNAME_MACHINE-unknown-sortix ++ ;; ++ *:Twizzler:*:*) ++ GUESS=$UNAME_MACHINE-unknown-twizzler ++ ;; + *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; ++ GUESS=$UNAME_MACHINE-unknown-redox ++ ;; + mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; ++ GUESS=mips-dec-osf1 ++ ;; + alpha:OSF1:*:*) ++ # Reset EXIT trap before exiting to avoid spurious non-zero exit code. ++ trap '' 0 + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in ++ case $ALPHA_CPU_TYPE in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; ++ OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` ++ GUESS=$UNAME_MACHINE-dec-osf$OSF_REL ++ ;; + Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; ++ GUESS=m68k-unknown-sysv4 ++ ;; + *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; ++ GUESS=$UNAME_MACHINE-unknown-amigaos ++ ;; + *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; ++ GUESS=$UNAME_MACHINE-unknown-morphos ++ ;; + *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; ++ GUESS=i370-ibm-openedition ++ ;; + *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; ++ GUESS=s390-ibm-zvmoe ++ ;; + *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; ++ GUESS=powerpc-ibm-os400 ++ ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; ++ GUESS=arm-acorn-riscix$UNAME_RELEASE ++ ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; ++ GUESS=arm-unknown-riscos ++ ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; ++ GUESS=hppa1.1-hitachi-hiuxmpp ++ ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; ++ case `(/bin/universe) 2>/dev/null` in ++ att) GUESS=pyramid-pyramid-sysv3 ;; ++ *) GUESS=pyramid-pyramid-bsd ;; ++ esac ++ ;; + NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; ++ GUESS=pyramid-pyramid-svr4 ++ ;; + DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; ++ GUESS=sparc-icl-nx6 ++ ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; ++ sparc) GUESS=sparc-icl-nx7 ;; ++ esac *** 6630 LINES SKIPPED ***