suricata
source-ipfw.c File Reference
#include "suricata-common.h"
#include "suricata.h"
#include "decode.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-device.h"
#include "runmodes.h"
Include dependency graph for source-ipfw.c:

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. More...
 

Functions

void TmModuleReceiveIPFWRegister (void)
 Registration Function for RecieveIPFW. More...
 
void TmModuleVerdictIPFWRegister (void)
 Registration Function for VerdictIPFW. More...
 
void TmModuleDecodeIPFWRegister (void)
 Registration Function for DecodeIPFW. More...
 
int IPFWRegisterQueue (char *queue)
 Add an IPFW divert. More...
 
void * IPFWGetThread (int number)
 Get a pointer to the IPFW thread at index. More...
 

Variables

int max_pending_packets
 

Detailed Description

Author
Nick Rogness nick@.nosp@m.rogn.nosp@m.ess.n.nosp@m.et
Eric Leblond eric@.nosp@m.regi.nosp@m.t.org

IPFW packet acquisition support

Definition in file source-ipfw.c.

Macro Definition Documentation

◆ IP_MAXPACKET

#define IP_MAXPACKET   65535

Definition at line 49 of file source-ipfw.c.

◆ IPFW_ACCEPT

#define IPFW_ACCEPT   0

Definition at line 43 of file source-ipfw.c.

◆ IPFW_DROP

#define IPFW_DROP   1

Definition at line 44 of file source-ipfw.c.

◆ IPFW_SOCKET_POLL_MSEC

#define IPFW_SOCKET_POLL_MSEC   300

Definition at line 46 of file source-ipfw.c.

Typedef Documentation

◆ IPFWThreadVars

Structure to hold thread specific variables.

Function Documentation

◆ IPFWGetThread()

void* IPFWGetThread ( int  number)

Get a pointer to the IPFW thread at index.

This function is temporary used as configuration parser.

Parameters
numberidx of the queue in our array
Return values
ptrpointer to the IPFWThreadVars at index
NULLon error

Definition at line 772 of file source-ipfw.c.

Referenced by RunModeIpsIPFWAutoFp(), and RunModeIpsIPFWWorker().

Here is the caller graph for this function:

◆ IPFWRegisterQueue()

int IPFWRegisterQueue ( char *  queue)

Add an IPFW divert.

Parameters
stringwith the queue name
Return values
0on success.
-1on failure.

Definition at line 707 of file source-ipfw.c.

References SC_ERR_INVALID_ARGUMENT, SCLogError, SCMutexLock, and StringParseUint16().

Here is the call graph for this function:

◆ TmModuleDecodeIPFWRegister()

void TmModuleDecodeIPFWRegister ( void  )

Registration Function for DecodeIPFW.

Todo:
Unit tests are needed for this module.

Definition at line 191 of file source-ipfw.c.

References TmModule_::name, TmModule_::ThreadInit, TMM_DECODEIPFW, and tmm_modules.

Referenced by RegisterAllModules().

Here is the caller graph for this function:

◆ TmModuleReceiveIPFWRegister()

void TmModuleReceiveIPFWRegister ( void  )

Registration Function for RecieveIPFW.

Todo:
Unit tests are needed for this module.
Todo:
untested

Definition at line 153 of file source-ipfw.c.

References SCMutexInit.

Referenced by RegisterAllModules().

Here is the caller graph for this function:

◆ TmModuleVerdictIPFWRegister()

void TmModuleVerdictIPFWRegister ( void  )

Registration Function for VerdictIPFW.

Todo:
Unit tests are needed for this module.
Todo:
untested

Definition at line 175 of file source-ipfw.c.

References TmModule_::name, TmModule_::ThreadInit, tmm_modules, and TMM_VERDICTIPFW.

Referenced by RegisterAllModules().

Here is the caller graph for this function: