Next: DynamicEngineData
Up: Data Structures
Previous: DynamicPluginMeta
Contents
The DynamicPreprocessorData structure defines the interface the
preprocessor uses to interact with snort itself. This inclues functions
to register the preprocessor's configuration parsing, restart, exit,
and processing functions. It includes function to log messages,
errors, fatal errors, and debugging info. It also includes information
for setting alerts, handling Inline drops, access to the StreamAPI, and
it provides access to the normalized http and alternate data buffers.
This data structure should be initialized when the preprocessor shared
library is loaded. It is defined in sf_dynamic_preprocessor.h as:
typedef struct _DynamicPreprocessorData
{
int version;
char *altBuffer;
unsigned int altBufferLen;
UriInfo *uriBuffers[MAX_URIINFOS];
LogMsgFunc logMsg;
LogMsgFunc errMsg;
LogMsgFunc fatalMsg;
DebugMsgFunc debugMsg;
PreprocRegisterFunc registerPreproc;
AddPreprocFunc addPreproc;
AddPreprocRestart addPreprocRestart;
AddPreprocExit addPreprocExit;
AddPreprocConfCheck addPreprocConfCheck;
RegisterPreprocRuleOpt preprocOptRegister;
AddPreprocProfileFunc addPreprocProfileFunc;
ProfilingFunc profilingPreprocsFunc;
void *totalPerfStats;
AlertQueueAdd alertAdd;
ThresholdCheckFunc thresholdCheck;
InlineFunc inlineMode;
InlineDropFunc inlineDrop;
DetectFunc detect;
DisableDetectFunc disableDetect;
DisableDetectFunc disableAllDetect;
SetPreprocBitFunc setPreprocBit;
StreamAPI *streamAPI;
SearchAPI *searchAPI;
char **config_file;
int *config_line;
printfappendfunc printfappend;
TokenSplitFunc tokenSplit;
TokenFreeFunc tokenFree;
GetRuleInfoByNameFunc getRuleInfoByName;
GetRuleInfoByIdFunc getRuleInfoById;
} DynamicPreprocessorData;
Steven Sturges
2006-12-08
|