suricata
|
#include "suricata-common.h"
#include "suricata.h"
#include "decode.h"
#include "packet.h"
#include "packet-queue.h"
#include "threads.h"
#include "threadvars.h"
#include "tm-queuehandlers.h"
#include "tm-threads.h"
#include "source-ipfw.h"
#include "util-debug.h"
#include "conf.h"
#include "util-byte.h"
#include "util-privs.h"
#include "util-datalink.h"
#include "util-device-private.h"
#include "runmodes.h"
#include "action-globals.h"
Go to the source code of this file.
Data Structures | |
struct | IPFWThreadVars_ |
Structure to hold thread specific variables. More... | |
Macros | |
#define | IPFW_ACCEPT 0 |
#define | IPFW_DROP 1 |
#define | IPFW_SOCKET_POLL_MSEC 300 |
#define | IP_MAXPACKET 65535 |
Typedefs | |
typedef struct IPFWThreadVars_ | IPFWThreadVars |
Structure to hold thread specific variables. | |
Functions | |
void | TmModuleReceiveIPFWRegister (void) |
Registration Function for RecieveIPFW. | |
void | TmModuleVerdictIPFWRegister (void) |
Registration Function for VerdictIPFW. | |
void | TmModuleDecodeIPFWRegister (void) |
Registration Function for DecodeIPFW. | |
int | IPFWRegisterQueue (char *queue) |
Add an IPFW divert. | |
void * | IPFWGetThread (int number) |
Get a pointer to the IPFW thread at index. | |
Variables | |
uint32_t | max_pending_packets |
IPFW packet acquisition support
Definition in file source-ipfw.c.
#define IP_MAXPACKET 65535 |
Definition at line 225 of file source-ipfw.c.
#define IPFW_ACCEPT 0 |
Definition at line 97 of file source-ipfw.c.
#define IPFW_DROP 1 |
Definition at line 98 of file source-ipfw.c.
#define IPFW_SOCKET_POLL_MSEC 300 |
Definition at line 100 of file source-ipfw.c.
typedef struct IPFWThreadVars_ IPFWThreadVars |
Structure to hold thread specific variables.
void * IPFWGetThread | ( | int | number | ) |
Get a pointer to the IPFW thread at index.
This function is temporary used as configuration parser.
number | idx of the queue in our array |
ptr | pointer to the IPFWThreadVars at index |
NULL | on error |
Definition at line 764 of file source-ipfw.c.
Referenced by RunModeIpsIPFWAutoFp(), and RunModeIpsIPFWWorker().
int IPFWRegisterQueue | ( | char * | queue | ) |
Add an IPFW divert.
string | with the queue name |
0 | on success. |
-1 | on failure. |
Definition at line 700 of file source-ipfw.c.
References IPFWThreadVars_::ipfw_index, IPFW_MAX_QUEUE, LiveRegisterDeviceName(), IPFWQueueVars_::port_num, SCLogDebug, SCLogError, SCMutexLock, SCMutexUnlock, and StringParseUint16().
Referenced by SCParseCommandLine().
void TmModuleDecodeIPFWRegister | ( | void | ) |
Registration Function for DecodeIPFW.
Definition at line 188 of file source-ipfw.c.
References TmModule_::flags, TmModule_::Func, TmModule_::name, TmModule_::ThreadDeinit, TmModule_::ThreadExitPrintStats, TmModule_::ThreadInit, TM_FLAG_DECODE_TM, TMM_DECODEIPFW, and tmm_modules.
Referenced by RegisterAllModules().
void TmModuleReceiveIPFWRegister | ( | void | ) |
Registration Function for RecieveIPFW.
Definition at line 151 of file source-ipfw.c.
References TmModule_::cap_flags, TmModule_::flags, TmModule_::Func, TmModule_::name, TmModule_::PktAcqBreakLoop, TmModule_::PktAcqLoop, SC_CAP_NET_ADMIN, SC_CAP_NET_BIND_SERVICE, SC_CAP_NET_BROADCAST, SC_CAP_NET_RAW, SCMutexInit, TmModule_::ThreadDeinit, TmModule_::ThreadExitPrintStats, TmModule_::ThreadInit, TM_FLAG_RECEIVE_TM, tmm_modules, and TMM_RECEIVEIPFW.
Referenced by RegisterAllModules().
void TmModuleVerdictIPFWRegister | ( | void | ) |
Registration Function for VerdictIPFW.
Definition at line 172 of file source-ipfw.c.
References TmModule_::cap_flags, TmModule_::flags, TmModule_::Func, TmModule_::name, SC_CAP_NET_ADMIN, SC_CAP_NET_BIND_SERVICE, SC_CAP_NET_RAW, TmModule_::ThreadDeinit, TmModule_::ThreadExitPrintStats, TmModule_::ThreadInit, TM_FLAG_VERDICT_TM, tmm_modules, and TMM_VERDICTIPFW.
Referenced by RegisterAllModules().