mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 12:38:20 +00:00
add mode to readerinfo - no need to have it separately everywhere anymore.
Disable remoteserialization of readerinfo - in contrast to the logging framework this is not needed here (I think).
This commit is contained in:
parent
3559a39d59
commit
7f83f157fc
11 changed files with 52 additions and 53 deletions
|
@ -7,8 +7,6 @@
|
|||
|
||||
#include "threading/SerialTypes.h"
|
||||
#include "threading/MsgThread.h"
|
||||
class RemoteSerializer;
|
||||
|
||||
|
||||
namespace input {
|
||||
|
||||
|
@ -87,6 +85,12 @@ public:
|
|||
*/
|
||||
config_map config;
|
||||
|
||||
/**
|
||||
* The opening mode for the input source.
|
||||
*/
|
||||
ReaderMode mode;
|
||||
/*
|
||||
* I don't think the input framework needs remote serialization. If it doesn't, kill this. If it does add ReaderMode.
|
||||
private:
|
||||
friend class ::RemoteSerializer;
|
||||
|
||||
|
@ -94,16 +98,14 @@ public:
|
|||
// fields. They serialize/deserialize the struct.
|
||||
bool Read(SerializationFormat* fmt);
|
||||
bool Write(SerializationFormat* fmt) const;
|
||||
|
||||
*/
|
||||
};
|
||||
|
||||
/**
|
||||
* One-time initialization of the reader to define the input source.
|
||||
*
|
||||
* @param source A string left to the interpretation of the
|
||||
* reader implementation; it corresponds to the value configured on
|
||||
* the script-level for the input stream.
|
||||
*
|
||||
* @param mode The opening mode for the input source.
|
||||
* @param @param info Meta information for the writer.
|
||||
*
|
||||
* @param num_fields Number of fields contained in \a fields.
|
||||
*
|
||||
|
@ -115,7 +117,7 @@ public:
|
|||
*
|
||||
* @return False if an error occured.
|
||||
*/
|
||||
bool Init(const ReaderInfo& info, ReaderMode mode, int num_fields, const threading::Field* const* fields);
|
||||
bool Init(const ReaderInfo& info, int num_fields, const threading::Field* const* fields);
|
||||
|
||||
/**
|
||||
* Finishes reading from this input stream in a regular fashion. Must
|
||||
|
@ -180,7 +182,7 @@ protected:
|
|||
* provides accessor methods to get them later, and they are passed
|
||||
* in here only for convinience.
|
||||
*/
|
||||
virtual bool DoInit(const ReaderInfo& info, ReaderMode mode, int arg_num_fields, const threading::Field* const* fields) = 0;
|
||||
virtual bool DoInit(const ReaderInfo& info, int arg_num_fields, const threading::Field* const* fields) = 0;
|
||||
|
||||
/**
|
||||
* Reader-specific method implementing input finalization at
|
||||
|
@ -209,11 +211,6 @@ protected:
|
|||
*/
|
||||
virtual bool DoUpdate() = 0;
|
||||
|
||||
/**
|
||||
* Returns the reader mode as passed into Init().
|
||||
*/
|
||||
const ReaderMode Mode() const { return mode; }
|
||||
|
||||
/**
|
||||
* Method allowing a reader to send a specified Bro event. Vals must
|
||||
* match the values expected by the bro event.
|
||||
|
@ -315,7 +312,6 @@ private:
|
|||
ReaderFrontend* frontend;
|
||||
|
||||
ReaderInfo info;
|
||||
ReaderMode mode;
|
||||
unsigned int num_fields;
|
||||
const threading::Field* const * fields; // raw mapping
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue