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

ubi_BinTree.c File Reference

#include "ubi_BinTree.h"

Go to the source code of this file.

Functions

static ubi_btNodePtr qFind (ubi_btCompFunc cmp, ubi_btItemPtr FindMe, register ubi_btNodePtr p)
static ubi_btNodePtr TreeFind (ubi_btItemPtr findme, ubi_btNodePtr p, ubi_btNodePtr *parentp, char *gender, ubi_btCompFunc CmpFunc)
static void ReplaceNode (ubi_btNodePtr *parent, ubi_btNodePtr oldnode, ubi_btNodePtr newnode)
static void SwapNodes (ubi_btRootPtr RootPtr, ubi_btNodePtr Node1, ubi_btNodePtr Node2)
static ubi_btNodePtr SubSlide (register ubi_btNodePtr P, register int whichway)
static ubi_btNodePtr Neighbor (register ubi_btNodePtr P, register int whichway)
static ubi_btNodePtr Border (ubi_btRootPtr RootPtr, ubi_btItemPtr FindMe, ubi_btNodePtr p, int whichway)
long ubi_btSgn (register long x)
ubi_btNodePtr ubi_btInitNode (ubi_btNodePtr NodePtr)
ubi_btRootPtr ubi_btInitTree (ubi_btRootPtr RootPtr, ubi_btCompFunc CompFunc, char Flags)
ubi_trBool ubi_btInsert (ubi_btRootPtr RootPtr, ubi_btNodePtr NewNode, ubi_btItemPtr ItemPtr, ubi_btNodePtr *OldNode)
ubi_btNodePtr ubi_btRemove (ubi_btRootPtr RootPtr, ubi_btNodePtr DeadNode)
ubi_btNodePtr ubi_btLocate (ubi_btRootPtr RootPtr, ubi_btItemPtr FindMe, ubi_trCompOps CompOp)
ubi_btNodePtr ubi_btFind (ubi_btRootPtr RootPtr, ubi_btItemPtr FindMe)
int ubi_btCheck (ubi_btRootPtr RootPtr, ubi_btCheckFunc func, void *UserData)
ubi_btNodePtr ubi_btNext (ubi_btNodePtr P)
ubi_btNodePtr ubi_btPrev (ubi_btNodePtr P)
ubi_btNodePtr ubi_btFirst (ubi_btNodePtr P)
ubi_btNodePtr ubi_btLast (ubi_btNodePtr P)
ubi_btNodePtr ubi_btFirstOf (ubi_btRootPtr RootPtr, ubi_btItemPtr MatchMe, ubi_btNodePtr p)
ubi_btNodePtr ubi_btLastOf (ubi_btRootPtr RootPtr, ubi_btItemPtr MatchMe, ubi_btNodePtr p)
unsigned long ubi_btTraverse (ubi_btRootPtr RootPtr, ubi_btActionRtn EachNode, void *UserData)
unsigned long ubi_btTraverseReverse (ubi_btRootPtr RootPtr, ubi_btActionRtn EachNode, void *UserData)
unsigned long ubi_btKillTree (ubi_btRootPtr RootPtr, ubi_btKillNodeRtn FreeNode)
ubi_btNodePtr ubi_btLeafNode (ubi_btNodePtr leader)
int ubi_btModuleID (int size, char *list[])

Variables

static char ModuleID []


Function Documentation

static ubi_btNodePtr Border ubi_btRootPtr  RootPtr,
ubi_btItemPtr  FindMe,
ubi_btNodePtr  p,
int  whichway
[static]
 

Definition at line 282 of file ubi_BinTree.c.

References ubi_btRoot::cmp, ubi_btNodeStruct::Link, NULL, qFind(), ubi_trAbNormal, ubi_trDups_OK, ubi_trEQUAL, and ubi_trPARENT.

Referenced by ubi_btFirstOf(), ubi_btLastOf(), and ubi_btLocate().

static ubi_btNodePtr Neighbor register ubi_btNodePtr  P,
register int  whichway
[static]
 

Definition at line 249 of file ubi_BinTree.c.

References NULL, SubSlide(), ubi_trPARENT, and ubi_trRevWay.

Referenced by ubi_btLocate(), ubi_btNext(), and ubi_btPrev().

static ubi_btNodePtr qFind ubi_btCompFunc  cmp,
ubi_btItemPtr  FindMe,
register ubi_btNodePtr  p
[static]
 

Definition at line 58 of file ubi_BinTree.c.

References NULL, ubi_trAbNormal, and ubi_trEQUAL.

Referenced by Border(), and ubi_btFind().

static void ReplaceNode ubi_btNodePtr parent,
ubi_btNodePtr  oldnode,
ubi_btNodePtr  newnode
[static]
 

Definition at line 141 of file ubi_BinTree.c.

References ubi_btNodeStruct::Link, ubi_trLEFT, ubi_trPARENT, and ubi_trRIGHT.

Referenced by SwapNodes(), and ubi_btInsert().

static ubi_btNodePtr SubSlide register ubi_btNodePtr  P,
register int  whichway
[static]
 

Definition at line 224 of file ubi_BinTree.c.

References NULL.

Referenced by Neighbor(), ubi_btFirst(), ubi_btKillTree(), and ubi_btLast().

static void SwapNodes ubi_btRootPtr  RootPtr,
ubi_btNodePtr  Node1,
ubi_btNodePtr  Node2
[static]
 

Definition at line 175 of file ubi_BinTree.c.

References ubi_btNodeStruct::gender, int(), ubi_btNodeStruct::Link, NULL, ReplaceNode(), ubi_btRoot::root, and ubi_trPARENT.

Referenced by ubi_btRemove().

static ubi_btNodePtr TreeFind ubi_btItemPtr  findme,
ubi_btNodePtr  p,
ubi_btNodePtr parentp,
char *  gender,
ubi_btCompFunc  CmpFunc
[static]
 

Definition at line 92 of file ubi_BinTree.c.

References char(), ubi_btNodeStruct::Link, NULL, ubi_trAbNormal, and ubi_trEQUAL.

Referenced by ubi_btInsert(), and ubi_btLocate().

int ubi_btCheck ubi_btRootPtr  RootPtr,
ubi_btCheckFunc  func,
void *  UserData
 

Definition at line 719 of file ubi_BinTree.c.

References NULL, ubi_btRoot::root, ubi_btFirst(), and ubi_btNext().

ubi_btNodePtr ubi_btFind ubi_btRootPtr  RootPtr,
ubi_btItemPtr  FindMe
 

Definition at line 695 of file ubi_BinTree.c.

References ubi_btRoot::cmp, qFind(), and ubi_btRoot::root.

Referenced by ubi_sptFind().

ubi_btNodePtr ubi_btFirst ubi_btNodePtr  P  ) 
 

Definition at line 775 of file ubi_BinTree.c.

References SubSlide(), and ubi_trLEFT.

Referenced by LogTcpdumpStream(), OldUnifiedLogPacketAlert(), PruneConvCache(), PruneFragCache(), PrunePortscanners(), PruneTargets(), PruneTime(), RealUnifiedLogAlert(), RealUnifiedLogStreamAlert(), SegmentCleanTraverse(), ubi_btCheck(), ubi_btKillTree(), and ubi_btTraverse().

ubi_btNodePtr ubi_btFirstOf ubi_btRootPtr  RootPtr,
ubi_btItemPtr  MatchMe,
ubi_btNodePtr  p
 

Definition at line 805 of file ubi_BinTree.c.

References Border(), ubi_btRoot::cmp, NULL, ubi_trAbNormal, ubi_trEQUAL, and ubi_trLEFT.

ubi_btNodePtr ubi_btInitNode ubi_btNodePtr  NodePtr  ) 
 

Definition at line 372 of file ubi_BinTree.c.

References ubi_btNodeStruct::balance, ubi_btNodeStruct::gender, ubi_btNodeStruct::Link, NULL, ubi_trEQUAL, ubi_trLEFT, ubi_trPARENT, and ubi_trRIGHT.

Referenced by ubi_btInsert().

ubi_btRootPtr ubi_btInitTree ubi_btRootPtr  RootPtr,
ubi_btCompFunc  CompFunc,
char  Flags
 

Definition at line 390 of file ubi_BinTree.c.

References ubi_btRoot::cmp, ubi_btRoot::count, ubi_btRoot::flags, NULL, ubi_btRoot::root, and ubi_trDUPKEY.

Referenced by ubi_btKillTree().

ubi_trBool ubi_btInsert ubi_btRootPtr  RootPtr,
ubi_btNodePtr  NewNode,
ubi_btItemPtr  ItemPtr,
ubi_btNodePtr OldNode
 

Definition at line 428 of file ubi_BinTree.c.

References ubi_btRoot::cmp, ubi_btRoot::count, ubi_btNodeStruct::gender, int(), ubi_btNodeStruct::Link, NULL, ReplaceNode(), ubi_btRoot::root, TreeFind(), ubi_btInitNode(), ubi_trAbNormal, ubi_trDups_OK, ubi_trEQUAL, ubi_trFALSE, ubi_trOvwt_OK, ubi_trPARENT, ubi_trRIGHT, and ubi_trTRUE.

Referenced by ubi_sptInsert().

unsigned long ubi_btKillTree ubi_btRootPtr  RootPtr,
ubi_btKillNodeRtn  FreeNode
 

Definition at line 937 of file ubi_BinTree.c.

References ubi_btRoot::cmp, ubi_btRoot::flags, ubi_btNodeStruct::Link, NULL, ubi_btRoot::root, SubSlide(), ubi_btFirst(), ubi_btInitTree(), ubi_trLEFT, ubi_trPARENT, and ubi_trRIGHT.

ubi_btNodePtr ubi_btLast ubi_btNodePtr  P  ) 
 

Definition at line 790 of file ubi_BinTree.c.

References SubSlide(), and ubi_trRIGHT.

Referenced by PruneSessionCache(), ubi_btTraverseReverse(), and ubi_sptRemove().

ubi_btNodePtr ubi_btLastOf ubi_btRootPtr  RootPtr,
ubi_btItemPtr  MatchMe,
ubi_btNodePtr  p
 

Definition at line 835 of file ubi_BinTree.c.

References Border(), ubi_btRoot::cmp, NULL, ubi_trAbNormal, ubi_trEQUAL, and ubi_trRIGHT.

ubi_btNodePtr ubi_btLeafNode ubi_btNodePtr  leader  ) 
 

Definition at line 988 of file ubi_BinTree.c.

References ubi_btNodeStruct::Link, NULL, ubi_trLEFT, and ubi_trRevWay.

Referenced by PruneConvCache(), PruneFragCache(), PrunePortscanners(), PruneSessionCache(), PruneTagCache(), and PruneTargets().

ubi_btNodePtr ubi_btLocate ubi_btRootPtr  RootPtr,
ubi_btItemPtr  FindMe,
ubi_trCompOps  CompOp
 

Definition at line 601 of file ubi_BinTree.c.

References Border(), ubi_btRoot::cmp, Neighbor(), NULL, ubi_btRoot::root, TreeFind(), ubi_trEQ, ubi_trGT, ubi_trLE, ubi_trLEFT, ubi_trLT, and ubi_trRIGHT.

Referenced by ubi_sptLocate().

int ubi_btModuleID int  size,
char *  list[]
 

Definition at line 1033 of file ubi_BinTree.c.

References ModuleID, and NULL.

Referenced by ubi_sptModuleID().

ubi_btNodePtr ubi_btNext ubi_btNodePtr  P  ) 
 

Definition at line 749 of file ubi_BinTree.c.

References Neighbor(), and ubi_trRIGHT.

Referenced by LogTcpdumpStream(), OldUnifiedLogPacketAlert(), PruneConvCache(), PruneFragCache(), PrunePortscanners(), PruneTargets(), PruneTime(), RealUnifiedLogStreamAlert(), SegmentCleanTraverse(), ubi_btCheck(), and ubi_btTraverse().

ubi_btNodePtr ubi_btPrev ubi_btNodePtr  P  ) 
 

Definition at line 762 of file ubi_BinTree.c.

References Neighbor(), and ubi_trLEFT.

Referenced by PruneSessionCache(), ubi_btRemove(), and ubi_btTraverseReverse().

ubi_btNodePtr ubi_btRemove ubi_btRootPtr  RootPtr,
ubi_btNodePtr  DeadNode
 

Definition at line 547 of file ubi_BinTree.c.

References ubi_btRoot::count, ubi_btNodeStruct::gender, int(), ubi_btNodeStruct::Link, NULL, ubi_btRoot::root, SwapNodes(), ubi_btPrev(), ubi_trLEFT, ubi_trPARENT, and ubi_trRIGHT.

long ubi_btSgn register long  x  ) 
 

Definition at line 350 of file ubi_BinTree.c.

unsigned long ubi_btTraverse ubi_btRootPtr  RootPtr,
ubi_btActionRtn  EachNode,
void *  UserData
 

Definition at line 865 of file ubi_BinTree.c.

References ubi_btRoot::count, NULL, ubi_btRoot::root, ubi_btFirst(), and ubi_btNext().

unsigned long ubi_btTraverseReverse ubi_btRootPtr  RootPtr,
ubi_btActionRtn  EachNode,
void *  UserData
 

Definition at line 901 of file ubi_BinTree.c.

References ubi_btRoot::count, NULL, ubi_btRoot::root, ubi_btLast(), and ubi_btPrev().


Variable Documentation

char ModuleID[] [static]
 

Initial value:

 "ubi_BinTree\n\
\t$Revision$\n\
\t$Date$\n\
\t$Author$\n"

Definition at line 49 of file ubi_BinTree.c.

Referenced by ubi_btModuleID(), and ubi_sptModuleID().


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