This largely copies over Spicy's `.clang-format` configuration file. The
one place where we deviate is header include order since Zeek depends on
headers being included in a certain order.
For "individually different but deterministic" runs specifying Zeek's
seed as an environment variable eases setups as one can avoid creating
extra seed files for each of the individual processes.
It is an error to specify the new ZEEK_SEED_VALUES variable together
with the existing ZEEK_SEED_FILE and -G. ZEEK_SEED takes precedence over
deterministic mode (-D) like ZEEK_SEED_FILE does today already.
This adds a new utility called ci/collect-repo-info.py to produce a JSON
document that is then baked into the Zeek executable file. Further, when
creating a tarball via `make dist`, put a top-level repo-info.json file
in place that is picked when no .git directory exists.
Closes#1405
* microsoft/master: (71 commits)
Clang formatting
Mask ports before inserting them into the map
Fix compiler warning from applied patch
Remove statistics plugin in favor of stats bif
Add EventHandler version of stats plugin
Mark a few EventHandler methods const
Changed implementation from std::map to std::unordered_map of Val.cc
Removed const, Windows build is now working
Added fixes suggested in PR
Update src/packet_analysis/protocol/ip/IP.cc
Apply suggestions from code review
Clang format again but now with v13.0.1
Rewrote usages of define(_MSC_VER) to ifdef _MSC_VER
Clang format it all
Fixed initial CR comments
Add NEWS entry about Windows port
Add a couple of extra unistd.h includes to fix a build failure
Use std::chrono instead of gettimeofday
Update libkqueue submodule [nomail]
Don't call tokenize_string if the input string is empty
...
maintenance fixes for variadic run-time checks, '_' placeholder identifier
"-O allow-cond" permits compiling scripts to C++ when influenced by @if conditionals
more robust standalone compile-to-C++ properties
fix for nested "when" statements
test suite updates
* origin/topic/vern/CPP-speedup:
use iterator-based idiom for check-if-present-then-access
const-ify member function
switch looping over vectors to use iterators
remove unused local variables
efficiency fix - return a reference rather than a copy of a map
fix for case-sensitive file systems
geez sometimes it's signed sometimes it's not
documentation updates
remove -O add-C++ and -O update-C++ options
extensive rewrite of generation & execution of run-time initialization
factoring out CPPEscape to be a standalone function
removing unused SubNetType class
This commit also changes the PcapDumper to automatically flush after
every called to Dump(). This is because pcap_dump has an internal buffer
of some sort that only writes to the file after a set amount of bytes.
When using the new option on a low-traffic network, it might be a while
before you see any packets written since it has to overcome that buffer
limit first.
The `-B` flag allows to enable debug streams in Debug builds. We
previously didn't support passing the flag for other builds. With that
whether an invocation of `zeek` executed or not depended on the way zeek
was built.
With this patch we accept and parse the flag when passed in the
invocation, but ignore any requests for actual debug streams in
non-Debug builds (no streams are available). If `-B help` is passed we
emit a message and abort.
* origin/topic/vern/ZAM-prep: (45 commits)
whoops overlooked the need to canonicalize filenames
another set of tweaks per review comments
addressed a number of code review comments
baseline updates for merge
support "any" coercions for "-O gen-C++"
better descriptions for named record constructors
test suite baseline updates for "-a opt" optimize-AST alternative
test suite baseline updates for "-a xform" alternative / AST transformation
error propagation fix for AST reduction
updates to "-a inline" test suite alternative baseline
updates for the main test suite baseline
updates to test suite tests for compatibility with upcoming ZAM functionality
"-O compile-all" option to specify compilation of inlined functions
compile inlined functions if they're also used indirectly
provide ZAM-generated code with low-level access to record fields
fix for cloning records with fields of type "any"
direct access for ZAM to VectorVal internal vector
ZVal constructors, accessors & methods in support of ZAM
switch ZVal representation of types from Type objects to TypeVal's
revised error-reporting interface for ZVal's, to accommodate ZAM inner loop
...
- Use of "-B" now triggers usage output and errors out when Zeek
wasn't built with debugging support.
- Always keep the perftools options (-m, -M) in the optparse string,
for consistency with other flags dependent on configuration. We
still fall through to usage and erroring out as before.
- Minor indentation fix.