mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Move Location to zeek::detail and BroObj to zeek
This commit is contained in:
parent
58c6e10b62
commit
40ecede4ea
41 changed files with 158 additions and 131 deletions
|
@ -18,7 +18,6 @@
|
|||
namespace analyzer { class Analyzer; }
|
||||
namespace file_analysis { class File; }
|
||||
class Connection;
|
||||
class Location;
|
||||
class Reporter;
|
||||
class EventHandlerPtr;
|
||||
ZEEK_FORWARD_DECLARE_NAMESPACED(RecordVal, zeek);
|
||||
|
@ -30,6 +29,8 @@ using RecordValPtr = zeek::IntrusivePtr<RecordVal>;
|
|||
using StringValPtr = zeek::IntrusivePtr<StringVal>;
|
||||
}
|
||||
|
||||
ZEEK_FORWARD_DECLARE_NAMESPACED(Location, zeek::detail);
|
||||
|
||||
// One cannot raise this exception directly, go through the
|
||||
// Reporter's methods instead.
|
||||
|
||||
|
@ -94,7 +95,7 @@ public:
|
|||
|
||||
// Report a runtime error in evaluating a Bro script expression. This
|
||||
// function will not return but raise an InterpreterException.
|
||||
[[noreturn]] void RuntimeError(const Location* location, const char* fmt, ...) __attribute__((format(printf, 3, 4)));
|
||||
[[noreturn]] void RuntimeError(const zeek::detail::Location* location, const char* fmt, ...) __attribute__((format(printf, 3, 4)));
|
||||
|
||||
// Report a traffic weirdness, i.e., an unexpected protocol situation
|
||||
// that may lead to incorrectly processing a connnection.
|
||||
|
@ -130,11 +131,11 @@ public:
|
|||
// stack of location so that the most recent is always the one that
|
||||
// will be assumed to be the current one. The pointer must remain
|
||||
// valid until the location is popped.
|
||||
void PushLocation(const Location* location)
|
||||
{ locations.push_back(std::pair<const Location*, const Location*>(location, 0)); }
|
||||
void PushLocation(const zeek::detail::Location* location)
|
||||
{ locations.push_back(std::pair<const zeek::detail::Location*, const zeek::detail::Location*>(location, 0)); }
|
||||
|
||||
void PushLocation(const Location* loc1, const Location* loc2)
|
||||
{ locations.push_back(std::pair<const Location*, const Location*>(loc1, loc2)); }
|
||||
void PushLocation(const zeek::detail::Location* loc1, const zeek::detail::Location* loc2)
|
||||
{ locations.push_back(std::pair<const zeek::detail::Location*, const zeek::detail::Location*>(loc1, loc2)); }
|
||||
|
||||
// Removes the top-most location information from stack.
|
||||
void PopLocation()
|
||||
|
@ -288,7 +289,7 @@ private:
|
|||
bool after_zeek_init;
|
||||
bool abort_on_scripting_errors = false;
|
||||
|
||||
std::list<std::pair<const Location*, const Location*> > locations;
|
||||
std::list<std::pair<const zeek::detail::Location*, const zeek::detail::Location*> > locations;
|
||||
|
||||
uint64_t weird_count;
|
||||
WeirdCountMap weird_count_by_type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue