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

sp_ip_fragbits.c File Reference

#include <sys/types.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include "rules.h"
#include "plugbase.h"
#include "decode.h"
#include "parser.h"
#include "debug.h"
#include "util.h"
#include "plugin_enum.h"

Go to the source code of this file.

Defines

#define GREATER_THAN   1
#define LESS_THAN   2
#define FB_NORMAL   0
#define FB_ALL   1
#define FB_ANY   2
#define FB_NOT   3
#define FB_RB   0x8000
#define FB_DF   0x4000
#define FB_MF   0x2000

Typedefs

typedef _FragBitsData FragBitsData
typedef _FragOffsetData FragOffsetData

Functions

void FragBitsInit (char *, OptTreeNode *, int)
void ParseFragBits (char *, OptTreeNode *)
int CheckFragBits (Packet *, struct _OptTreeNode *, OptFpList *)
void FragOffsetInit (char *, OptTreeNode *, int)
void ParseFragOffset (char *, OptTreeNode *)
int CheckFragOffset (Packet *, struct _OptTreeNode *, OptFpList *)
void SetupFragBits (void)
void SetupFragOffset (void)

Variables

static u_int16_t bitmask


Define Documentation

#define FB_ALL   1
 

Definition at line 68 of file sp_ip_fragbits.c.

Referenced by CheckFragBits(), and ParseFragBits().

#define FB_ANY   2
 

Definition at line 69 of file sp_ip_fragbits.c.

Referenced by CheckFragBits(), and ParseFragBits().

#define FB_DF   0x4000
 

Definition at line 73 of file sp_ip_fragbits.c.

Referenced by ParseFragBits().

#define FB_MF   0x2000
 

Definition at line 74 of file sp_ip_fragbits.c.

Referenced by ParseFragBits().

#define FB_NORMAL   0
 

Definition at line 67 of file sp_ip_fragbits.c.

Referenced by CheckFragBits(), and ParseFragBits().

#define FB_NOT   3
 

Definition at line 70 of file sp_ip_fragbits.c.

Referenced by CheckFragBits(), and ParseFragBits().

#define FB_RB   0x8000
 

Definition at line 72 of file sp_ip_fragbits.c.

Referenced by ParseFragBits().

#define GREATER_THAN   1
 

Definition at line 63 of file sp_ip_fragbits.c.

Referenced by CheckFragOffset(), fpCreateFastPacketDetection(), IpProtoDetectorFunction(), IpProtoRuleParseFunction(), and ParseFragOffset().

#define LESS_THAN   2
 

Definition at line 64 of file sp_ip_fragbits.c.

Referenced by fpCreateFastPacketDetection(), IpProtoRuleParseFunction(), and ParseFragOffset().


Typedef Documentation

typedef struct _FragBitsData FragBitsData
 

typedef struct _FragOffsetData FragOffsetData
 


Function Documentation

int CheckFragBits Packet ,
struct _OptTreeNode ,
OptFpList
 

Definition at line 268 of file sp_ip_fragbits.c.

References bitmask, DEBUG_PLUGIN, DEBUG_WRAP, _OptTreeNode::ds_list, FB_ALL, FB_ANY, FB_NORMAL, FB_NOT, _FragBitsData::frag_bits, _IPHdr::ip_off, _Packet::iph, _FragBitsData::mode, _OptFpList::next, _OptFpList::OptTestFunc, and PLUGIN_FRAG_BITS.

Referenced by FragBitsInit().

int CheckFragOffset Packet ,
struct _OptTreeNode ,
OptFpList
 

Definition at line 469 of file sp_ip_fragbits.c.

References _FragOffsetData::comparison_flag, DEBUG_PLUGIN, DEBUG_WRAP, _OptTreeNode::ds_list, _Packet::frag_flag, _Packet::frag_offset, GREATER_THAN, IP_HEADER_LEN, _IPHdr::ip_len, _Packet::iph, _OptFpList::next, _FragOffsetData::not_flag, _FragOffsetData::offset, _OptFpList::OptTestFunc, and PLUGIN_FRAG_OFFSET.

Referenced by FragOffsetInit().

void FragBitsInit char *  ,
OptTreeNode ,
int 
 

Definition at line 138 of file sp_ip_fragbits.c.

References AddOptFuncToList(), bitmask, CheckFragBits(), _OptTreeNode::ds_list, FatalError(), file_line, file_name, ParseFragBits(), PLUGIN_FRAG_BITS, and SnortAlloc().

Referenced by SetupFragBits().

void FragOffsetInit char *  ,
OptTreeNode ,
int 
 

Definition at line 375 of file sp_ip_fragbits.c.

References AddOptFuncToList(), CheckFragOffset(), _OptTreeNode::ds_list, ParseFragOffset(), and PLUGIN_FRAG_OFFSET.

Referenced by SetupFragOffset().

void ParseFragBits char *  ,
OptTreeNode
 

Definition at line 182 of file sp_ip_fragbits.c.

References _OptTreeNode::ds_list, FatalError(), FB_ALL, FB_ANY, FB_DF, FB_MF, FB_NORMAL, FB_NOT, FB_RB, file_line, file_name, _FragBitsData::frag_bits, _FragBitsData::mode, and PLUGIN_FRAG_BITS.

Referenced by FragBitsInit().

void ParseFragOffset char *  ,
OptTreeNode
 

Definition at line 405 of file sp_ip_fragbits.c.

References _FragOffsetData::comparison_flag, _OptTreeNode::ds_list, FatalError(), file_line, file_name, GREATER_THAN, LESS_THAN, _FragOffsetData::not_flag, _FragOffsetData::offset, and PLUGIN_FRAG_OFFSET.

Referenced by FragOffsetInit().

void SetupFragBits void   ) 
 

Definition at line 116 of file sp_ip_fragbits.c.

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

Referenced by InitPlugIns().

void SetupFragOffset void   ) 
 

Definition at line 354 of file sp_ip_fragbits.c.

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

Referenced by InitPlugIns().


Variable Documentation

u_int16_t bitmask [static]
 

Definition at line 103 of file sp_ip_fragbits.c.

Referenced by CheckFragBits(), and FragBitsInit().


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