#include <stdlib.h>
#include <string.h>
#include "generators.h"
#include "event_wrapper.h"
#include "event_queue.h"
#include "util.h"
#include "plugbase.h"
#include "parser.h"
#include "snort.h"
#include "inline.h"
#include "sfthreshold.h"
#include "debug.h"
#include "str_search.h"
#include "xlink2state.h"
Go to the source code of this file.
Defines | |
#define | START_LIST "{" |
#define | END_LIST "}" |
#define | PORTS "ports" |
#define | DISABLE "disable" |
#define | INLINE_DROP "drop" |
#define | CONF_SEPARATORS " \t\n\r" |
#define | ERRSTRLEN 512 |
Functions | |
void | XLINK2STATE_Init (void) |
void | XLINK2STATE_SessionFree (void *v) |
static void | XLINK2STATE_Setup (Packet *p) |
static int | IsServer (unsigned short port) |
static char * | safe_strchr (char *buf, char c, u_int len) |
int | ParseXLink2State (int id, u_int8_t *x) |
int | StrFound (void *id, int index, void *data) |
static void | XLINK2STATE_ProcessPacket (Packet *p) |
void | SnortXLINK2STATE (Packet *p) |
static int | PrintConfig (void) |
static int | ProcessPorts (char *ErrorString, int ErrStrLen) |
void | XLINK2STATE_ParseArgs (u_char *args) |
Variables | |
XLINK2STATE * | _xlink |
static u_int | _xlink2state_ports [65535] |
static u_int | _xlink2state_disabled = 0 |
static u_int | _xlink2state_drop = 0 |
static Packet * | _xlink2state_pkt = NULL |
|
Definition at line 54 of file xlink2state.c. |
|
Definition at line 52 of file xlink2state.c. Referenced by XLINK2STATE_ParseArgs(). |
|
Definition at line 50 of file xlink2state.c. |
|
Definition at line 56 of file xlink2state.c. |
|
Definition at line 53 of file xlink2state.c. Referenced by XLINK2STATE_ParseArgs(). |
|
Definition at line 51 of file xlink2state.c. |
|
Definition at line 49 of file xlink2state.c. |
|
Definition at line 136 of file xlink2state.c. References _xlink2state_ports. |
|
Definition at line 164 of file xlink2state.c. References _xlink2state_drop, _XLINK2STATE::alerted, _Packet::data, _Packet::dsize, GENERATOR_SMTP, InlineDrop(), InlineMode(), _IPHdr::ip_dst, _IPHdr::ip_src, _Packet::iph, _XLINK2STATE::length, _Packet::packet_flags, PKT_INLINE_DROP, _Packet::pkth, safe_strchr(), sfthreshold_test(), SnortEventqAdd(), and pcap_pkthdr::ts. Referenced by StrFound(). |
|
Definition at line 337 of file xlink2state.c. References _xlink2state_drop, _xlink2state_ports, InlineMode(), LogMessage(), memset, sfsnprintfappend(), snprintf, and STD_BUF. |
|
Definition at line 380 of file xlink2state.c. References _xlink2state_ports, CONF_SEPARATORS, END_LIST, NULL, PORTS, SMTP_DEFAULT_SERVER_PORT, snprintf, START_LIST, and strtol(). |
|
Definition at line 146 of file xlink2state.c. References NULL. Referenced by ParseXLink2State(). |
|
Definition at line 305 of file xlink2state.c. References _xlink2state_disabled, DEBUG_PLUGIN, DEBUG_WRAP, _Packet::dp, _Packet::dsize, IsServer(), _Packet::packet_flags, PKT_STREAM_INSERT, XLINK2STATE_ProcessPacket(), and XLINK2STATE_Setup(). Referenced by XLINK2STATEDetect(). |
|
Definition at line 246 of file xlink2state.c. References int(), and ParseXLink2State(). Referenced by XLINK2STATE_ProcessPacket(). |
|
Definition at line 65 of file xlink2state.c. References SearchAdd(), SearchInit(), and SearchPrepPatterns(). Referenced by XLINK2STATEInit(). |
|
Definition at line 466 of file xlink2state.c. References _xlink2state_disabled, _xlink2state_drop, _xlink2state_ports, CONF_SEPARATORS, DISABLE, ERRSTRLEN, FatalError(), file_line, file_name, INLINE_DROP, InlineMode(), LogMessage(), NULL, PORTS, PrintConfig(), ProcessPorts(), SMTP_DEFAULT_SERVER_PORT, and strcasecmp. Referenced by XLINK2STATEInit(). |
|
Definition at line 265 of file xlink2state.c. References _xlink2state_drop, _XLINK2STATE::alerted, _Packet::data, _Packet::dsize, InlineDrop(), InlineMode(), NULL, _Packet::packet_flags, PKT_INLINE_DROP, _Session::preproc_data, SearchFindString(), _Packet::ssnptr, and StrFound(). Referenced by SnortXLINK2STATE(). |
|
Definition at line 87 of file xlink2state.c. Referenced by XLINK2STATE_Setup(). |
|
Definition at line 104 of file xlink2state.c. References FatalError(), file_line, file_name, memset, NULL, _Session::preproc_data, _Session::preproc_free, _Packet::ssnptr, and XLINK2STATE_SessionFree(). Referenced by SnortXLINK2STATE(). |
|
Definition at line 40 of file xlink2state.c. |
|
Definition at line 42 of file xlink2state.c. Referenced by SnortXLINK2STATE(), and XLINK2STATE_ParseArgs(). |
|
Definition at line 43 of file xlink2state.c. Referenced by ParseXLink2State(), PrintConfig(), XLINK2STATE_ParseArgs(), and XLINK2STATE_ProcessPacket(). |
|
Definition at line 44 of file xlink2state.c. |
|
Definition at line 41 of file xlink2state.c. Referenced by IsServer(), PrintConfig(), ProcessPorts(), and XLINK2STATE_ParseArgs(). |