|
suricata
|
#include "suricata.h"#include "packet-queue.h"#include "decode.h"#include "threads.h"#include "threadvars.h"#include "tmqh-flow.h"#include "flow-hash.h"#include "tm-queuehandlers.h"#include "conf.h"#include "util-unittest.h"
Go to the source code of this file.
Macros | |
| #define | PRINT_IF_FUNC(f, msg) |
Functions | |
| Packet * | TmqhInputFlow (ThreadVars *t) |
| void | TmqhOutputFlowHash (ThreadVars *t, Packet *p) |
| void | TmqhOutputFlowIPPair (ThreadVars *tv, Packet *p) |
| select the queue to output based on IP address pair. More... | |
| void * | TmqhOutputFlowSetupCtx (const char *queue_str) |
| setup the queue handlers ctx More... | |
| void | TmqhOutputFlowFreeCtx (void *ctx) |
| void | TmqhFlowRegisterTests (void) |
| void | TmqhFlowRegister (void) |
| void | TmqhFlowPrintAutofpHandler (void) |
Simple output queue handler that makes sure all packets of the same flow are sent to the same queue. We support different kind of q handlers. Have a look at "autofp-scheduler" conf to further understand the various q handlers we provide.
Definition in file tmqh-flow.c.
| #define PRINT_IF_FUNC | ( | f, | |
| msg | |||
| ) |
| void TmqhFlowPrintAutofpHandler | ( | void | ) |
Definition at line 84 of file tmqh-flow.c.
References PRINT_IF_FUNC, TmqhOutputFlowHash(), and TmqhOutputFlowIPPair().

| void TmqhFlowRegister | ( | void | ) |
Definition at line 51 of file tmqh-flow.c.
References Tmqh_::InHandler, Tmqh_::name, Tmqh_::OutHandler, Tmqh_::OutHandlerCtxFree, Tmqh_::OutHandlerCtxSetup, Tmqh_::RegisterTests, SCConfGet(), SCLogNotice, TMQH_FLOW, tmqh_table, TmqhFlowRegisterTests(), TmqhInputFlow(), TmqhOutputFlowFreeCtx(), TmqhOutputFlowHash(), TmqhOutputFlowIPPair(), and TmqhOutputFlowSetupCtx().
Referenced by TmqhSetup().


| void TmqhFlowRegisterTests | ( | void | ) |
Definition at line 396 of file tmqh-flow.c.
References UtRegisterTest().
Referenced by TmqhFlowRegister().


| Packet * TmqhInputFlow | ( | ThreadVars * | t | ) |
Definition at line 98 of file tmqh-flow.c.
References PacketQueue_::cond_q, ThreadVars_::inq, PacketQueue_::len, PacketQueue_::mutex_q, PacketDequeue(), Tmq_::pq, SCCondWait, SCMutexLock, SCMutexUnlock, StatsSyncCountersIfSignalled(), and tv.
Referenced by TmqhFlowRegister().


| void TmqhOutputFlowFreeCtx | ( | void * | ctx | ) |
Definition at line 210 of file tmqh-flow.c.
References ctx, TmqhFlowCtx_::queues, SCFree, SCLogPerf, and TmqhFlowCtx_::size.
Referenced by TmqhFlowRegister().

| void TmqhOutputFlowHash | ( | ThreadVars * | t, |
| Packet * | p | ||
| ) |
Definition at line 220 of file tmqh-flow.c.
References PacketQueue_::cond_q, ctx, Packet_::flags, Packet_::flow_hash, PacketQueue_::mutex_q, ThreadVars_::outctx, PacketEnqueue(), PKT_WANTS_FLOW, SCCondSignal, SCMutexLock, SCMutexUnlock, and tv.
Referenced by TmqhFlowPrintAutofpHandler(), and TmqhFlowRegister().


| void TmqhOutputFlowIPPair | ( | ThreadVars * | tv, |
| Packet * | p | ||
| ) |
select the queue to output based on IP address pair.
| tv | thread vars. |
| p | packet. |
Definition at line 248 of file tmqh-flow.c.
References PacketQueue_::cond_q, ctx, Packet_::dst, Address_::family, PacketQueue_::mutex_q, ThreadVars_::outctx, PacketEnqueue(), SCCondSignal, SCMutexLock, SCMutexUnlock, Packet_::src, and tv.
Referenced by TmqhFlowPrintAutofpHandler(), and TmqhFlowRegister().


| void * TmqhOutputFlowSetupCtx | ( | const char * | queue_str | ) |
setup the queue handlers ctx
Parses a comma separated string "queuename1,queuename2,etc" and sets the ctx up to devide flows over these queue's.
| queue_str | comma separated string with output queue names |
| ctx | queues handlers ctx or NULL in error |
Definition at line 165 of file tmqh-flow.c.
References ctx, SCCalloc, SCLogDebug, SCStrdup, str, and unlikely.
Referenced by TmqhFlowRegister().
