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

mpse.h

Go to the documentation of this file.
00001 /*
00002 ** $Id$
00003 **
00004 **  mpse.h       
00005 **
00006 ** Copyright (C) 2002 Sourcefire,Inc
00007 ** Marc Norton <mnorton@sourcefire.com>
00008 **
00009 ** Multi-Pattern Search Engine
00010 **
00011 **  Supports:
00012 **
00013 **    Modified Wu-Manber mwm.c/.h
00014 **    Aho-Corasick - Deterministic Finite Automatum   
00015 **    Keyword Trie with Boyer Moore Bad Character Shifts
00016 **
00017 ** This program is free software; you can redistribute it and/or modify
00018 ** it under the terms of the GNU General Public License as published by
00019 ** the Free Software Foundation; either version 2 of the License, or
00020 ** (at your option) any later version.
00021 **
00022 ** This program is distributed in the hope that it will be useful,
00023 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00024 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00025 ** GNU Gener*
00026 **
00027 **
00028 ** Updates:
00029 **
00030 ** man - 7/25/2002 - modified #defines for WIN32, and added uint64
00031 **
00032 */
00033 
00034 #ifndef _MPSE_H
00035 #define _MPSE_H
00036 
00037 #ifdef HAVE_CONFIG_H
00038 #include "config.h"
00039 #endif
00040 
00041 #include "bitop.h"
00042 
00043 /*
00044 *   Move these defines to a generic Win32/Unix compatability file, 
00045 *   there must be one somewhere...
00046 */
00047 #ifndef CDECL 
00048 #define CDECL 
00049 #endif
00050 
00051 #ifndef INLINE
00052 #define INLINE inline
00053 #endif
00054 
00055 #ifndef UINT64
00056 #define UINT64 unsigned long long
00057 #endif
00058 
00059 
00060 /*
00061 *  Pattern Matching Methods 
00062 */
00063 #define MPSE_MWM      1
00064 #define MPSE_AC       2
00065 #define MPSE_KTBM     3
00066 #define MPSE_LOWMEM   4    
00067 #define MPSE_AUTO     5 
00068 #define MPSE_ACF      6 
00069 #define MPSE_ACS      7 
00070 #define MPSE_ACB      8 
00071 #define MPSE_ACSB     9 
00072 
00073 /*
00074 ** PROTOTYPES
00075 */
00076 void * mpseNew( int method );
00077 void   mpseFree( void * pv );
00078 
00079 int    mpseAddPattern  ( void * pv, void * P, int m, 
00080        unsigned noCase,unsigned offset, unsigned depth,  void* ID, int IID );
00081 
00082 void mpseLargeShifts   ( void * pv, int flag );
00083 int  mpsePrepPatterns  ( void * pv );
00084 
00085 void mpseSetRuleMask   ( void *pv, BITOP * rm );
00086 
00087 int  mpseSearch( void *pv, unsigned char * T, int n, 
00088      int ( *action )(void* id, int index, void *data), 
00089      void * data ); 
00090 
00091 UINT64 mpseGetPatByteCount();
00092 void   mpseResetByteCount();
00093 
00094 int mpsePrintDetail( void * obj );
00095 int mpsePrintSummary( );
00096 
00097 #endif
00098 

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