#include "hlbr.h"Go to the source code of this file.
Data Structures | |
| struct | short_jnode |
| struct | jnode |
| struct | jtree |
Defines | |
| #define | MAX_STRING_LEN 1024 |
| #define | NODE_TYPE_NORMAL 1 |
| #define | NODE_TYPE_SHORT 2 |
Typedefs | |
| typedef short_jnode | SJNode |
| typedef jnode | JNode |
| typedef jtree | JTree |
Functions | |
| int | InitJTree (JTree *j, char NoCase) |
| int | AddStringJTree (JTree *j, unsigned char *String, int SLen, int RuleID) |
| int | FinalizeJTree (JTree *j) |
| int | MatchStrings (JTree *j, unsigned char *PacketRuleBits, unsigned char *String, int SLen) |
| #define MAX_STRING_LEN 1024 |
| #define NODE_TYPE_SHORT 2 |
| typedef struct short_jnode SJNode |
| int AddStringJTree | ( | JTree * | j, | |
| unsigned char * | String, | |||
| int | SLen, | |||
| int | RuleID | |||
| ) |
Add a string to the tree. Decode binary sections (defined between ||).
Definition at line 126 of file jtree.c.
References AddStringJTreeReal(), DBGESCAPE, DEBUGPATH, FALSE, MAX_STRING_LEN, NULL, PRINTERROR, PRINTERROR1, and TRUE.
Referenced by TCPContentAddNode(), TCPListContentAddNode(), TCPListNoCaseAddNode(), TCPNoCaseAddNode(), UDPContentAddNode(), and UDPNoCaseAddNode().
| int FinalizeJTree | ( | JTree * | j | ) |
Definition at line 370 of file jtree.c.
References DEBUGPATH, jnode::FailNode, FALSE, FindOptimalNode(), jtree::Head, NULL, and TRUE.
Referenced by TestTCPContentFinishedSetup(), TestTCPListContentFinishedSetup(), TestTCPListNoCaseFinishedSetup(), TestTCPNoCaseFinishedSetup(), TestUDPContentFinishedSetup(), and TestUDPNoCaseFinishedSetup().
| int InitJTree | ( | JTree * | j, | |
| char | NoCase | |||
| ) |
Set up the tree.
Definition at line 42 of file jtree.c.
References DEBUGPATH, jtree::NoCase, and TRUE.
Referenced by InitTestTCPContent(), InitTestTCPListContent(), InitTestTCPListNoCase(), InitTestTCPNoCase(), InitTestUDPContent(), and InitTestUDPNoCase().
| int MatchStrings | ( | JTree * | j, | |
| unsigned char * | PacketRuleBits, | |||
| unsigned char * | String, | |||
| int | SLen | |||
| ) |
Definition at line 401 of file jtree.c.
References jnode::Bytes, DEBUGPATH, jtree::DependMask, Globals, jtree::Head, jnode::IsTerminal, MAX_RULES, global_vars::NumRules, SetBit(), jnode::temp, and jnode::TerminalRuleID.
Referenced by TestTCPContent(), TestTCPListContent(), TestTCPListNoCase(), TestTCPNoCase(), TestUDPContent(), and TestUDPNoCase().
1.5.2