00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __SPO_PLUGBASE_H__
00021 #define __SPO_PLUGBASE_H__
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include "config.h"
00025 #endif
00026
00027 #include "event.h"
00028 #include "decode.h"
00029
00030 #define NT_OUTPUT_ALERT 0x1
00031 #define NT_OUTPUT_LOG 0x2
00032 #define NT_OUTPUT_SPECIAL 0x4
00033
00034
00035 typedef struct _OutputKeywordNode
00036 {
00037 char *keyword;
00038 char node_type;
00039 void (*func)(char *);
00040
00041 } OutputKeywordNode;
00042
00043 typedef struct _OutputKeywordList
00044 {
00045 OutputKeywordNode entry;
00046 struct _OutputKeywordList *next;
00047
00048 } OutputKeywordList;
00049
00050 typedef struct _OutputFuncNode
00051 {
00052 void (*func)(Packet *, char *, void *, Event *);
00053 void *arg;
00054 struct _OutputFuncNode *next;
00055
00056 } OutputFuncNode;
00057
00058 void InitOutputPlugins();
00059 int ActivateOutputPlugin(char *plugin_name, char *plugin_options);
00060 void RegisterOutputPlugin(char *, int, void (*func)(u_char *));
00061 OutputKeywordNode *GetOutputPlugin(char *plugin_name);
00062 void DumpOutputPlugins();
00063 void AddFuncToOutputList(void (*func) (Packet *, char *, void *, Event *),
00064 char node_type, void *arg);
00065 void SetOutputList(void (*func) (Packet *, char *, void *, Event *),
00066 char node_type, void *arg);
00067
00068
00069 #endif