aboutsummaryrefslogtreecommitdiffstats
path: root/src/fnettrace
Commit message (Collapse)AuthorAge
* build: ensure fnettrace prints to stdoutLibravatar Kelvin M. Klann2024-02-12
| | | | | | | | | | | | | Currently it is the only part of the build that prints to stderr on a normal build, which makes it harder to keep just the warnings and errors in the output: $ ./configure >/dev/null && make clean >/dev/null && make -j "$(nproc)" >/dev/null static ip map: input 5998, output 2490 Added on commit f3774678f ("compress static ip map for fnettrace at compile time", 2023-07-06).
* build: simplify clean targetLibravatar Kelvin M. Klann2024-01-31
| | | | Move some clean commands into more relevant makefiles.
* build: use full paths on compile/link targetsLibravatar Kelvin M. Klann2024-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the compile commands clearer when building in parallel (with `make -j`) and ensures that `__FILE__` includes the full build-time path (relative to the root of the repository) whenever it is referenced, such as in failed assert() messages (currently the full path is only shown in errExit() messages). Example: Before: firejail: main.c:100: main: Assertion `1 == 2' failed. Error src/firecfg/main.c:100: main: malloc: Cannot allocate memory After: firejail: ../../src/firejail/main.c:100: main: Assertion `1 == 2' failed. Error ../../src/firecfg/main.c:100: main: malloc: Cannot allocate memory Commands used to search and replace: $ git grep -Ilz '^MOD_DIR =' -- '*Makefile' | xargs -0 -I '{}' \ sh -c "printf '%s\n' \"\$(sed -E \ -e 's|^MOD_DIR = src/(.*)|MOD = \\1\\nMOD_DIR = \$(ROOT)/src/\$(MOD)|' \ -e 's:^(PROG|SO) = [^.]+(\.so)?$:\\1 = \$(MOD_DIR)/\$(MOD)\2:' \ '{}')\" >'{}'" $ git grep -Ilz '^HDRS :=' -- '*.mk' | xargs -0 -I '{}' \ sh -c "printf '%s\n' \"\$(sed -E \ -e 's|wildcard (\*\..)|wildcard \$(MOD_DIR)/\\1|' '{}')\" >'{}'" Note: config.mk.in, src/fnettrace/Makefile and src/include/common.h were edited manually. This is a follow-up to #5871.
* update copyright 2024Libravatar netblue302024-01-12
|
* mergesLibravatar netblue302023-12-21
|
* nettraceLibravatar netblue302023-12-04
|
* mergesLibravatar netblue302023-11-24
|
* enabled nettraces by default in the main build - you would need to be root ↵landlock-splitLibravatar netblue302023-10-24
| | | | to run these options
* update disable-devel.incLibravatar netblue302023-08-22
|
* more domains for static-ip-mapLibravatar netblue302023-08-20
|
* build: fix codespell errorsLibravatar Kelvin M. Klann2023-08-12
| | | | | | | | | | | | | | | | | | | | | This fixes the following errors: $ make codespell [...] codespell --ignore-regex "UE|creat|doas|shotcut|ether" src test src/firemon/procevent.c:188: duble ==> double src/fnettrace/main.c:30: postive ==> positive src/fnettrace/main.c:30: defiend ==> defined src/fnettrace/main.c:482: isplay ==> display make: *** [Makefile:371: codespell] Error 65 $ codespell --version 2.2.5 Added in the following commits: * bef5d86a1 ("increase socket buffer size for firemon, bug #2700", 2019-09-29) * c4962789f ("nettrace stats", 2023-08-08)
* small nettrace updateLibravatar netblue302023-08-11
|
* nettrace statsLibravatar netblue302023-08-08
|
* cleanupLibravatar netblue302023-07-27
|
* netlock/nettrace cleanupLibravatar netblue302023-07-26
|
* cleanupLibravatar netblue302023-07-25
|
* integrating nettrace dnstrace and snitraceLibravatar netblue302023-07-24
|
* fnettrace: trace ICPM ECHO (ping) trafficLibravatar netblue302023-07-23
|
* hostnames.c: fix scan-build warningLibravatar Kelvin M. Klann2023-07-20
| | | | | | | | | | | | | | | | This is breaking scan-build in CI[1]: /usr/share/clang/scan-build-14/bin/../libexec/ccc-analyzer [...] -c hostnames.c -o hostnames.o hostnames.c:59:10: warning: Null pointer passed to 1st parameter expecting 'nonnull' [core.NonNullParamChecker] return strdup(rv); ^~~~~~~~~~ 1 warning generated. Likely caused by commit d2802ce60 ("fnettrace cleanup", 2023-07-15). This also fixes a memory leak of `cmd`. [1] https://github.com/netblue30/firejail/actions/runs/5568460702/jobs/10171098449
* feature: stats support for --nettraceLibravatar netblue302023-07-16
|
* fnettrace cleanupLibravatar netblue302023-07-15
|
* build: remove extraneous blank lines in makefilesLibravatar Kelvin M. Klann2023-07-12
| | | | | | | | Added in the following commits: * f3774678f ("compress static ip map for fnettrace at compile time", 2023-07-06) * 9e206b7f2 ("rework src/man Makefile", 2023-07-07)
* fix random hostnameLibravatar netblue302023-07-10
|
* compress static ip map for fnettrace at compile timeLibravatar netblue302023-07-06
|
* rename static-ip-map to static-ip-map.txtLibravatar netblue302023-07-05
|
* Merge pull request #5871 from kmk3/improve-errexitLibravatar Kelvin M. Klann2023-07-01
|\ | | | | modif: improve errExit error messages
| * Improve errExit error messagesLibravatar Kelvin M. Klann2023-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: * Move msg to the end of errExit (right before perror(3p)) * Include the full file path (within the repository) * Add "()" to function name for clarity Before: Error malloc: main.c:123 main: Cannot allocate memory After: Error src/firejail/main.c:123 main(): malloc: Cannot allocate memory Note: This clarifies which is the exact file that the error message comes from, as there are many source files with the same name. For example: $ git ls-files 'src/*/main.c' | wc -l 20
* | fbreader/FBReader profile fixes; more on static ip mapLibravatar netblue302023-06-27
|/
* fix geoiplookup executable detection for --nettraceLibravatar netblue302023-06-25
|
* QUIC (HTTP/3) support in --nettraceLibravatar netblue2023-06-25
|
* build: move MAKEFLAGS to config.mk.inLibravatar Kelvin M. Klann2023-06-24
| | | | | | | To reduce the amount of boilerplate in the makefiles. This amends commit 9789c263a ("build: disable all built-in implicit make rules", 2023-06-21) / PR #5864.
* build: disable all built-in implicit make rulesLibravatar Kelvin M. Klann2023-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use `make -r` to reduce unnecessary filesystem lookups. Overall, this appears to reduce the amount of implicit rule searches by ~93.3% (~97.5% compared to a8f01a383) for the default build and by ~83.3% (~99.3% compared to a8f01a383) for the "man" target (as an example): $ git show --pretty='%h %ai %s' -s a8f01a383 2023-06-20 05:26:23 +0000 Merge pull request #5859 from kmk3/build-remove-retpoline $ ./configure >/dev/null $ make clean >/dev/null && make --debug=i -j 4 | grep -F 'Trying implicit' | wc -l 6798 $ make clean >/dev/null && make --debug=i -j 4 man | grep -F 'Trying implicit' | wc -l 1085 # (in the previous commit) $ make clean >/dev/null && make --debug=i -j 4 | grep -F 'Trying implicit' | wc -l 2535 $ make clean >/dev/null && make --debug=i -j 4 man | grep -F 'Trying implicit' | wc -l 42 # (with this commit applied) $ make clean >/dev/null && make --debug=i -j 4 | grep -F 'Trying implicit' | wc -l 170 $ make clean >/dev/null && make --debug=i -j 4 man | grep -F 'Trying implicit' | wc -l 7 Environment: GNU make 4.4.1-2 on Artix Linux. Note: According to make(1p) in POSIX.1-2017, "If .SUFFIXES does not have any prerequisites, the list of known suffixes shall be cleared.", while "The result of setting MAKEFLAGS in the Makefile is unspecified." Commands used to search and replace: $ git ls-files -z -- '*Makefile*' | xargs -0 -I '{}' sh -c \ "printf '%s\n' \"\$(sed -E \ 's/^(.SUFFIXES:)/\1\nMAKEFLAGS += -r\n/' '{}')\" >'{}'"
* build: disable most built-in implicit make rulesLibravatar Kelvin M. Klann2023-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clear `.SUFFIXES:` to reduce unnecessary filesystem lookups. Overall, this appears to reduce the amount of implicit rule searches by ~62% for the default build and by ~96% for the "man" target (as an example): $ git checkout master >/dev/null 2>&1 $ git show --pretty='%h %ai %s' -s a8f01a383 2023-06-20 05:26:23 +0000 Merge pull request #5859 from kmk3/build-remove-retpoline $ ./configure >/dev/null $ make clean >/dev/null && make --debug=i -j 4 | grep -F 'Trying implicit' | wc -l 6798 $ make clean >/dev/null && make --debug=i -j 4 man | grep -F 'Trying implicit' | wc -l 1085 # (with this commit applied) $ make clean >/dev/null && make --debug=i -j 4 | grep -F 'Trying implicit' | wc -l 2535 $ make clean >/dev/null && make --debug=i -j 4 man | grep -F 'Trying implicit' | wc -l 42 Environment: GNU make 4.4.1-2 on Artix Linux. Commands used to search and replace: $ git ls-files -z -- '*Makefile*' | xargs -0 -I '{}' sh -c \ "printf '%s\n' \"\$(sed '1s/^/.SUFFIXES:\n/' '{}')\" >'{}'" See also commit f48886f25 ("build: mark most phony targets as such", 2023-02-01) / PR #5637.
* Move usage text into usage_str varLibravatar Kelvin M. Klann2023-05-14
| | | | | | | | | | | | | | | For consistency and readability. Note: This also makes exactly one extra blank line be printed at the end of every usage text, which is currently only done in the following files: * src/fcopy/main.c * src/fnettrace-dns/main.c * src/fnettrace-icmp/main.c * src/fnettrace-sni/main.c * src/fnettrace/main.c * src/profstats/main.c
* Fix EOL at EOFLibravatar Kelvin M. Klann2023-02-19
| | | | | | | | | | | | | | | | | | Commands used to search and replace: $ git grep -Ilz '.' | xargs -0 -I '{}' sh -c \ "printf '%s\n' \"\$(cat '{}')\" >'{}'" The above commands ensure that there is exaclty 1 line terminator at EOF (rather than 0 or more than 1) on all non-empty text files. This fixes all of the "new blank line at EOF" errors raised by git: $ git diff --check 4b825dc642cb6eb9a060e54bf8d69288fbee4904..HEAD | grep '^[^+]' | cut -f 3 -d : | LC_ALL=C sort | uniq -c 21 new blank line at EOF. 72 space before tab in indent. 4 trailing whitespace.
* Update copyright to 2023 (#5664)Libravatar David Fetter2023-02-15
|
* rel 0.9.72 testingLibravatar netblue302023-01-12
|
* small nettrace fixesLibravatar netblue302022-12-09
|
* makefiles: rename common.mk to prog.mkLibravatar Kelvin M. Klann2022-11-21
| | | | | | | | | | | | For clarity, as it is included by the Makefiles that create programs and non-shared-objects, but not by the ones that create shared objects (see src/so.mk). Commands used to move and search and replace: $ git mv src/common.mk src/prog.mk $ git grep -IFlz 'common.mk' -- src | xargs -0 -I '{}' sh -c \ "printf '%s\n' \"\$(sed 's/common.mk/prog.mk/' '{}')\" >'{}'"
* makefiles: deduplicate many makefiles into common.mkLibravatar Kelvin M. Klann2022-11-21
| | | | | | | | | | The makefiles that both build C programs and include src/common.mk are nearly identical, save for the main target name and for any extra headers and objects that they might use. So move all of their (duplicated) code into src/common.mk, which (other than the "lib" target on src/lib/Makefile) leaves only variables and the includes of config.mk and src/common.mk in place.
* makefiles: deduplicate main target name into new PROG varLibravatar Kelvin M. Klann2022-11-21
| | | | | | | | | | Put the main target name into a new PROG variable, put PROG into a new TARGET variable, make "all" depend on `$(TARGET)` and replace every other occurrence of the main target name with `$(PROG)`. On the makefiles that build non-shared objects, to make them more similar. With this commit, all of their targets are identical (except for the extra "lib" target on src/lib/Makefile).
* makefiles: rename H_FILE_LIST and C_FILE_LISTLibravatar Kelvin M. Klann2022-11-21
| | | | | | | | | | | | | | | | | | | To HDRS and SRCS, respectively. To be more consistent with the OBJS variable. Misc: These names also appear to be more common from the makefiles that I've seen. Commands used to search and replace: git grep -IFlz -e H_FILE_LIST -e C_FILE_LIST -- src | xargs -0 -I '{}' sh -c "printf '%s\n' \"\$(sed \ -e 's/^H_FILE_LIST *=/HDRS =/' \ -e 's/\$(H_FILE_LIST)/\$(HDRS)/g' \ -e 's/^C_FILE_LIST *=/SRCS =/' \ -e 's/\$(C_FILE_LIST:/\$(SRCS:/g' \ '{}')\" >'{}'"
* makefiles: include config.mk directlyLibravatar Kelvin M. Klann2022-11-21
| | | | | | | Instead of including it through src/common.mk. This allows each makefile to directly override any value defined in config.mk.
* nettrace: various fixesLibravatar netblue302022-10-25
|
* include limits.h instead of manually defining LINE_MAXLibravatar Reiner Herrmann2022-10-23
|
* dnstrace and snitraceLibravatar netblue302022-10-23
|
* nettrace-dns and nettrace-sniLibravatar netblue302022-10-11
|
* nettrace - static ip map updateLibravatar netblue302022-10-04
|
* ICMP support in --nettraceLibravatar netblue302022-09-27
|
* update ip addr list for --nettraceLibravatar netblue302022-09-26
|