suricata
source-windivert.c File Reference
#include "suricata-common.h"
#include "suricata.h"
#include "tm-threads.h"
#include "util-byte.h"
#include "util-debug.h"
#include "util-device.h"
#include "util-error.h"
#include "util-ioctl.h"
#include "util-privs.h"
#include "util-unittest.h"
#include "runmodes.h"
#include "queue.h"
#include "source-windivert-prototypes.h"
#include "source-windivert.h"
Include dependency graph for source-windivert.c:

Go to the source code of this file.

Functions

TmEcode NoWinDivertSupportExit (ThreadVars *, const void *, void **)
 
void TmModuleReceiveWinDivertRegister (void)
 
void TmModuleVerdictWinDivertRegister (void)
 
void TmModuleDecodeWinDivertRegister (void)
 

Detailed Description

Author
Jacob Masen-Smith jacob.nosp@m.@eve.nosp@m.ngx.c.nosp@m.om

WinDivert emulation of netfilter_queue functionality to hook into Suricata's IPS mode. Supported solely on Windows.

Definition in file source-windivert.c.

Function Documentation

TmEcode NoWinDivertSupportExit ( ThreadVars tv,
const void *  initdata,
void **  data 
)

Definition at line 81 of file source-windivert.c.

References ACTION_DROP, CaptureStatsSetup(), CaptureStatsUpdate(), DecodeIPV4(), DecodeIPV6(), DecodeRegisterPerfCounters(), DecodeThreadVarsAlloc(), DecodeThreadVarsFree(), DecodeUpdatePacketCounters(), LiveDevice_::dev, DisableIfaceOffloading(), Packet_::ext_pkt, FAIL, TmModule_::flags, TmModule_::Func, GET_PKT_DATA, GET_PKT_DIRECT_DATA, GET_PKT_DIRECT_MAX_SIZE, GET_PKT_LEN, GetIfaceOffloading(), ip4h, ip6h, IPV4_GET_RAW_VER, IPV6_GET_RAW_VER, IS_TUNNEL_PKT, LiveGetOffload(), LiveRegisterDevice(), MAX_PAYLOAD_SIZE, TmModule_::name, ThreadVars_::name, next, PACKET_TEST_ACTION, PacketCallocExtPkt(), PacketDecodeFinalize(), PacketGetFromQueueOrAlloc(), PacketPoolWait(), PASS, PKT_IS_PSEUDOPKT, PKT_SET_SRC, PKT_SRC_WIRE, TmModule_::PktAcqLoop, RestoreIfaceOffloading(), Packet_::root, SC_ERR_FATAL, SC_ERR_INVALID_ARGUMENT, SC_ERR_SYSCALL, SC_ERR_WINDIVERT_GENERIC, SC_ERR_WINDIVERT_INVALID_FILTER, SC_ERR_WINDIVERT_NOSUPPORT, SC_ERR_WINDIVERT_TOOLONG_FILTER, SCCalloc, SCEnter, SCFree, SCLogDebug, SCLogError, SCLogInfo, SCLogWarning, SCMutex, SCMUTEX_INITIALIZER, SCMutexDestroy, SCMutexInit, SCMutexLock, SCMutexUnlock, SCReturn, SCReturnCT, SCReturnInt, SCStrdup, SET_PKT_LEN, StatsSyncCountersIfSignalled, strlcpy(), suricata_ctl_flags, SURICATA_STOP, TAILQ_FIRST, TAILQ_HEAD, TAILQ_INIT, TAILQ_INSERT_TAIL, TAILQ_NEXT, TmModule_::ThreadDeinit, TmModule_::ThreadExitPrintStats, TmModule_::ThreadInit, TimeGet(), TM_ECODE_FAILED, TM_ECODE_OK, TM_FLAG_DECODE_TM, TM_FLAG_RECEIVE_TM, TMM_DECODEWINDIVERT, tmm_modules, TMM_RECEIVEWINDIVERT, TMM_VERDICTWINDIVERT, TmModuleDecodeWinDivertRegister(), TmModuleReceiveWinDivertRegister(), TmModuleVerdictWinDivertRegister(), TmqhOutputPacketpool(), ts, Packet_::ts, unlikely, and UtRegisterTest().

Referenced by TmModuleDecodeWinDivertRegister(), TmModuleReceiveWinDivertRegister(), and TmModuleVerdictWinDivertRegister().

Here is the call graph for this function:

Here is the caller graph for this function:

void TmModuleDecodeWinDivertRegister ( void  )

Definition at line 74 of file source-windivert.c.

References TmModule_::flags, TmModule_::name, NoWinDivertSupportExit(), TmModule_::ThreadInit, TM_FLAG_DECODE_TM, TMM_DECODEWINDIVERT, and tmm_modules.

Referenced by NoWinDivertSupportExit(), and RegisterAllModules().

Here is the call graph for this function:

Here is the caller graph for this function:

void TmModuleReceiveWinDivertRegister ( void  )

Definition at line 61 of file source-windivert.c.

References TmModule_::flags, TmModule_::name, NoWinDivertSupportExit(), TmModule_::ThreadInit, TM_FLAG_RECEIVE_TM, tmm_modules, and TMM_RECEIVEWINDIVERT.

Referenced by NoWinDivertSupportExit(), and RegisterAllModules().

Here is the call graph for this function:

Here is the caller graph for this function:

void TmModuleVerdictWinDivertRegister ( void  )

Definition at line 68 of file source-windivert.c.

References TmModule_::name, NoWinDivertSupportExit(), TmModule_::ThreadInit, tmm_modules, and TMM_VERDICTWINDIVERT.

Referenced by NoWinDivertSupportExit(), and RegisterAllModules().

Here is the call graph for this function:

Here is the caller graph for this function: