Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

spo_plugbase.h

Go to the documentation of this file.
00001 /*
00002 ** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
00003 **
00004 ** This program is free software; you can redistribute it and/or modify
00005 ** it under the terms of the GNU General Public License as published by
00006 ** the Free Software Foundation; either version 2 of the License, or
00007 ** (at your option) any later version.
00008 **
00009 ** This program is distributed in the hope that it will be useful,
00010 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 ** GNU General Public License for more details.
00013 **
00014 ** You should have received a copy of the GNU General Public License
00015 ** along with this program; if not, write to the Free Software
00016 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017 */
00018 
00019 /* $Id$ */
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  /* output node type alert */
00031 #define NT_OUTPUT_LOG     0x2  /* output node type log */
00032 #define NT_OUTPUT_SPECIAL 0x4  /* special output node type */
00033 
00034 /***************************** Output Plugin API  *****************************/
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 /*************************** End Output Plugin API  ***************************/
00068 
00069 #endif /* __SPO_PLUGBASE_H__ */

Generated on Sun May 14 14:51:19 2006 by  doxygen 1.4.2