engine/bmtree.c File Reference

#include "bmtree.h"
#include <string.h>
#include "bits.h"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

Go to the source code of this file.

Functions

int InitTree (BMTree *tree, char IgnoreCase)
int AddToTreeSorted (BMTree *Tree, char *String, int Len, int RuleID)
int AddToTree (BMTree *Tree, char *String, int Len, int RuleID)
int MatchStringTree (BMTree *Tree, unsigned char *PacketRuleBits, char *Packet, int Plen)
void FreeTree (BMTree *tree)

Variables

GlobalVars Globals


Function Documentation

int AddToTree ( BMTree Tree,
char *  String,
int  Len,
int  RuleID 
)

Definition at line 101 of file bmtree.c.

References bnode::Child, FALSE, Globals, bm_tree::IgnoreCase, bnode::NextPeer, NULL, global_vars::NumRules, SetBit(), bm_tree::TreeDependMask, bm_tree::TreeHead, and TRUE.

int AddToTreeSorted ( BMTree Tree,
char *  String,
int  Len,
int  RuleID 
)

Definition at line 33 of file bmtree.c.

References bnode::byte, bnode::Child, FALSE, Globals, bnode::NextPeer, global_vars::NumRules, SetBit(), bm_tree::TreeDependMask, and bm_tree::TreeHead.

void FreeTree ( BMTree tree  ) 

Definition at line 277 of file bmtree.c.

int InitTree ( BMTree tree,
char  IgnoreCase 
)

Definition at line 19 of file bmtree.c.

References TRUE.

int MatchStringTree ( BMTree Tree,
unsigned char *  PacketRuleBits,
char *  Packet,
int  Plen 
)

Definition at line 226 of file bmtree.c.

References DEBUG, Globals, bm_tree::IgnoreCase, MAX_RULES, global_vars::NumRules, SetBit(), bm_tree::TreeDependMask, and bm_tree::TreeHead.


Variable Documentation

GlobalVars Globals

Definition at line 41 of file hlbr.c.


Generated on Sat Jul 7 23:33:10 2007 for HLBR by  doxygen 1.5.2