tests/test_tcp_dst.c File Reference

#include "test_tcp_dst.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "../decoders/decode_tcp.h"
#include "../packets/packet.h"
#include <arpa/inet.h>
#include "../engine/num_list.h"
#include "../engine/bits.h"

Go to the source code of this file.

Data Structures

struct  tcp_dst_data

Typedefs

typedef tcp_dst_data TCPDstData

Functions

int TestTCPDstOld (int PacketSlot, TestNode *Nodes)
int TestTCPDst (int PacketSlot, TestNode *Nodes)
int TCPDstAddNode (int TestID, int RuleID, char *Args)
int InitTestTCPDst ()

Variables

GlobalVars Globals
int TCPDecoderID
TCPDstDataTCPDstHead


Typedef Documentation

typedef struct tcp_dst_data TCPDstData


Function Documentation

int InitTestTCPDst (  ) 

Sets up the test of the TCPDst Field.

Definition at line 226 of file test_tcp_dst.c.

References test_rec::AddNode, BindTestToDecoder(), CreateTest(), DEBUGPATH, FALSE, GetDecoderByName(), Globals, MAX_NAME_LEN, NULL, PRINTERROR, test_rec::ShortName, TCPDecoderID, TCPDstAddNode(), TCPDstHead, TEST_NONE, test_rec::TestFunc, global_vars::Tests, TestTCPDst(), and TRUE.

Referenced by InitTests().

int TCPDstAddNode ( int  TestID,
int  RuleID,
char *  Args 
)

Adds a rule node to TCPDst test.

Definition at line 170 of file test_tcp_dst.c.

References AddRangesString(), DBG, DEBUGPATH, DestroyNumList(), FALSE, GetBit(), Globals, InitNumList(), LIST_TYPE_NORMAL, tcp_dst_data::Next, NULL, NumListCompare(), global_vars::NumRules, tcp_dst_data::Ports, PRINTERROR, PRINTERROR1, tcp_dst_data::RuleBits, SetBit(), TCPDstHead, and TestAddNode().

Referenced by InitTestTCPDst().

int TestTCPDst ( int  PacketSlot,
TestNode Nodes 
)

Apply the TCPDst test with collapsed rules.

Definition at line 106 of file test_tcp_dst.c.

References DBG, DEBUGPATH, FALSE, GetDataByID(), Globals, IsInList(), tcp_dst_data::Next, NotAndBitFields(), global_vars::NumRules, global_vars::Packets, tcp_dst_data::Ports, PRINTERROR, tcp_dst_data::RuleBits, packet_rec::RuleBits, RuleIsActive(), TCPDecoderID, TCPDstHead, and TRUE.

Referenced by InitTestTCPDst().

int TestTCPDstOld ( int  PacketSlot,
TestNode Nodes 
)

Apply the TCPDst test (old version).

Definition at line 28 of file test_tcp_dst.c.

References test_node::Data, DBG, DEBUGPATH, FALSE, GetDataByID(), Globals, IsInList(), test_node::Next, global_vars::NumRules, global_vars::Packets, tcp_dst_data::Ports, PRINTERROR, test_node::RuleID, RuleIsActive(), SetRuleInactive(), TCPDecoderID, and TRUE.


Variable Documentation

GlobalVars Globals

Definition at line 41 of file hlbr.c.

int TCPDecoderID

Definition at line 22 of file test_tcp_dst.c.

TCPDstData* TCPDstHead

Definition at line 23 of file test_tcp_dst.c.

Referenced by InitTestTCPDst(), TCPDstAddNode(), and TestTCPDst().


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