Add file analysis action to send data to script-land in chosen events.

This commit is contained in:
Jon Siwek 2013-02-22 16:49:53 -06:00
parent 85410a7657
commit 4b30cc2e24
10 changed files with 134 additions and 17 deletions

View 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