Skip to content

Commit 64ebd60

Browse files
authored
Merge branch 'the-tcpdump-group:master' into master
2 parents ed3b1df + 5c19156 commit 64ebd60

40 files changed

+655
-146
lines changed

.ci-coverity-scan-build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if [ ! -d $TOOL_BASE ]; then
4646
fi
4747

4848
TOOL_DIR=$(find $TOOL_BASE -type d -name 'cov-analysis*')
49-
export PATH=$TOOL_DIR/bin:$PATH
49+
export PATH="$TOOL_DIR/bin:$PATH"
5050

5151
# Build
5252
printf "\033[33;1mRunning Coverity Scan Analysis Tool...\033[0m\n"

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ freebsd_task:
99
# FreeBSD fails to start with 1 GB. 8 CPUs max concurrency.
1010
# The number of CPU cores must be either 1 or a multiple of 2.
1111
matrix:
12-
- image_family: freebsd-12-4
12+
- image_family: freebsd-13-2
1313
cpu: 2
1414
memory: 2G
15-
- image_family: freebsd-13-2
15+
- image_family: freebsd-14-0
1616
cpu: 2
1717
memory: 2G
1818
env:

CHANGES

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ DayOfTheWeek, Month DD, YYYY / The Tcpdump Group
2121
User interface:
2222
Add optional unit suffix on -C file size.
2323
Add --print-sampling to print every Nth packet instead of all.
24+
Add --lengths option to print the captured and original packet lengths.
2425
Source code:
2526
Use %zu when printing a sizeof to squelch compiler warnings
2627
Remove unused missing/snprintf.c.
2728
Remove unused missing/strdup.c.
2829
(FIXME: somebody please wrap the line below just before the release)
29-
AODV, AppleTalk, BOOTP, CHDLC, DCCP, EAP, EGP, EIGRP, ForCES, Geneve, GRE, Juniper, L2TP, mobile, NetFlow, NTP, OLSR, PGM, RADIUS, RIP, RSVP, SCTP, SNMP, TCP, UDP, vsock: Modernize packet parsing style
30+
AODV, AppleTalk, BOOTP, CHDLC, DCCP, EAP, EGP, EIGRP, ForCES, Geneve, GRE, ICMP, Juniper, L2TP, mobile, NetFlow, NTP, OLSR, PGM, RADIUS, RIP, RSVP, SCTP, SNMP, TCP, UDP, vsock: Modernize packet parsing style
3031
DCCP, EGP: Replace custom code with tok2str()
3132
UDP: Clean up address and port printing.
3233
AppleTalk: Declutter appletalk.h.
@@ -80,6 +81,7 @@ DayOfTheWeek, Month DD, YYYY / The Tcpdump Group
8081
User interface:
8182
Print the supported time stamp types (-J) to stdout instead of stderr.
8283
Print the list of data link types (-L) to stdout instead of stderr.
84+
Use symmetrical quotation characters in error messages.
8385
Source code:
8486
tcpdump: Fix a memory leak.
8587
child_cleanup: reap as many child processes as possible.
@@ -93,6 +95,7 @@ DayOfTheWeek, Month DD, YYYY / The Tcpdump Group
9395
Make nd_trunc_longjmp() not static inline.
9496
Include <time.h> from netdissect.h.
9597
Remove init_crc10_table() and the entourage.
98+
Initialize tzcode early.
9699
Building and testing:
97100
Add a configure option to help debugging (--enable-instrument-functions)
98101
At build time require a proof of suitable snprintf(3) implementation in
@@ -1794,7 +1797,7 @@ v2.0.1 Sun Jan 26 21:10:10 PDT
17941797
- Ultrix 4.0 is supported (also thanks to Jeff Mogul).
17951798

17961799
- IBM RT and Stanford Enetfilter support has been added by
1797-
Rayan Zachariassen <rayan@canet.ca>. Tcpdump has been tested under
1800+
Rayan Zachariassen <rayan@canet.ca>. tcpdump has been tested under
17981801
both the vanilla Enetfilter interface, and the extended interface
17991802
(#ifdef'd by IBMRTPC) present in the MERIT version of the Enetfilter.
18001803

CMakeLists.txt

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,22 @@ if(WIN32)
66
cmake_minimum_required(VERSION 3.12)
77
else(WIN32)
88
#
9-
# For now, require only 2.8.12, just in case somebody is
10-
# configuring with CMake on a "long-term support" version
11-
# of some OS and that version supplies an older version of
12-
# CMake.
9+
# For now:
1310
#
14-
# If this is ever updated to CMake 3.1 or later, remove the
15-
# stuff in cmake/Modules/FindPCAP.cmake that appends subdirectories
16-
# of directories from CMAKE_PREFIX_PATH to the PKG_CONFIG_PATH
17-
# environment variable when running pkg-config, to make sure
18-
# it finds any .pc file from there.
11+
# if this is a version of CMake less than 3.5, require only
12+
# 2.8.12, just in case somebody is configuring with CMake
13+
# on a "long-term support" version # of some OS and that
14+
# version supplies an older version of CMake;
1915
#
20-
cmake_minimum_required(VERSION 2.8.12)
16+
# otherwise, require 3.5, so we don't get messages warning
17+
# that support for versions of CMake lower than 3.5 is
18+
# deprecated.
19+
#
20+
if(CMAKE_VERSION VERSION_LESS "3.5")
21+
cmake_minimum_required(VERSION 2.8.12)
22+
else()
23+
cmake_minimum_required(VERSION 3.5)
24+
endif()
2125
endif(WIN32)
2226

2327
#
@@ -1393,7 +1397,7 @@ add_custom_target(uninstall
13931397
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
13941398

13951399
#
1396-
# Tcpdump tests
1400+
# tcpdump tests
13971401
# We try to find the Perl interpreter and, if we do, we have the check
13981402
# rule run tests/TESTrun with it, because just trying to run the TESTrun
13991403
# script as a command won't work on Windows.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ and ask!
3939
1) Check that there isn't a pull request already opened for the changes you
4040
intend to make.
4141

42-
2) [Fork](https://help.github.com/articles/fork-a-repo/) the Tcpdump
42+
2) [Fork](https://help.github.com/articles/fork-a-repo/) the tcpdump
4343
[repository](https://github.com/the-tcpdump-group/tcpdump).
4444

4545
3) The easiest way to test your changes on multiple operating systems and

Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,4 +569,4 @@ depend:
569569
@$(MKDEP) -c "$(CC)" -m "$(DEPENDENCY_CFLAG)" -s "$(srcdir)" $(DEFS) $(INCLS) $(SRC) $(LIBNETDISSECT_SRC)
570570

571571
shellcheck:
572-
shellcheck -f gcc -e SC2006 build.sh build_matrix.sh build_common.sh
572+
shellcheck -f gcc -e SC2006 build.sh build_matrix.sh build_common.sh .ci-coverity-scan-build.sh

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,23 @@ tcpdump compiles and works on at least the following platforms:
3535
* {Mac} OS X / macOS
3636
* NetBSD
3737
* OpenBSD
38-
* OpenWrt
3938
* Solaris
4039
* Windows (requires WinPcap or Npcap, and Visual Studio with CMake)
4140

41+
In the past tcpdump certainly or likely worked on the following platforms:
42+
43+
* 4.3BSD
44+
* BSD/386, later BSD/OS
45+
* DEC OSF/1, later Digital UNIX, later Tru64 UNIX
46+
* DOS
47+
* IRIX
48+
* SINIX
49+
* SunOS
50+
* Ultrix
51+
* UnixWare
52+
4253
### Dependency on libpcap
43-
Tcpdump uses libpcap, a system-independent interface for user-level
54+
tcpdump uses libpcap, a system-independent interface for user-level
4455
packet capture. Before building tcpdump, you must first retrieve and
4556
build libpcap.
4657

build_matrix.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ build_tcpdump() {
4949
export CRYPTO
5050
for SMB in $MATRIX_SMB; do
5151
export SMB
52-
COUNT=`increment $COUNT`
53-
echo_magenta "===== SETUP $COUNT: BUILD_LIBPCAP=$BUILD_LIBPCAP REMOTE=${REMOTE:-?} CC=$CC CMAKE=$CMAKE CRYPTO=$CRYPTO SMB=$SMB =====" >&2
52+
COUNT=`increment "$COUNT"`
53+
echo_magenta "===== SETUP $COUNT: CC=$CC BUILD_LIBPCAP=$BUILD_LIBPCAP REMOTE=${REMOTE:-?} CMAKE=$CMAKE CRYPTO=$CRYPTO SMB=$SMB =====" >&2
5454
# Run one build with setup environment variables:
5555
# BUILD_LIBPCAP, REMOTE, CC, CMAKE, CRYPTO and SMB
5656
run_after_echo ./build.sh

diag-control.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,22 @@
132132
#define DIAG_ON_CAST_QUAL \
133133
DIAG_DO_PRAGMA(GCC diagnostic pop)
134134

135+
#if ND_IS_AT_LEAST_GNUC_VERSION(4,5)
136+
/*
137+
* GCC warns about unused return values if a function is marked as
138+
* "warn about ignoring this function's return value".
139+
*
140+
* Clang appears to let you ignore a result without a warning by
141+
* casting the function result to void, so we don't appear to
142+
* need this for Clang.
143+
*/
144+
#define DIAG_OFF_WARN_UNUSED_RESULT \
145+
DIAG_DO_PRAGMA(GCC diagnostic push) \
146+
DIAG_DO_PRAGMA(GCC diagnostic ignored "-Wunused-result")
147+
#define DIAG_ON_WARN_UNUSED_RESULT \
148+
DIAG_DO_PRAGMA(GCC diagnostic pop)
149+
#endif
150+
135151
/*
136152
* Suppress deprecation warnings.
137153
*/
@@ -172,6 +188,12 @@
172188
#ifndef DIAG_ON_CAST_QUAL
173189
#define DIAG_ON_CAST_QUAL
174190
#endif
191+
#ifndef DIAG_OFF_WARN_UNUSED_RESULT
192+
#define DIAG_OFF_WARN_UNUSED_RESULT
193+
#endif
194+
#ifndef DIAG_ON_WARN_UNUSED_RESULT
195+
#define DIAG_ON_WARN_UNUSED_RESULT
196+
#endif
175197
#ifndef DIAG_OFF_DEPRECATION
176198
#define DIAG_OFF_DEPRECATION
177199
#endif

doc/README.haiku.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
* Both system and local libpcap are suitable.
66
* Autoconf 2.71 works.
7-
* CMake 3.24.2 works.
8-
* GCC 11.2.0 works.
7+
* CMake 3.27.7 works.
8+
* GCC 13.2.0 works.
99
* Clang 12.0.1 works with the latest llvm12_clang-12.0.1-5 version.
1010

1111
The following command will install respective non-default packages:

0 commit comments

Comments
 (0)