suricata
Netmap running mode

Files

file  runmode-netmap.c
 
file  source-netmap.c
 

Functions

TmEcode NoNetmapSupportExit (ThreadVars *tv, const void *initdata, void **data)
 this function prints an error message and exits. More...
 
void TmModuleReceiveNetmapRegister (void)
 
void TmModuleDecodeNetmapRegister (void)
 Registration Function for DecodeNetmap. More...
 

Variables

intmax_t max_pending_packets
 

Detailed Description

Function Documentation

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

this function prints an error message and exits.

Definition at line 112 of file source-netmap.c.

References ACTION_DROP, NetmapIfaceSettings_::bpf_filter, TmModule_::cap_flags, NetmapIfaceSettings_::checksum_mode, CHECKSUM_VALIDATION_AUTO, CHECKSUM_VALIDATION_DISABLE, ChecksumAutoModeCheck(), NetmapIfaceSettings_::copy_mode, Packet_::datalink, DecodeEthernet(), DecodeRegisterPerfCounters(), DecodeThreadVarsAlloc(), DecodeThreadVarsFree(), DecodeUpdatePacketCounters(), default_packet_size, NetmapIfaceConfig_::DerefFunc, flags, TmModule_::flags, Packet_::flags, TmModule_::Func, GET_PKT_DATA, GET_PKT_LEN, NetmapIfaceSettings_::iface, NetmapIfaceConfig_::iface_name, NetmapIfaceConfig_::in, likely, LINKTYPE_ETHERNET, Packet_::livedev, LiveGetDevice(), max_pending_packets, TmModule_::name, ThreadVars_::name, NETMAP_COPY_MODE_IPS, NETMAP_COPY_MODE_NONE, NetmapGetRSSCount(), next, NetmapIfaceConfig_::out, PACKET_TEST_ACTION, PacketCopyData(), PacketDecodeFinalize(), PacketFreeOrRelease(), PacketPoolGetPacket(), PacketPoolWait(), PacketPoolWaitForN(), PacketSetData(), PKT_IGNORE_CHECKSUM, PKT_IS_PSEUDOPKT, PKT_PSEUDO_STREAM_END, PKT_SET_SRC, PKT_SRC_WIRE, TmModule_::PktAcqBreakLoop, TmModule_::PktAcqLoop, POLL_TIMEOUT, NetmapIfaceSettings_::promisc, TmModule_::RegisterTests, Packet_::ReleasePacket, RunmodeGetActive(), SC_ATOMIC_ADD, SC_ATOMIC_CAS, SC_ATOMIC_DECLARE, SC_ATOMIC_GET, SC_ATOMIC_INIT, SC_CAP_NET_RAW, SC_ERR_INVALID_ARGUMENT, SC_ERR_INVALID_VALUE, SC_ERR_MEM_ALLOC, SC_ERR_NETMAP_CREATE, SC_ERR_NETMAP_READ, SC_ERR_NO_NETMAP, SCBPFCompile(), SCBPFFree(), SCEnter, SCFree, SCLogDebug, SCLogError, SCLogPerf, SCLogWarning, SCMalloc, SCMutex, SCMUTEX_INITIALIZER, SCMutexLock, SCMutexUnlock, SCReturnInt, SCSpinDestroy, SCSpinInit, SCSpinlock, SCSpinLock, SCSpinTrylock, SCSpinUnlock, TmSlot_::slot_next, StatsAddUI64(), StatsGetLocalCounterValue(), StatsRegisterCounter(), StatsSyncCountersIfSignalled, strlcpy(), suricata_ctl_flags, NetmapIfaceSettings_::sw_ring, TAILQ_ENTRY, TAILQ_FOREACH, TAILQ_FOREACH_SAFE, TAILQ_HEAD, TAILQ_HEAD_INITIALIZER, TAILQ_INSERT_TAIL, TAILQ_REMOVE, TmModule_::ThreadDeinit, TmModule_::ThreadExitPrintStats, TmModule_::ThreadInit, NetmapIfaceSettings_::threads, TM_ECODE_FAILED, TM_ECODE_OK, TM_FLAG_DECODE_TM, TM_FLAG_RECEIVE_TM, TMM_DECODENETMAP, tmm_modules, TMM_RECEIVENETMAP, TmModuleDecodeNetmapRegister(), TmModuleReceiveNetmapRegister(), TmqhOutputPacketpool(), ts, Packet_::ts, and unlikely.

Referenced by TmModuleDecodeNetmapRegister(), and TmModuleReceiveNetmapRegister().

Here is the call graph for this function:

Here is the caller graph for this function:

void TmModuleDecodeNetmapRegister ( void  )

Registration Function for DecodeNetmap.

Todo:
Unit tests are needed for this module.

Definition at line 97 of file source-netmap.c.

References TmModule_::cap_flags, TmModule_::flags, TmModule_::Func, TmModule_::name, NoNetmapSupportExit(), TmModule_::RegisterTests, TmModule_::ThreadDeinit, TmModule_::ThreadExitPrintStats, TmModule_::ThreadInit, TM_FLAG_DECODE_TM, TMM_DECODENETMAP, and tmm_modules.

Referenced by NoNetmapSupportExit(), and RegisterAllModules().

Here is the call graph for this function:

Here is the caller graph for this function:

void TmModuleReceiveNetmapRegister ( void  )

Variable Documentation

intmax_t max_pending_packets

Maximum packets to simultaneously process.

Definition at line 215 of file suricata.c.

Referenced by NoNetmapSupportExit().