mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Add file analysis action to send data to script-land in chosen events.
This commit is contained in:
parent
85410a7657
commit
4b30cc2e24
10 changed files with 134 additions and 17 deletions
34
src/file_analysis/DataEvent.h
Normal file
34
src/file_analysis/DataEvent.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
#ifndef FILE_ANALYSIS_DATAEVENT_H
|
||||
#define FILE_ANALYSIS_DATAEVENT_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Val.h"
|
||||
#include "Info.h"
|
||||
#include "Action.h"
|
||||
|
||||
namespace file_analysis {
|
||||
|
||||
/**
|
||||
* An action to send file data to script-layer events.
|
||||
*/
|
||||
class DataEvent : public Action {
|
||||
public:
|
||||
|
||||
static Action* Instantiate(const RecordVal* args, Info* info);
|
||||
|
||||
virtual bool DeliverChunk(const u_char* data, uint64 len, uint64 offset);
|
||||
|
||||
virtual bool DeliverStream(const u_char* data, uint64 len);
|
||||
|
||||
protected:
|
||||
|
||||
DataEvent(Info* arg_info, EventHandlerPtr ce, EventHandlerPtr se);
|
||||
|
||||
EventHandlerPtr chunk_event;
|
||||
EventHandlerPtr stream_event;
|
||||
};
|
||||
|
||||
} // namespace file_analysis
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue