Commit graph

7 commits

Author SHA1 Message Date
Tim Wojtulewicz
770bc0491e Remove ghc::filesystem submodule, switch to std::filesystem 2025-07-14 11:23:54 -07:00
Tim Wojtulewicz
e613e7c304 Fix clang-tidy modernize-use-override warnings in headers 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
fb55c8856e Fix clang-tidy modernize-use-default-member-init warnings in headers 2025-06-23 08:35:24 -07:00
Christian Kreibich
dbad072f06 Modernize various C++/Zeek-isms in the MMDB code. 2024-01-11 17:13:41 -08:00
Christian Kreibich
e8f0f727cd Fix MMDB code to re-open explicitly opened DBs correctly
The filename from which a DB first gets opened (either via an explicitly
specified filename, or via the path sequence now configurable at the script
layer) is now "sticky", meaning re-opening won't switch to a different file.

This was easiest by moving most state into the MMDB class itself. The previous
approach of tracking the two DB instances via a smart pointer and blowing the
pointed-to objects away as needed is now instead one of two objects fixed over
the lifetime of Zeek, able to open/close/reopen their underlying Maxmind DBs.

The MMDB class now only has one Lookup() method since there was no need to break
them apart -- it saves the return of a MMDB_lookup_result_s over the stack and
there's no need for throwing an exception.
2024-01-10 20:44:40 -08:00
Christian Kreibich
07499cd2e5 Simplify MMDB code by moving more lookup functionality into MMDB class 2024-01-10 20:44:40 -08:00
Christian Kreibich
a06053ce75 Move MMDB logic out of mmdb.bif and into MMDB.cc/h.
This does not change the implementation except for some light renaming where
things are now naturally scoped within MMDB.cc.
2024-01-10 20:44:35 -08:00