#include "test_tcp_listcontent.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "../decoders/decode_tcp.h"
#include "../packets/packet.h"
#include "../engine/jtree.h"
#include "../engine/parse_config.h"
#include <arpa/inet.h>
Go to the source code of this file.
Data Structures | |
struct | tcp_content_data |
Typedefs | |
typedef tcp_content_data | TCPListContentData |
Functions | |
int | TestTCPListContent (int PacketSlot, TestNode *Nodes) |
int | TCPListContentAddNode (int TestID, int RuleID, char *Args) |
int | TestTCPListContentFinishedSetup () |
int | InitTestTCPListContent () |
Variables | |
GlobalVars | Globals |
int | TCPDecoderID |
JTree | TCPListContentTree |
Definition in file test_tcp_listcontent.c.
typedef struct tcp_content_data TCPListContentData |
int InitTestTCPListContent | ( | ) |
Set up the TCP ListContent test
Definition at line 157 of file test_tcp_listcontent.c.
References test_rec::AddNode, BindTestToDecoder(), CreateTest(), FALSE, test_rec::FinishedSetup, GetDecoderByName(), Globals, InitJTree(), MAX_NAME_LEN, test_rec::ShortName, TCPDecoderID, TCPListContentAddNode(), TCPListContentTree, TEST_NONE, test_rec::TestFunc, global_vars::Tests, TestTCPListContent(), TestTCPListContentFinishedSetup(), and TRUE.
Referenced by InitTests().
int TCPListContentAddNode | ( | int | TestID, | |
int | RuleID, | |||
char * | Args | |||
) |
Add a rule node to this test
TestID | Number of this test in the Globals.Tests[] array | |
RuleID | Number of the rule in the Globals.Rules[] array | |
Args | File name of the word list |
Definition at line 95 of file test_tcp_listcontent.c.
References AddStringJTree(), FALSE, GetLine(), NULL, TCPListContentTree, and TestAddNode().
Referenced by InitTestTCPListContent().
int TestTCPListContent | ( | int | PacketSlot, | |
TestNode * | Nodes | |||
) |
Apply the Test
PacketSlot | Number of the packet in the Globals.Packets[] array | |
Nodes | Data from the rules parameters stored for this test |
Definition at line 42 of file test_tcp_listcontent.c.
References packet_rec::BeginData, FALSE, Globals, MatchStrings(), global_vars::NumRules, packet_rec::PacketLen, global_vars::Packets, packet_rec::RawPacket, packet_rec::RuleBits, RuleIsActive(), TCPListContentTree, and TRUE.
Referenced by InitTestTCPListContent().
int TestTCPListContentFinishedSetup | ( | ) |
Called when we're all done adding rules
Definition at line 142 of file test_tcp_listcontent.c.
References FinalizeJTree(), and TCPListContentTree.
Referenced by InitTestTCPListContent().
int TCPDecoderID |
Definition at line 31 of file test_tcp_listcontent.c.
Definition at line 32 of file test_tcp_listcontent.c.
Referenced by InitTestTCPListContent(), TCPListContentAddNode(), TestTCPListContent(), and TestTCPListContentFinishedSetup().