Commit Graph

10 Commits

Author SHA1 Message Date
Guy Harris
570bb7d1f8 CONTRIBUTION: mention the nd_ types.
While we're at it, define a complete set of nd_intN_t types, for all
values of N between 1 and 8, just as we have a complete set of
nd_uintN_t types.
2023-08-09 00:39:56 -07:00
Guy Harris
9ab359ed5e CONTRIBUTING: remove redundant information, add additional information. [skip ci]
Remove a paragraph left over from the process of editing.

Indicate what the individual ND_TCHECK_*() macros do, and indicate that
*n*, in the GET_*_n() macros, is the length of the item to be fetched,
in bytes.
2023-08-08 23:59:04 -07:00
Guy Harris
4c5691c2de CONTRIBUTING: add more details about GET_*() macros. [skip ci]
Expand the discussion of why bounds checks are a Good Thing.

List all the macros, including the "fetch an address and return a string
representation of the address" macros, and indicate what they do. Note
the additional advantage that they provide, namely that they 1) can
fetch unaligned values correctly and without a fault and 2) will fetch a
value in the specified byte order and return it in host byte order.
2023-08-08 23:51:16 -07:00
Francois-Xavier Le Bail
f6b74c5cf2 CONTRIBUTING.md: Update about 'struct tok' usage
[skip ci]
2023-05-23 16:46:23 +02:00
Francois-Xavier Le Bail
9ca86a0927 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. So by default 'make check' runs without errors.

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

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, CONTRIBUTING.md 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).

[skip ci]
2023-03-13 10:24:43 +01:00
Francois-Xavier Le Bail
9ab792b713 CONTRIBUTING: Add some tags 2022-10-17 14:51:30 +02:00
Francois-Xavier Le Bail
51d9642c0a CONTRIBUTING.md: Add information about the instrumentation of functions 2022-10-17 14:25:54 +02:00
Francois-Xavier Le Bail
91d3ed4dfb CONTRIBUTING.md: Document the use of "protocol: " in a commit summary
If the commit concerns a protocol, the summary line must start with
"protocol: ".
2022-09-03 20:46:15 +02:00
Francois-Xavier Le Bail
a0b5d87b67 Remove trailing spaces 2022-07-03 15:09:51 +02:00
Denis Ovsienko
af98bb4776 Convert CONTRIBUTING to Markdown. [skip ci] 2022-06-09 10:16:26 +01:00