The file could be compiled on demand using "make snprintf.o", although
with many warnings, but tcpdump build would never use the file
regardless of the variety of the build.
Some of the code there has been commented out since commit 45aef49 in
2001, and the rest became unused after commit 1ed63b5 in 2019.
This change do, in a fresh directory from a release archive:
1) a "configure --enable-smb" and build,
2) a "cmake -DENABLE_SMB=yes" and build.
It may allow to find some necessary files missing in the release archive.
Define CMAKE_MESSAGE_LOG_LEVEL=NOTICE to minimize the cmake output.
Define CMAKE_RULE_MESSAGES=OFF to minimize the make output in cmake case.
[skip ci]
These tricky targets used "autoreconf -f" (via "make releasetar") and
they changed the VERSION and configure files locally.
If building a release candidate tar archive is needed, it's better to:
Update VERSION with rcX suffix and configure via "autoreconf -f",
commit them, add a tag and build the archive via "make releasetar".
It should display: Archive build from tag tcpdump-...rcX.
Note: the "autoreconf -f" command changes the configure file in an
uncontrolled way (runstatedir, #define LARGE_OFF_T, etc.) depending on
the autoconf version.
It is necessary to choose the parts that will be added in the commit
with "git add -i".
This is a follow-up to c378c2a04c.
[skip ci]
Use the release tag if it exists or use HEAD.
Remove the "autoreconf -f" command, because it changes the configure file
locally in an uncontrolled way (runstatedir, #define LARGE_OFF_T, etc.)
depending on the autoconf version. This command is run in the release
process before a commit and we can choose the parts that will be added
in the commit.
Note:
The following target (rcX) must be updated ou removed in a next step
because it was using "autoreconf -f" (via "make releasetar") and it
changes the VERSION and configure files locally.
This change
1) Ensures that we only release files from tag/HEAD, not locally
modified ones.
2) Avoids disclosing personal data such as the username/group of the
local user.
3) Puts by default a umask of 0002, which turns off the world write bit
on files in the archive.
4) Avoids problems on some OSes (no more tar, Git builtin tar.gz
handling).
(Same as in libpcap commit d62ed0c.)
Before:
$ make releasetar
tar: CONTRIBUTING: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
Cleaning...
$ make distclean
After:
$ make releasetar
tar: CONTRIBUTING: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
make: *** [Makefile:475: releasetar] Error 2
Don't pad the pflog header with BPF_WORDALIGN(); round up to a multiple
of 4, instead, as that's what all but FreeBSD do, and FreeBSD used to do
that and should go back to doing so (kern/261566).
Don't rely on the OS's pflog include files to define direction types,
reason types, action types, or the layout of the header; instead, define
them ourselves in a header of our own, with #ifs to select the ones that
are only on some platforms. That way, it'll handle some fields and
field values (the ones common to all OSes with pflog) on all OSes, even
ones without pflog.
That also expands the set of direction, reason, and action codes to what
various *BSDs and Darwin support.
Also, handle all the different AF_INET6 values in various *BSDs and
Darwin.
If entering in a function, print also the calling function name with
file name and line number. There may be a small shift in the line number.
In some cases, with Clang 11, the file number is unknown (printed '??')
or the line number is unknown (printed '?'). In this case, use GCC.
To print nothing, like with no instrumentation:
$ make instrument_off
As before, the following commands are available:
To configure the printing of only the global functions names:
$ make instrument_global
To go back to print all the functions names:
$ make instrument_all
The library libbfd is used, therefore the binutils-dev package is required.
It prints now, by default, also the static functions names.
To configure the printing of only the global functions names, as before:
$ make instrument_global
To go back to print all the functions names:
$ make instrument_all
In case of truncation, the indentation level is reset to its previous
level in pretty_print_packet().
[skip ci]
We don't use it, and there's no Windows tradition of an "ethers file"
that I know of, so I'm not sure there's a reason to use it.
Fixes GitHub issue #971.
This should help some debugging processes.
Usage:
./configure --enable-instrument-functions
Generate instrumentation calls for entry and exit to functions.
Just after function entry and just before function exit, these
profiling functions are called and print the function names with
indentation and call level.
To instument a static function, remove temporarily the static specifier.
In case of truncation, the indentation level is reset currently to 1 in
pretty_print_packet(), main is level 0.
It's explicitly cheating in some places; just cast away the warnings.
Add a Clang version testing macro to compiler-tests.h.
Move the diagnostic control #defines from netdissect-stdinc.h to
diag-control.h, libpcap-style, so that they can be used by code that
doesn't use (or need) netdissect-stdinc.h. This also means that we can
limit the inclusion of diag-control.h, and the definition of those
Do them more libpcap-style, with separate DIAG_OFF/DIAG_ON pairs for
particular issues, rather than having DIAG_OFF() and DIAG_ON() macros
that take -W option names as arguments; that way, if we need to define
them for compilers that don't have the GCC/Clang syntax for those
pragmas, e.g. MSVC, we can do so.
Lose the README symlink, it was a bad idea of mine to add it in the
first place as it made the packaging problem space bigger, not smaller.
Remove two CI badges at the top of README.md. One badge was stale
anyway, and the other does not represent the current CI configuration,
which is bigger, changes frequently and fits the web-site much better.
Remove the reference to ITA, it has been down for quite a while, it
looks like it won't re-emerge this time.
Merge PLATFORMS into README.md.
This attempts to ensure that we get all the APIs for the platform
declared, including the ones that, shock horror, "pollute the
namespace".
This fixes some compile failures with Sun C on Solaris 11.
As discussed on GitHub and on the mailing list, install tcpdump into
bindir because it can be useful to non-root users too, in ways that do
not involve doing live packet captures. Original idea by Guy Harris.
Have mkdep take a -s argument, giving the source directory, and have it
prepend that directory to all source files before running them through
the compiler's make-dependencies operation.