Robin Sommer
c3f6c8a4a0
bifcl: Fix compiler warning.
2025-08-20 08:52:24 -07:00
Jon Siwek
3a4f38a04b
bifcl: Port bifcl code from Bro
2025-08-20 08:52:24 -07:00
Jon Siwek
73e8f2c79d
bifcl: First commit
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
137e8bddc9
Run pre-commit on merged binpac code
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
8a7c6df278
Fix clang-tidy findings in the binpac lib code
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
6bddc06f8d
Add copyright headers to all of the binpac source files
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
0377486637
binpac: Remove submodule, adapt CMake configuration for Zeek build
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
79733d9390
binpac: Restore README file without version number
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
a25b5b65ff
binpac: Fix coverity unchecked return warning
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
d13cdd6427
binpac: Use std::move for a string value
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
710e2eaced
binpac: Make sure pac_expr fields are initialized
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
b9b4fcb78b
binpac: Require C++20 for builds
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
bb382fc0c0
binpac: Fix clang-tidy readability-isolate-declaration finding in generated code
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
ef962376bc
binpac: Add 'override' to virtual methods in generated code
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
28cc9ca3ec
binpac: Add NOLINT for clang-tidy performance-enum-size to generated headers
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
09936133a6
binpac: Reorder the fields in pac_type.h for better packing
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
45d07641e4
binpac: Make 'nullptr' a keyword, allow values to be set to it and compared against it
...
This helps fix 'modernize-use-nullptr' findings in generated code.
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
3cf68302a2
binpac: Make 'bool' a discrete type and handle it differently when generating code
...
This fixes clang-tidy modernize-use-bool-literals findings in the generated code
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
54a0e01805
binpac: Wrap generated switch statements in NOLINTs for bugprone-branch-clone
...
Binpac generates a lot of switch statements with repeated blocks in
them (typically empty blocks). Running clang-tidy on the generated code
with bugprone-branch-clone generates a lot of warnings. Instead of
doing a ton of analysis in binpac to avoid generating the duplicates,
just mark any switch generated with an annotation to avoid reporting
them.
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
670c4dcbcf
binpac: Add missing .cmake-format.json, reformat with pre-commit
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
dacfe747b9
binpac: Format output closer to what clang-format would output
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
964817f9bf
binpac: Add cmake-format and typos pre-commit configs
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
3297de477b
binpac: Reformat C++ code in Spicy style
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
716bf016a1
binpac: Remove usage of FindRequiredPackage
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
a4bc3fdf32
binpac: Add /J flag on Windows to force unsigned char
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
874de5d25b
binpac: Force -std=c++17 mode for cmake targets, remove use of RequireCXX17.cmake
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
b7cc5afa78
binpac: Require CMake 3.15.0 to build, similar to the recent changes to zeek and broker
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
d39df6b243
binpac: Remove vendored CMake files from repo
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
4d0a29a725
binpac: Don't output comment for &let/&withinput if no such fields exist
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
ba7a7c2201
binpac: Include stdint.h early to prevent redefinition of int type macros
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
e05a0b8748
binpac: Remove argument from BINPAC_LSAN_DISABLE macro to fix warning on Windows
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
5264b957f1
binpac: Generate range-based for loops for array cleanup
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
65da8cf5de
binpac: Avoid initializing array length variables twice in generated code
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
299f39e8e2
binpac: Mark overridden methods with 'override'
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
45ef19049c
binpac: Add final keyword to class definitions
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
613ffef4a2
binpac: Use nullptr in generated code
2025-08-20 08:52:24 -07:00
Tim Wojtulewicz
9f3750d0cc
binpac: Apply clang-tidy's modernize-use-nullptr check
2025-08-20 08:52:24 -07:00
Vern Paxson
49a96f5216
binpac: address linter warnings about use of sprintf()
2025-08-20 08:52:23 -07:00
Tomer Lev
d5f2c9c3a8
binpac: Only adding subdir if running standalone
2025-08-20 08:52:23 -07:00
Tomer Lev
9a4e01e634
binpac: Additional Windows fixes. Fixed wrong MSVC macro definition and std::filesystem invocation. Linking to libunistd library
2025-08-20 08:52:23 -07:00
Arne Welzel
60265b8ce7
binpac: pac_scan: Exit with failure for include errors
...
Elsewhere (zeek/zeek#2482 ), it was observed that when binpac encounters
include failures, it still exits with 0 indicating success. Subsequent
compilation of the produced .h and .cc files likely fails.
Exit with 1 on include errors to make pin pointing issues easier by
having make/ninja stop earlier.
2025-08-20 08:52:23 -07:00
Tim Wojtulewicz
d21f99ef2b
binpac: Wrap native dirname() call in ifdef, call std::filesystem on Windows
2025-08-20 08:52:23 -07:00
Elad Solomon
faa1b7abbf
binpac: Adapted binpac to compile with MSVC for Windows environment.
2025-08-20 08:52:23 -07:00
Tim Wojtulewicz
dd3737b5c8
binpac: Apply bits of nadi-bittorrent patch that aren't applied
2025-08-20 08:52:23 -07:00
Tim Wojtulewicz
090325df40
binpac: Add pre-commit hooks and run clang-format on everything
2025-08-20 08:52:23 -07:00
Tim Wojtulewicz
090ac0a6e0
binpac: Remove already-applied binpac-* patches
2025-08-20 08:52:23 -07:00
Tim Wojtulewicz
6034744a0c
binpac: Rename files in patches to match current directory structure
2025-08-20 08:52:23 -07:00
Seth Hall
c010152340
binpac: CMAKE_CFG_INTDIR is no longer necessary.
...
CMake documentation says that CMAKE_CFG_INTDIR is no longer necessary to
find the right binary for the configuration and is in fact deprecated in
recent versions of CMake.
2025-08-20 08:52:23 -07:00
Seth Hall
024b4ff8f3
binpac: Updates for building Zeek as a submodule
2025-08-20 08:52:23 -07:00
Jon Siwek
508e78ebe9
binpac: Prevent use of LeakSanitizer on FreeBSD
2025-08-20 08:52:23 -07:00