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

sp_byte_check.c File Reference

#include <sys/types.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include "bounds.h"
#include "byte_extract.h"
#include "rules.h"
#include "decode.h"
#include "plugbase.h"
#include "parser.h"
#include "debug.h"
#include "util.h"
#include "plugin_enum.h"
#include "mstring.h"

Go to the source code of this file.

Defines

#define BT_LESS_THAN   1
#define BT_EQUALS   2
#define BT_GREATER_THAN   3
#define BT_AND   4
#define BT_OR   5
#define BIG   0
#define LITTLE   1
#define PARSELEN   10
#define TEXTLEN   (PARSELEN + 2)

Typedefs

typedef _ByteTestData ByteTestData

Functions

void ByteTestInit (char *, OptTreeNode *, int)
void ByteTestParse (char *, ByteTestData *, OptTreeNode *)
int ByteTest (Packet *, struct _OptTreeNode *, OptFpList *)
void SetupByteTest (void)

Variables

u_int8_tdoe_ptr
u_int8_t DecodeBuffer [DECODE_BLEN]


Define Documentation

#define BIG   0
 

Definition at line 103 of file sp_byte_check.c.

#define BT_AND   4
 

Definition at line 100 of file sp_byte_check.c.

Referenced by ByteTest(), and ByteTestParse().

#define BT_EQUALS   2
 

Definition at line 98 of file sp_byte_check.c.

Referenced by ByteTest(), and ByteTestParse().

#define BT_GREATER_THAN   3
 

Definition at line 99 of file sp_byte_check.c.

Referenced by ByteTest(), and ByteTestParse().

#define BT_LESS_THAN   1
 

Definition at line 97 of file sp_byte_check.c.

Referenced by ByteTest(), and ByteTestParse().

#define BT_OR   5
 

Definition at line 101 of file sp_byte_check.c.

Referenced by ByteTest(), and ByteTestParse().

#define LITTLE   1
 

Definition at line 104 of file sp_byte_check.c.

#define PARSELEN   10
 

Definition at line 105 of file sp_byte_check.c.

#define TEXTLEN   (PARSELEN + 2)
 

Definition at line 106 of file sp_byte_check.c.


Typedef Documentation

typedef struct _ByteTestData ByteTestData
 


Function Documentation

int ByteTest Packet ,
struct _OptTreeNode ,
OptFpList
 

Definition at line 385 of file sp_byte_check.c.

References _Packet::alt_dsize, _ByteTestData::base, BT_AND, BT_EQUALS, BT_GREATER_THAN, BT_LESS_THAN, BT_OR, byte_extract(), _ByteTestData::bytes_to_compare, _ByteTestData::cmp_value, _OptFpList::context, _Packet::data, _ByteTestData::data_string_convert_flag, DEBUG_PATTERN_MATCH, DEBUG_WRAP, DecodeBuffer, doe_ptr, _Packet::dsize, _ByteTestData::endianess, inBounds(), _OptFpList::next, _ByteTestData::not_flag, _ByteTestData::offset, _ByteTestData::operator, _OptFpList::OptTestFunc, _Packet::packet_flags, PKT_ALT_DECODE, _ByteTestData::relative_flag, and string_extract().

Referenced by ByteTestInit().

void ByteTestInit char *  ,
OptTreeNode ,
int 
 

Definition at line 164 of file sp_byte_check.c.

References AddOptFuncToList(), ByteTest(), ByteTestParse(), _OptFpList::context, FatalError(), file_line, file_name, and NULL.

Referenced by SetupByteTest().

void ByteTestParse char *  ,
ByteTestData ,
OptTreeNode
 

Definition at line 207 of file sp_byte_check.c.

References _ByteTestData::base, BIG, BT_AND, BT_EQUALS, BT_GREATER_THAN, BT_LESS_THAN, BT_OR, _ByteTestData::bytes_to_compare, _ByteTestData::cmp_value, _ByteTestData::data_string_convert_flag, DEBUG_PATTERN_MATCH, DEBUG_WRAP, _ByteTestData::endianess, errno, FatalError(), file_line, file_name, LITTLE, mSplit(), mSplitFree(), _ByteTestData::not_flag, _ByteTestData::offset, _ByteTestData::operator, PARSELEN, _ByteTestData::relative_flag, strcasecmp, strtol(), and strtoul().

Referenced by ByteTestInit().

void SetupByteTest void   ) 
 

Definition at line 140 of file sp_byte_check.c.

References ByteTestInit(), DEBUG_PLUGIN, DEBUG_WRAP, and RegisterPlugin().

Referenced by InitPlugIns().


Variable Documentation

u_int8_t DecodeBuffer[DECODE_BLEN]
 

Definition at line 45 of file decode.c.

u_int8_t* doe_ptr
 

Definition at line 72 of file sp_pattern_match.c.


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