suricata
source-ipfw.c File Reference
#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.h"
#include "runmodes.h"
#include "action-globals.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

uint16_t 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 52 of file source-ipfw.c.

◆ IPFW_ACCEPT

#define IPFW_ACCEPT   0

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

◆ IPFW_DROP

#define IPFW_DROP   1

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

◆ IPFW_SOCKET_POLL_MSEC

#define IPFW_SOCKET_POLL_MSEC   300

Definition at line 49 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 762 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 698 of file source-ipfw.c.

References 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 190 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 154 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: