#include "test_tcp_content.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "../engine/hlbr.h"
#include "../decoders/decode_tcp.h"
#include "../packets/packet.h"
#include "../engine/jtree.h"
#include <arpa/inet.h>
Go to the source code of this file.
Data Structures | |
struct | tcp_content_data |
Typedefs | |
typedef tcp_content_data | TCPContentData |
Functions | |
int | TestTCPContent (int PacketSlot, TestNode *Nodes) |
int | TestTCPContent_Stream (int PacketSlot, TestNode *Nodes) |
int | TCPContentAddNode (int TestID, int RuleID, char *Args) |
int | TestTCPContentFinishedSetup () |
int | InitTestTCPContent () |
Variables | |
GlobalVars | Globals |
int | TCPDecoderID |
JTree | TCPContentTree |
typedef struct tcp_content_data TCPContentData |
int InitTestTCPContent | ( | ) |
Set up the test of the TCP Content
Definition at line 144 of file test_tcp_content.c.
References test_rec::AddNode, BindTestToDecoder(), CreateTest(), DEBUGPATH, FALSE, test_rec::FinishedSetup, GetDecoderByName(), Globals, InitJTree(), MAX_NAME_LEN, test_rec::ShortName, TCPContentAddNode(), TCPContentTree, TCPDecoderID, TEST_NONE, test_rec::TestFunc, global_vars::Tests, test_rec::TestStreamFunc, TestTCPContent(), TestTCPContent_Stream(), TestTCPContentFinishedSetup(), and TRUE.
Referenced by InitTests().
int TCPContentAddNode | ( | int | TestID, | |
int | RuleID, | |||
char * | Args | |||
) |
Definition at line 113 of file test_tcp_content.c.
References AddStringJTree(), DEBUGPATH, FALSE, MAX_CONTENT_LEN, NULL, tcp_content_data::tcp_content, TCPContentTree, and TestAddNode().
Referenced by InitTestTCPContent().
int TestTCPContent | ( | int | PacketSlot, | |
TestNode * | Nodes | |||
) |
Apply the Test TCP Content
Definition at line 51 of file test_tcp_content.c.
References packet_rec::BeginData, DEBUGPATH, FALSE, Globals, MatchStrings(), global_vars::NumRules, packet_rec::PacketLen, global_vars::Packets, packet_rec::RawPacket, packet_rec::RuleBits, RuleIsActive(), TCPContentTree, and TRUE.
Referenced by InitTestTCPContent().
int TestTCPContent_Stream | ( | int | PacketSlot, | |
TestNode * | Nodes | |||
) |
Apply the Test TCP Content, for a TCP stream buffer
Definition at line 94 of file test_tcp_content.c.
Referenced by InitTestTCPContent().
int TestTCPContentFinishedSetup | ( | ) |
Called when we're all done adding TCP Content rules
Definition at line 134 of file test_tcp_content.c.
References DEBUGPATH, FinalizeJTree(), and TCPContentTree.
Referenced by InitTestTCPContent().
Definition at line 21 of file test_tcp_content.c.
Referenced by InitTestTCPContent(), TCPContentAddNode(), TestTCPContent(), and TestTCPContentFinishedSetup().
int TCPDecoderID |
Definition at line 20 of file test_tcp_content.c.