]> The Tcpdump Group git mirrors - tcpslice/log
tcpslice
10 days agoUse TS_RAW_US_MAX_DIGITS in parse_time(). master
Denis Ovsienko [Thu, 17 Apr 2025 19:11:17 +0000 (20:11 +0100)] 
Use TS_RAW_US_MAX_DIGITS in parse_time().

4 weeks agoCirrus CI: Bump FreeBSD up to 13.5.
Denis Ovsienko [Sat, 29 Mar 2025 23:25:49 +0000 (23:25 +0000)] 
Cirrus CI: Bump FreeBSD up to 13.5.

5 weeks agoAutoconf: Define PACKAGE_URL.
Denis Ovsienko [Tue, 18 Mar 2025 11:50:28 +0000 (11:50 +0000)] 
Autoconf: Define PACKAGE_URL.

Same as in libpcap and tcpdump.

3 months agoAdd a GitHub issue template
Francois-Xavier Le Bail [Fri, 17 Jan 2025 19:10:01 +0000 (20:10 +0100)] 
Add a GitHub issue template

Create the .github/ISSUE_TEMPLATE directory and add in it:
- the issue_template.md file with some keywords (name, about, ...),
- the config.yml file containing "blank_issues_enabled: false".

(Same as in libpcap and tcpdump)

[skip ci]

4 months agoAdd *.orig and *.rej to .gitignore. [skip ci]
Denis Ovsienko [Tue, 3 Dec 2024 21:45:25 +0000 (21:45 +0000)] 
Add *.orig and *.rej to .gitignore. [skip ci]

5 months agoCirrus CI: Update the macOS task image coverity_scan
Francois-Xavier Le Bail [Thu, 7 Nov 2024 20:36:14 +0000 (21:36 +0100)] 
Cirrus CI: Update the macOS task image

Based on https://cirrus-ci.org/guide/macOS/.

This should avoid the warning:
Only ghcr.io/cirruslabs/macos-runner:sonoma is allowed. Automatically
upgraded.

6 months agoAdd tags file build by ctags command via "make extags" to .gitignore
Francois-Xavier Le Bail [Thu, 24 Oct 2024 20:30:38 +0000 (22:30 +0200)] 
Add tags file build by ctags command via "make extags" to .gitignore

6 months agobuild_matrix.sh: Add a "| cat" at the end of a git command
Francois-Xavier Le Bail [Thu, 24 Oct 2024 19:49:13 +0000 (21:49 +0200)] 
build_matrix.sh: Add a "| cat" at the end of a git command

This can avoid a display pause problem with "less -S" as a git pager.

This is a folow-up to 99a008a7dbc855bbba28401214ecae723fa416e8.

6 months agoRevert "Cirrus CI: Add a task for haiku-amd64." [skip ci]
Denis Ovsienko [Thu, 24 Oct 2024 00:13:25 +0000 (01:13 +0100)] 
Revert "Cirrus CI: Add a task for haiku-amd64." [skip ci]

That was an unfinished work in progress that I put into the master
branch too early.

6 months agobuild_matrix.sh: Run "git show --oneline -s"
Francois-Xavier Le Bail [Wed, 23 Oct 2024 09:03:19 +0000 (11:03 +0200)] 
build_matrix.sh: Run "git show --oneline -s"

It is used to identify the git HEAD.

6 months agoAdd vim swap files to .gitignore. [skip ci]
Denis Ovsienko [Wed, 23 Oct 2024 11:12:44 +0000 (12:12 +0100)] 
Add vim swap files to .gitignore. [skip ci]

7 months agoCirrus CI: Add a task for haiku-amd64. 32/head
Denis Ovsienko [Wed, 25 Sep 2024 12:07:53 +0000 (13:07 +0100)] 
Cirrus CI: Add a task for haiku-amd64.

7 months agoCirrus CI: Bump FreeBSD up to 13.4.
Denis Ovsienko [Wed, 25 Sep 2024 12:13:10 +0000 (13:13 +0100)] 
Cirrus CI: Bump FreeBSD up to 13.4.

7 months agoStart tcpslice 1.9-PRE-GIT.
Denis Ovsienko [Fri, 20 Sep 2024 19:51:28 +0000 (20:51 +0100)] 
Start tcpslice 1.9-PRE-GIT.

[skip ci]

7 months agoThis is tcpslice 1.8. tcpslice-1.8
Denis Ovsienko [Fri, 20 Sep 2024 18:14:25 +0000 (19:14 +0100)] 
This is tcpslice 1.8.

7 months agoCirrus CI: Set LANG in coverity_task same as in linux_task
Francois-Xavier Le Bail [Sat, 7 Sep 2024 10:34:05 +0000 (12:34 +0200)] 
Cirrus CI: Set LANG in coverity_task same as in linux_task

To avoid these warnings:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

7 months agoautogen.sh: Delete all trailing blank lines at end of configure.
Denis Ovsienko [Sun, 1 Sep 2024 20:09:06 +0000 (21:09 +0100)] 
autogen.sh: Delete all trailing blank lines at end of configure.

7 months agoautogen.sh: Allow to configure Autoconf warnings.
Denis Ovsienko [Fri, 30 Aug 2024 17:20:27 +0000 (18:20 +0100)] 
autogen.sh: Allow to configure Autoconf warnings.

In autogen.sh translate AUTOCONF_WARNINGS to Autoconf WARNINGS
environment variable if set.  During "make releasetar" instead of
autoreconf run autogen.sh to act upon the same environment variables as
the latter.  Since all current Cirrus CI tasks run in VMs with Autoconf
2.71 or later, set the new variable there to suppress obsolete construct
warnings.

7 months agoCirrus CI: Bump Ubuntu up to 24.04. 30/head
Denis Ovsienko [Tue, 3 Sep 2024 09:08:39 +0000 (10:08 +0100)] 
Cirrus CI: Bump Ubuntu up to 24.04.

While at it, avoid the irrelevant library warnings from the configure
script and set DEBIAN_FRONTEND better.

12 months agoCHANGES: Add some changes
Francois-Xavier Le Bail [Tue, 9 Apr 2024 12:10:46 +0000 (14:10 +0200)] 
CHANGES: Add some changes

12 months agomkdep: Exit with a non-zero status if a command fails
Francois-Xavier Le Bail [Tue, 9 Apr 2024 07:46:50 +0000 (09:46 +0200)] 
mkdep: Exit with a non-zero status if a command fails

This could help detect errors such as in the previous commit.

12 months agoMakefile.in: Fix the depend target
Francois-Xavier Le Bail [Tue, 9 Apr 2024 07:45:15 +0000 (09:45 +0200)] 
Makefile.in: Fix the depend target

Fix an error on Solaris 10 like:
./mkdep: /opt/solarisstudio12.3/bin/cc -D_STDC_C99=: not found

When configure get some compiler option like:
checking for /opt/solarisstudio12.3/bin/cc option to accept ISO C99...
-D_STDC_C99=
Makefile will contain:
CC = /opt/solarisstudio12.3/bin/cc -D_STDC_C99=

And if we use '-c "$(CC)"' mkdep will set and try to run:
CC="/opt/solarisstudio12.3/bin/cc -D_STDC_C99=", which is incorrect.

Remove the quotes to allow mkdep to set CC with the compiler name and
set flags with the option.

12 months agoMakefile.in: Update the .c.o build rule
Francois-Xavier Le Bail [Wed, 3 Apr 2024 07:44:20 +0000 (09:44 +0200)] 
Makefile.in: Update the .c.o build rule

Don't use the hacks for the rather old SunOS 4.

It's helps to do VPATH builds, e.g. 32-bit, 64-bit in two directories.
(https://www.gnu.org/software/automake/manual/html_node/VPATH-Builds.html)

12 months agoUpdate the error message when checking for pcap_loop()
Francois-Xavier Le Bail [Tue, 2 Apr 2024 20:10:50 +0000 (22:10 +0200)] 
Update the error message when checking for pcap_loop()

Add a first error case when trying to build a 32-bit tcpslice with a
64-bit libpcap or vice versa.

[skip ci]

12 months agoFixup the previous commit.
Denis Ovsienko [Tue, 2 Apr 2024 10:03:54 +0000 (11:03 +0100)] 
Fixup the previous commit.

12 months agoMakefile.in: Add instrumentation configuration in releasecheck target
Francois-Xavier Le Bail [Tue, 2 Apr 2024 09:38:00 +0000 (11:38 +0200)] 
Makefile.in: Add instrumentation configuration in releasecheck target

Same as in tcpdump.

Cirrus CI: Add the binutils-dev package, Linux task.
It is needed to build with --enable-instrument-functions.

12 months agoCirrus CI: Add another missing package.
Denis Ovsienko [Mon, 1 Apr 2024 13:23:38 +0000 (14:23 +0100)] 
Cirrus CI: Add another missing package.

make releasecheck
/bin/sh: 10: git: not found
/bin/sh: 15: git: not found
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
make: *** [Makefile:184: releasetar] Error 2

12 months agoFixup the previous commit.
Denis Ovsienko [Mon, 1 Apr 2024 13:20:19 +0000 (14:20 +0100)] 
Fixup the previous commit.

./configure needs libpcap, use a distribution package.

12 months agoCirrus CI: Reduce the footprint a little bit.
Denis Ovsienko [Mon, 1 Apr 2024 13:11:23 +0000 (14:11 +0100)] 
Cirrus CI: Reduce the footprint a little bit.

Use parallel build for macOS only, for FreeBSD and Coverity use a single
CPU core, for Linux use a minimal configuration and remove the build
matrix from the task.

12 months agoCirrus CI: Do not test on FreeBSD 14.0. [skip ci]
Denis Ovsienko [Sun, 31 Mar 2024 09:21:52 +0000 (10:21 +0100)] 
Cirrus CI: Do not test on FreeBSD 14.0. [skip ci]

Buildbot does it now.

13 months agoInclude <config.h> unconditionally
Francois-Xavier Le Bail [Wed, 27 Mar 2024 20:22:42 +0000 (21:22 +0100)] 
Include <config.h> unconditionally

Builds using Autotools or CMake generate config.h, thus remove the
'#ifdef HAVE_CONFIG_H'/'#endif'.

13 months agoUse <fcntl.h>, <stdint.h> and INT32_MAX directly.
Denis Ovsienko [Tue, 26 Mar 2024 00:07:20 +0000 (00:07 +0000)] 
Use <fcntl.h>, <stdint.h> and INT32_MAX directly.

They all are in POSIX.1-2001.

13 months agoForgot to include CHANGES in the previous commit.
Denis Ovsienko [Fri, 22 Mar 2024 18:09:58 +0000 (18:09 +0000)] 
Forgot to include CHANGES in the previous commit.

[skip ci]

13 months agoClarify the man page further.
Denis Ovsienko [Fri, 22 Mar 2024 18:03:55 +0000 (18:03 +0000)] 
Clarify the man page further.

Mention the imperfections from GH issue #23, fix a formatting
inconsistency for the time example.

[skip ci]

13 months agoCirrus CI: Try FreeBSD 13.3.
Denis Ovsienko [Thu, 14 Mar 2024 19:11:56 +0000 (19:11 +0000)] 
Cirrus CI: Try FreeBSD 13.3.

13 months agoAddress a few warnings from Sun C.
Denis Ovsienko [Thu, 14 Mar 2024 18:41:41 +0000 (18:41 +0000)] 
Address a few warnings from Sun C.

cc: Studio 12.6 Sun C 5.15 SunOS_i386 2017/05/30

"./seek-tell.c", line 57: warning: implicit function declaration: fseeko
"./seek-tell.c", line 63: warning: implicit function declaration: ftello
"./tcpslice.c", line 183: warning: implicit function declaration: getopt
"./tcpslice.c", line 205: warning: statement not reached
"./tcpslice.c", line 302: warning: implicit function declaration: fileno

13 months agoFix a shellcheck warning in the previous commit.
Denis Ovsienko [Thu, 14 Mar 2024 00:15:13 +0000 (00:15 +0000)] 
Fix a shellcheck warning in the previous commit.

13 months agoCI: Use a workaround for OpenIndiana Clang.
Denis Ovsienko [Wed, 13 Mar 2024 23:32:26 +0000 (23:32 +0000)] 
CI: Use a workaround for OpenIndiana Clang.

Same as in libpcap.

13 months agoUpdate -h (help) option to print 32/64-bit build and time_t size
Francois-Xavier Le Bail [Wed, 13 Mar 2024 14:56:15 +0000 (15:56 +0100)] 
Update -h (help) option to print 32/64-bit build and time_t size

With an Autoconf update: Get the size of a void * and a time_t.

With this change we know:
whether this is a 32-bit or 64-bit build ;
whether the time_t size is 32-bit or 64-bit.

13 months agoFix a typo
Francois-Xavier Le Bail [Tue, 12 Mar 2024 21:07:49 +0000 (22:07 +0100)] 
Fix a typo

Found by the codespell command.

[skip ci]

13 months agoAdd a warning flag (-Wundef)
Francois-Xavier Le Bail [Wed, 6 Mar 2024 17:03:11 +0000 (18:03 +0100)] 
Add a warning flag (-Wundef)

13 months agoFixup the previous commit.
Denis Ovsienko [Wed, 6 Mar 2024 12:03:44 +0000 (12:03 +0000)] 
Fixup the previous commit.

13 months agoCirrus CI: Try newer compilers on FreeBSD.
Denis Ovsienko [Wed, 6 Mar 2024 11:57:54 +0000 (11:57 +0000)] 
Cirrus CI: Try newer compilers on FreeBSD.

13 months agoCI: Use -errtags=yes for Sun C. [skip ci]
Denis Ovsienko [Mon, 4 Mar 2024 11:32:58 +0000 (11:32 +0000)] 
CI: Use -errtags=yes for Sun C. [skip ci]

13 months agoCI: Improve Haiku identification. [skip ci]
Denis Ovsienko [Wed, 28 Feb 2024 15:34:54 +0000 (15:34 +0000)] 
CI: Improve Haiku identification. [skip ci]

Before: Haiku-hrev57609 Feb 28 2024 07:02:35
After: Haiku-hrev57609

Before: Haiku-hrev56578
After: Haiku-hrev56578+95

14 months agoExtend "make shellcheck" onto mkdep too.
Denis Ovsienko [Fri, 9 Feb 2024 22:31:30 +0000 (22:31 +0000)] 
Extend "make shellcheck" onto mkdep too.

Same as in tcpdump.

14 months agomkdep: Use TMPDIR if it is set and not null
Francois-Xavier Le Bail [Tue, 6 Feb 2024 12:38:26 +0000 (13:38 +0100)] 
mkdep: Use TMPDIR if it is set and not null

14 months agoCI: Copy recent improvements from libpcap.
Denis Ovsienko [Sun, 4 Feb 2024 15:10:30 +0000 (15:10 +0000)] 
CI: Copy recent improvements from libpcap.

15 months agoStart tcpslice 1.8-PRE-GIT.
Denis Ovsienko [Tue, 23 Jan 2024 13:45:22 +0000 (13:45 +0000)] 
Start tcpslice 1.8-PRE-GIT.

[skip ci]

15 months agoThis is tcpslice 1.7. tcpslice-1.7
Denis Ovsienko [Tue, 23 Jan 2024 12:48:26 +0000 (12:48 +0000)] 
This is tcpslice 1.7.

15 months agoAutoconf: Set PACKAGE_BUGREPORT in AC_INIT().
Denis Ovsienko [Tue, 23 Jan 2024 12:47:17 +0000 (12:47 +0000)] 
Autoconf: Set PACKAGE_BUGREPORT in AC_INIT().

15 months agoautoconf: Update config.{guess,sub}, timestamps 2024-01-01
Francois-Xavier Le Bail [Mon, 22 Jan 2024 17:43:30 +0000 (18:43 +0100)] 
autoconf: Update config.{guess,sub}, timestamps 2024-01-01

15 months agoIn INSTALL.md say "missing" is not really there.
Denis Ovsienko [Mon, 22 Jan 2024 17:07:26 +0000 (17:07 +0000)] 
In INSTALL.md say "missing" is not really there.

(since commit 07d50c9)

[skip ci]

15 months agoFix a typo
Francois-Xavier Le Bail [Mon, 22 Jan 2024 09:48:43 +0000 (10:48 +0100)] 
Fix a typo

Found by the codespell command.

[skip ci]

15 months agoSpell INSTALL.md in aclocal.m4.
Denis Ovsienko [Sat, 20 Jan 2024 15:47:47 +0000 (15:47 +0000)] 
Spell INSTALL.md in aclocal.m4.

I forgot to make these changes in the earlier commit 017ee31, which
converted the file.  Make the error messages the same as in tcpdump
aclocal.m4.

15 months agoExtend "make shellcheck" onto autogen.sh too.
Denis Ovsienko [Sat, 20 Jan 2024 14:45:02 +0000 (14:45 +0000)] 
Extend "make shellcheck" onto autogen.sh too.

Address a warning from shellcheck 0.9.0:

autogen.sh:11:39: warning: Prefer [ p ] && [ q ] as [ p -a q ] is not
  well defined. [SC2166]

15 months agoRemove remaining props for IRIX and OSF/1.
Denis Ovsienko [Sat, 20 Jan 2024 13:54:26 +0000 (13:54 +0000)] 
Remove remaining props for IRIX and OSF/1.

15 months agoAdd more entries to the 1.7 section in CHANGES.
Denis Ovsienko [Fri, 19 Jan 2024 22:00:37 +0000 (22:00 +0000)] 
Add more entries to the 1.7 section in CHANGES.

Condense the old sections for consistency.

15 months agoAdd recent contributors to CREDITS.
Denis Ovsienko [Fri, 19 Jan 2024 20:49:03 +0000 (20:49 +0000)] 
Add recent contributors to CREDITS.

16 months agoCirrus CI: Drop FreeBSD 12.4 and add 14.0.
Denis Ovsienko [Wed, 13 Dec 2023 14:33:26 +0000 (14:33 +0000)] 
Cirrus CI: Drop FreeBSD 12.4 and add 14.0.

Same as in tcpdump.

16 months agoCI: Copy build_common.sh from libpcap.
Denis Ovsienko [Sat, 9 Dec 2023 19:11:33 +0000 (19:11 +0000)] 
CI: Copy build_common.sh from libpcap.

16 months agobuild_matrix.sh: Fix a shellcheck note
Francois-Xavier Le Bail [Sun, 3 Dec 2023 15:58:35 +0000 (16:58 +0100)] 
build_matrix.sh: Fix a shellcheck note

The note was:
Double quote to prevent globbing and word splitting. [SC2086]

17 months agoLook for the VERSION file in the source directory.
Guy Harris [Sat, 25 Nov 2023 21:45:16 +0000 (13:45 -0800)] 
Look for the VERSION file in the source directory.

This matches libpcap and tcpdump.

It used to be necessary for out-of-tree builds.  It's no longer needed
for that, but at least it means that attempts to build a release tarball
will fail with "you're not in a git clone directory" rather than "I
can't find the VERSION file".

Now that the configure script is no longer in the repository, but is
generated by autogen.sh, and given that configure.ac gets the package
version from the VERSION file, we should probably just use
PACKAGE_VERSION in Makefile.in rather than `cat $(srcdir)/VERSION`.

17 months agoinstrument functions: Use two loop indexes with reduced scopes
Francois-Xavier Le Bail [Mon, 30 Oct 2023 16:20:26 +0000 (17:20 +0100)] 
instrument functions: Use two loop indexes with reduced scopes

The first is a long, comparison with the long 'symcount'.
The second is a int, comparison with the int 'profile_func_level'.

Moreover:
Add a cast to silence the following warning:
./instrument-functions.c:143:31: warning: implicit conversion changes
signedness: 'long' to 'unsigned long' [-Wsign-conversion]
        symtab = (asymbol **)malloc(symsize);
                             ~~~~~~ ^~~~~~~
(symsize is a long as return type of bfd_get_symtab_upper_bound().)

(Same as in tcpdump.)

[skip ci]

21 months agoAdd some warning flags for clang 13 or newer
Francois-Xavier Le Bail [Fri, 28 Jul 2023 12:44:57 +0000 (14:44 +0200)] 
Add some warning flags for clang 13 or newer

-Wnull-pointer-subtraction
-Wunused-but-set-parameter
-Wunused-but-set-variable

22 months agoPrefer calloc over malloc 21/head
Rose [Sun, 4 Jun 2023 17:13:40 +0000 (13:13 -0400)] 
Prefer calloc over malloc

malloc + memset can be better expressed as calloc.

22 months agoMerge pull request #22 from jsoref/spelling
Guy Harris [Thu, 15 Jun 2023 04:45:52 +0000 (21:45 -0700)] 
Merge pull request #22 from jsoref/spelling

spelling: subsequent

22 months agospelling: subsequent 22/head
Josh Soref [Thu, 15 Jun 2023 04:30:05 +0000 (00:30 -0400)] 
spelling: subsequent

Signed-off-by: Josh Soref <[email protected]>
22 months agoMakefile.in: Update the whitespacecheck target
Francois-Xavier Le Bail [Thu, 1 Jun 2023 13:29:35 +0000 (15:29 +0200)] 
Makefile.in: Update the whitespacecheck target

install-sh has no longer a tab at the end of one line.

This is a follow-up to e2c80762d208f5b6fc3911b002da2df1d1c180c5.

22 months agoUpdate install-sh script to the latest available version
Rose [Wed, 31 May 2023 16:09:22 +0000 (12:09 -0400)] 
Update install-sh script to the latest available version

The version of install-sh we have was made over 2 decades ago,
and last edited 9 years ago.

I updated the script by running autoreconf -fiv on autoconf 2.71,
and autoreconf automatically updated the script.

23 months agoCirrus CI: Back GCC version off on Linux.
Denis Ovsienko [Sun, 7 May 2023 23:37:32 +0000 (00:37 +0100)] 
Cirrus CI: Back GCC version off on Linux.

Unfortunately, a simple workaround did not work, so let's leave the GCC
part of Linux task as it was for now.  Set LANG same as in tcpdump.

23 months agoCirrus CI: Try to fix things after the previous commit.
Denis Ovsienko [Sun, 7 May 2023 23:24:19 +0000 (00:24 +0100)] 
Cirrus CI: Try to fix things after the previous commit.

Apparently, Clang 16 is not available on FreeBSD 12.4, let's see if
Clang 15 is.  In the Linux task specify CC so Autoconf can generate the
Makefile (steps that do not involve any C compliling should not depend
on a C compiler presence, maybe in future this will have a better
solution).

23 months agoCirrus CI: Bump a few versions up.
Denis Ovsienko [Sun, 7 May 2023 23:03:43 +0000 (00:03 +0100)] 
Cirrus CI: Bump a few versions up.

FreeBSD 13.2 was released almost a month ago, let's see if it is
available in this infrastructure.  Try switching to Clang 16 in the
same go.  Whilst at it, switch from default to the most recent compiler
versions on Ubuntu 22.04, which already works fine in Buildbot.

23 months agoinstrument functions: Reduce the scope of a variable
Francois-Xavier Le Bail [Thu, 4 May 2023 11:24:06 +0000 (13:24 +0200)] 
instrument functions: Reduce the scope of a variable

Fix the cppcheck warning:
instrument-functions.c:77:15: warning: The scope of the variable
'instrument_type' can be reduced. [variableScope]

[skip ci]

2 years agoUpdate config.{guess,sub}, timestamps 2023-01-01,2023-01-21
Francois-Xavier Le Bail [Thu, 6 Apr 2023 12:47:18 +0000 (14:47 +0200)] 
Update config.{guess,sub}, timestamps 2023-01-01,2023-01-21

From repository git://git.savannah.gnu.org/config.git

2 years agoCheck for errors before calling posix_fadvise().
Denis Ovsienko [Tue, 28 Mar 2023 19:20:58 +0000 (20:20 +0100)] 
Check for errors before calling posix_fadvise().

These error conditions are unlikely, but let's not count on that.

2 years agoAutoconf: Synchronize with tcpdump aclocal.m4.
Denis Ovsienko [Mon, 27 Mar 2023 00:00:56 +0000 (01:00 +0100)] 
Autoconf: Synchronize with tcpdump aclocal.m4.

Minimize the diff and update the change log.

2 years agoconfigure: don't use egrep, use $EGREP.
Guy Harris [Sun, 12 Feb 2023 10:23:18 +0000 (02:23 -0800)] 
configure: don't use egrep, use $EGREP.

(ported from tcpdump commit 7659491)

2 years agoOn Solaris, for 64-bit builds, use the 64-bit pcap-config.
Guy Harris [Sun, 8 Aug 2021 07:36:42 +0000 (00:36 -0700)] 
On Solaris, for 64-bit builds, use the 64-bit pcap-config.

(ported from tcpdump commit c39d40a)

2 years agoconfigure: special-case macOS /usr/bin/pcap-config as we do in CMake.
Guy Harris [Tue, 3 Aug 2021 19:58:34 +0000 (12:58 -0700)] 
configure: special-case macOS /usr/bin/pcap-config as we do in CMake.

(ported from tcpdump commit fc240c6)

2 years agoautoconf: Find a local libpcap even with rcX directory suffix
Francois-Xavier Le Bail [Mon, 7 Jun 2021 19:01:15 +0000 (21:01 +0200)] 
autoconf: Find a local libpcap even with rcX directory suffix

(ported from tcpdump commit f91ef58)

2 years agoRemove a trailing tab
Francois-Xavier Le Bail [Sat, 1 Aug 2020 10:04:52 +0000 (12:04 +0200)] 
Remove a trailing tab

(ported from tcpdump commit a4e0f7d)

2 years agoautoconf: replace --with-system-libpcap with --disable-local-libpcap.
Guy Harris [Mon, 20 Jul 2020 03:12:32 +0000 (20:12 -0700)] 
autoconf: replace --with-system-libpcap with --disable-local-libpcap.

(ported from tcpdump commit daff285)

2 years agoFix --static-pcap-only test on Solaris 10.
Denis Ovsienko [Sun, 26 Mar 2023 21:23:00 +0000 (22:23 +0100)] 
Fix --static-pcap-only test on Solaris 10.

(Same as in tcpdump.)

Before:

checking for pcap-config... ../libpcap/pcap-config
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
checking for pcap_loop... no
configure: error: This is a bug, please follow...

After:

checking for pcap-config... ../libpcap/pcap-config
checking for pcap_loop... yes

2 years agoFixup the previous commit. [skip ci]
Denis Ovsienko [Sun, 26 Mar 2023 16:55:08 +0000 (17:55 +0100)] 
Fixup the previous commit. [skip ci]

In fact, Haiku has posix_fadvise().

2 years agoUse posix_fadvise() on input files if available.
Denis Ovsienko [Sun, 26 Mar 2023 16:37:29 +0000 (17:37 +0100)] 
Use posix_fadvise() on input files if available.

Let's confirm this works as expected before trying the same elsewhere.

2 years agoAutoconf: Lose unused tcpslice_telloseeko.
Denis Ovsienko [Sun, 26 Mar 2023 15:59:16 +0000 (16:59 +0100)] 
Autoconf: Lose unused tcpslice_telloseeko.

This variable is unused since commit e1467ce.

2 years agoCirrus CI: Configure with --enable-instrument-functions, Coverity task
Francois-Xavier Le Bail [Fri, 10 Mar 2023 20:30:11 +0000 (21:30 +0100)] 
Cirrus CI: Configure with --enable-instrument-functions, Coverity task

Add the required binutils-dev package.

[skip ci]

2 years agoinstrument functions: Use an environment variable instead of config files
Francois-Xavier Le Bail [Sun, 12 Mar 2023 17:59:24 +0000 (18:59 +0100)] 
instrument functions: Use an environment variable instead of config files

If the environment variable INSTRUMENT is
- unset or set to an empty string, print nothing, like with no
  instrumentation
- set to "all" or "a", print all the functions names
- set to "global" or "g", print only the global functions names

The configuration with --enable-instrument-functions remains.

Note that before this change, the default was to print all functions.
Now it is to print nothing.

This allows to run:
$ INSTRUMENT=a ./tcpslice ...
$ INSTRUMENT=g ./tcpslice ...
$ INSTRUMENT= ./tcpslice ...
or
$ export INSTRUMENT=global
$ ./tcpslice ...

This also allows to run the statically compiled binary on another host
after copying it.

It is no longer necessary to modify the configuration with:
$ make instrument_all
$ make instrument_global
$ make instrument_off
(Targets removed.)

Update .gitignore and Makefile.in accordingly.

Moreover:
Reduce the scope of a variable.
Rename a variable.
Remove '\n' in the perror() call.
Remove 2 spaces in function calls (style).

2 years agoinstrument functions: Add a NULL check
Francois-Xavier Le Bail [Fri, 10 Mar 2023 22:21:00 +0000 (23:21 +0100)] 
instrument functions: Add a NULL check

This should fix Coverity CID 310986:
Null pointer dereferences  (FORWARD_NULL)
Passing null pointer "func" to "strncmp", which dereferences it.

2 years agoinstrument functions: Add a length check
Francois-Xavier Le Bail [Fri, 10 Mar 2023 21:37:00 +0000 (22:37 +0100)] 
instrument functions: Add a length check

We need space for the '\0'.

This should fix Coverity CID 310985.

Moreover:
Use '\0' for the null character.

2 years agoGet the patterns right in .gitignore.
Denis Ovsienko [Fri, 3 Mar 2023 22:33:00 +0000 (22:33 +0000)] 
Get the patterns right in .gitignore.

Almost all files there are meant to be in the source tree root.

[skip ci]

2 years agoMakefile.in: Add instrument-functions.o in CLEANFILES
Francois-Xavier Le Bail [Wed, 1 Mar 2023 14:11:44 +0000 (15:11 +0100)] 
Makefile.in: Add instrument-functions.o in CLEANFILES

It is not in OBJ because it is optionally built.

[skip ci]

2 years agotcpslice(1): Use bold font more consistently. [skip ci]
Denis Ovsienko [Sun, 26 Feb 2023 13:21:01 +0000 (13:21 +0000)] 
tcpslice(1): Use bold font more consistently. [skip ci]

Pay attention to the surrounding punctuation, use bold for file names.

2 years agoCI: Introduce TEST_RELEASETAR. [skip ci]
Denis Ovsienko [Sat, 25 Feb 2023 17:28:36 +0000 (17:28 +0000)] 
CI: Introduce TEST_RELEASETAR. [skip ci]

The default behaviour is the same as before, setting it to "no" works
around broken build matrix on AIX 7.1 and 7.2.

2 years agoState there are currently no OS dependent defines and prototypes
Francois-Xavier Le Bail [Fri, 24 Feb 2023 08:27:45 +0000 (09:27 +0100)] 
State there are currently no OS dependent defines and prototypes

The last header was removed by commit
55f6b22a08f36b6127ad05a44e498d576b639ff9.

2 years agoinstrument functions: Minimize stat() calls
Francois-Xavier Le Bail [Fri, 17 Feb 2023 03:33:09 +0000 (04:33 +0100)] 
instrument functions: Minimize stat() calls

This change decreases the execution time when the file indicating that
instrumentation is "off" exists.

[skip ci]

2 years agoMake a comment more readable
Francois-Xavier Le Bail [Wed, 15 Feb 2023 08:50:22 +0000 (09:50 +0100)] 
Make a comment more readable

Moreover:
Replace the deprecated 'egrep' variant by 'grep -E'.

[skip ci]

2 years agoMakefile.in: Update whitespacecheck target to show spaces before tabs
Francois-Xavier Le Bail [Tue, 14 Feb 2023 18:55:54 +0000 (19:55 +0100)] 
Makefile.in: Update whitespacecheck target to show spaces before tabs

2 years agoAvoid a space before a tab
Francois-Xavier Le Bail [Tue, 14 Feb 2023 18:33:54 +0000 (19:33 +0100)] 
Avoid a space before a tab

This change avoids a false positive when looking for bad indentations.