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

spo_log_null.c

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 /* $Id$ */
00019 
00020 /* spo_log_null
00021  * 
00022  * Purpose:
00023  *
00024  * This module is a NULL placeholder for people that want to turn off 
00025  * logging for whatever reason.  Please note that logging is separate from
00026  * alerting, they are completely separate output facilities within Snort.
00027  *
00028  * Arguments:
00029  *   
00030  * None.
00031  *
00032  * Effect:
00033  *
00034  * None.
00035  *
00036  * Comments:
00037  *
00038  */
00039 
00040 #include <sys/types.h>
00041 
00042 #include "decode.h"
00043 #include "event.h"
00044 #include "plugbase.h"
00045 #include "spo_plugbase.h"
00046 #include "parser.h"
00047 #include "debug.h"
00048 
00049 #include "snort.h"
00050 
00051 /* list of function prototypes for this output plugin */
00052 void LogNullInit(u_char *);
00053 void LogNull(Packet *, char *, void *, Event *);
00054 void LogNullCleanExitFunc(int, void *);
00055 void LogNullRestartFunc(int, void *);
00056 
00057 void LogNullSetup()
00058 {
00059     /* link the preprocessor keyword to the init function in 
00060        the preproc list */
00061     RegisterOutputPlugin("log_null", NT_OUTPUT_LOG, LogNullInit);
00062 
00063     DEBUG_WRAP(DebugMessage(DEBUG_PLUGIN, "Output plugin: LogNull is setup...\n"););
00064 }
00065 
00066 
00067 void LogNullInit(u_char *args)
00068 {
00069     DEBUG_WRAP(DebugMessage(DEBUG_PLUGIN, "Output: LogNull Initialized\n"););
00070 
00071     pv.log_plugin_active = 1;
00072 
00073     /* Set the preprocessor function into the function list */
00074     AddFuncToOutputList(LogNull, NT_OUTPUT_LOG, NULL);
00075     AddFuncToCleanExitList(LogNullCleanExitFunc, NULL);
00076     AddFuncToRestartList(LogNullRestartFunc, NULL);
00077 }
00078 
00079 
00080 
00081 void LogNull(Packet *p, char *msg, void *arg, Event *event)
00082 {
00083     return;
00084 }
00085 
00086 
00087 void LogNullCleanExitFunc(int signal, void *arg)
00088 {
00089     return;
00090 }
00091 
00092 void LogNullRestartFunc(int signal, void *arg)
00093 {
00094     return;
00095 }

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