mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 04:58:21 +00:00
Adapting attribute serialization when talking to Broccoli.
Broccoli doesn't support expressions, and we now no longer send them when serializing attributes. This is the Bro change mentioned in #606. It's needs a correspondinly modified Broccoli identifying itself as such, and it isn't tested yet ... Addresses #606.
This commit is contained in:
parent
01b4ea1f5d
commit
18d968adcd
4 changed files with 30 additions and 2 deletions
|
@ -15,6 +15,7 @@ public:
|
|||
pid_32bit = false;
|
||||
include_locations = true;
|
||||
new_cache_strategy = false;
|
||||
broccoli_peer = false;
|
||||
}
|
||||
|
||||
SerialInfo(const SerialInfo& info)
|
||||
|
@ -28,6 +29,7 @@ public:
|
|||
pid_32bit = info.pid_32bit;
|
||||
include_locations = info.include_locations;
|
||||
new_cache_strategy = info.new_cache_strategy;
|
||||
broccoli_peer = info.broccoli_peer;
|
||||
}
|
||||
|
||||
// Parameters that control serialization.
|
||||
|
@ -46,6 +48,11 @@ public:
|
|||
// If true, we support keeping objs in cache permanently.
|
||||
bool new_cache_strategy;
|
||||
|
||||
// If true, we're connecting to a Broccoli. If so, serialization
|
||||
// specifics may be adapted for functionality Broccoli does not
|
||||
// support.
|
||||
bool broccoli_peer;
|
||||
|
||||
ChunkedIO::Chunk* chunk; // chunk written right before the serialization
|
||||
|
||||
// Attributes set during serialization.
|
||||
|
@ -70,6 +77,7 @@ public:
|
|||
print = 0;
|
||||
pid_32bit = false;
|
||||
new_cache_strategy = false;
|
||||
broccoli_peer = false;
|
||||
}
|
||||
|
||||
UnserialInfo(const UnserialInfo& info)
|
||||
|
@ -86,6 +94,7 @@ public:
|
|||
print = info.print;
|
||||
pid_32bit = info.pid_32bit;
|
||||
new_cache_strategy = info.new_cache_strategy;
|
||||
broccoli_peer = info.broccoli_peer;
|
||||
}
|
||||
|
||||
// Parameters that control unserialization.
|
||||
|
@ -106,6 +115,11 @@ public:
|
|||
// If true, we support keeping objs in cache permanently.
|
||||
bool new_cache_strategy;
|
||||
|
||||
// If true, we're connecting to a Broccoli. If so, serialization
|
||||
// specifics may be adapted for functionality Broccoli does not
|
||||
// support.
|
||||
bool broccoli_peer;
|
||||
|
||||
// If a global ID already exits, of these policies is used.
|
||||
enum {
|
||||
Keep, // keep the old ID and ignore the new
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue