tests/test_ip_proto.c File Reference

#include "test_ip_proto.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "../decoders/decode_ip.h"
#include "../packets/packet.h"
#include <arpa/inet.h>
#include "../engine/num_list.h"

Go to the source code of this file.

Data Structures

struct  ip_proto_data

Defines

#define IP_PROTO_ICMP   1
#define IP_PROTO_IGMP   2
#define IP_PROTO_TCP   6
#define IP_PROTO_UDP   17
#define IP_PROTO_PIM   0x67
#define IP_PROTO_OSPF   0x59

Typedefs

typedef ip_proto_data IPProtoData

Functions

int TestIPProto (int PacketSlot, TestNode *Nodes)
int IPProtoAddNode (int TestID, int RuleID, char *Args)
int InitTestIPProto ()

Variables

GlobalVars Globals
int IPDecoderID


Define Documentation

#define IP_PROTO_ICMP   1

Definition at line 10 of file test_ip_proto.c.

#define IP_PROTO_IGMP   2

Definition at line 11 of file test_ip_proto.c.

Referenced by IPProtoAddNode().

#define IP_PROTO_OSPF   0x59

Definition at line 15 of file test_ip_proto.c.

Referenced by IPProtoAddNode().

#define IP_PROTO_PIM   0x67

Definition at line 14 of file test_ip_proto.c.

Referenced by IPProtoAddNode().

#define IP_PROTO_TCP   6

Definition at line 12 of file test_ip_proto.c.

#define IP_PROTO_UDP   17

Definition at line 13 of file test_ip_proto.c.


Typedef Documentation

typedef struct ip_proto_data IPProtoData


Function Documentation

int InitTestIPProto (  ) 

Definition at line 159 of file test_ip_proto.c.

References test_rec::AddNode, BindTestToDecoder(), CreateTest(), FALSE, GetDecoderByName(), Globals, IPDecoderID, IPProtoAddNode(), MAX_NAME_LEN, test_rec::ShortName, TEST_NONE, test_rec::TestFunc, TestIPProto(), global_vars::Tests, and TRUE.

Referenced by InitTests().

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

Definition at line 118 of file test_ip_proto.c.

References AddRangesString(), FALSE, InitNumList(), IP_PROTO_ICMP, IP_PROTO_IGMP, IP_PROTO_OSPF, IP_PROTO_PIM, IP_PROTO_TCP, IP_PROTO_UDP, LIST_TYPE_NORMAL, num_alias_item::Num, ip_proto_data::Protos, and TestAddNode().

Referenced by InitTestIPProto().

int TestIPProto ( int  PacketSlot,
TestNode Nodes 
)

Definition at line 31 of file test_ip_proto.c.

References test_node::Data, decoder_data::Data, decoder_data::DecoderID, packet_rec::DecoderInfo, FALSE, Globals, ip_data::Header, IPDecoderID, IsInList(), test_node::Next, packet_rec::NumDecoderData, global_vars::NumRules, global_vars::Packets, ip_header::protocol, ip_proto_data::Protos, test_node::RuleID, RuleIsActive(), SetRuleInactive(), and TRUE.

Referenced by InitTestIPProto().


Variable Documentation

GlobalVars Globals

Definition at line 41 of file hlbr.c.

int IPDecoderID

Definition at line 26 of file test_ip_proto.c.


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