|
suricata
|
#include "suricata-common.h"

Go to the source code of this file.
Data Structures | |
| struct | FlowQueuePrivate_ |
| struct | FlowQueue_ |
Macros | |
| #define | FQLOCK_MUTEX |
| #define | qtop priv.top |
| #define | qbot priv.bot |
| #define | qlen priv.len |
| #define | FQLOCK_INIT(q) SCMutexInit(&(q)->m, NULL) |
| #define | FQLOCK_DESTROY(q) SCMutexDestroy(&(q)->m) |
| #define | FQLOCK_LOCK(q) SCMutexLock(&(q)->m) |
| #define | FQLOCK_TRYLOCK(q) SCMutexTrylock(&(q)->m) |
| #define | FQLOCK_UNLOCK(q) SCMutexUnlock(&(q)->m) |
Typedefs | |
| typedef struct FlowQueuePrivate_ | FlowQueuePrivate |
| typedef struct FlowQueue_ | FlowQueue |
Functions | |
| FlowQueue * | FlowQueueNew (void) |
| FlowQueue * | FlowQueueInit (FlowQueue *) |
| void | FlowQueueDestroy (FlowQueue *) |
| Destroy a flow queue. More... | |
| void | FlowEnqueue (FlowQueue *, Flow *) |
| add a flow to a queue More... | |
| Flow * | FlowDequeue (FlowQueue *) |
| remove a flow from the queue More... | |
| void | FlowQueueRemove (FlowQueue *fq, Flow *f) |
| void | FlowQueuePrivateAppendFlow (FlowQueuePrivate *fqc, Flow *f) |
| void | FlowQueuePrivatePrependFlow (FlowQueuePrivate *fqc, Flow *f) |
| void | FlowQueueAppendPrivate (FlowQueue *fq, FlowQueuePrivate *fqp) |
| void | FlowQueuePrivateAppendPrivate (FlowQueuePrivate *dest, FlowQueuePrivate *src) |
| FlowQueuePrivate | FlowQueueExtractPrivate (FlowQueue *fq) |
| Flow * | FlowQueuePrivateGetFromTop (FlowQueuePrivate *fqp) |
Definition in file flow-queue.h.
| #define FQLOCK_DESTROY | ( | q | ) | SCMutexDestroy(&(q)->m) |
Definition at line 72 of file flow-queue.h.
| #define FQLOCK_INIT | ( | q | ) | SCMutexInit(&(q)->m, NULL) |
Definition at line 71 of file flow-queue.h.
| #define FQLOCK_LOCK | ( | q | ) | SCMutexLock(&(q)->m) |
Definition at line 73 of file flow-queue.h.
| #define FQLOCK_MUTEX |
Spinlocks or Mutex for the flow queues.
Definition at line 32 of file flow-queue.h.
| #define FQLOCK_TRYLOCK | ( | q | ) | SCMutexTrylock(&(q)->m) |
Definition at line 74 of file flow-queue.h.
| #define FQLOCK_UNLOCK | ( | q | ) | SCMutexUnlock(&(q)->m) |
Definition at line 75 of file flow-queue.h.
| #define qbot priv.bot |
Definition at line 61 of file flow-queue.h.
| #define qlen priv.len |
Definition at line 62 of file flow-queue.h.
| #define qtop priv.top |
Definition at line 60 of file flow-queue.h.
| typedef struct FlowQueue_ FlowQueue |
| typedef struct FlowQueuePrivate_ FlowQueuePrivate |
remove a flow from the queue
| q | queue |
| f | flow or NULL if empty list. |
Definition at line 191 of file flow-queue.c.
References FlowQueuePrivateGetFromTop(), FQLOCK_LOCK, and FlowQueue_::priv.
Referenced by FlowShutdown().


add a flow to a queue
| q | queue |
| f | flow |
Definition at line 173 of file flow-queue.c.
References BUG_ON, FlowQueuePrivateAppendFlow(), FQLOCK_LOCK, and FlowQueue_::priv.

| void FlowQueueAppendPrivate | ( | FlowQueue * | fq, |
| FlowQueuePrivate * | fqp | ||
| ) |
Definition at line 119 of file flow-queue.c.
References FlowQueuePrivate_::bot, FQLOCK_LOCK, FlowQueuePrivate_::len, and FlowQueuePrivate_::top.
| void FlowQueueDestroy | ( | FlowQueue * | q | ) |
Destroy a flow queue.
| q | the flow queue to destroy |
Definition at line 60 of file flow-queue.c.
References FQLOCK_DESTROY.
Referenced by FlowShutdown().

| FlowQueuePrivate FlowQueueExtractPrivate | ( | FlowQueue * | fq | ) |
Definition at line 140 of file flow-queue.c.
References FQLOCK_LOCK, and FlowQueue_::priv.
Definition at line 46 of file flow-queue.c.
References FQLOCK_INIT.
Referenced by FlowInitConfig(), and FlowQueueNew().

| FlowQueue* FlowQueueNew | ( | void | ) |
Definition at line 35 of file flow-queue.c.
References FlowQueueInit(), SCLogError, and SCMalloc.

| void FlowQueuePrivateAppendFlow | ( | FlowQueuePrivate * | fqc, |
| Flow * | f | ||
| ) |
Definition at line 65 of file flow-queue.c.
References FlowQueuePrivate_::bot, FlowQueuePrivate_::len, Flow_::next, and FlowQueuePrivate_::top.
Referenced by FlowEnqueue().

| void FlowQueuePrivateAppendPrivate | ( | FlowQueuePrivate * | dest, |
| FlowQueuePrivate * | src | ||
| ) |
Definition at line 88 of file flow-queue.c.
References FlowQueuePrivate_::bot, FlowQueuePrivate_::len, Flow_::next, src, and FlowQueuePrivate_::top.
| Flow* FlowQueuePrivateGetFromTop | ( | FlowQueuePrivate * | fqp | ) |
Definition at line 151 of file flow-queue.c.
References FlowQueuePrivate_::bot, FlowQueuePrivate_::len, Flow_::next, and FlowQueuePrivate_::top.
Referenced by FlowDequeue(), and UTHBuildPacketOfFlows().

| void FlowQueuePrivatePrependFlow | ( | FlowQueuePrivate * | fqc, |
| Flow * | f | ||
| ) |
Definition at line 78 of file flow-queue.c.
References FlowQueuePrivate_::bot, FlowQueuePrivate_::len, Flow_::next, and FlowQueuePrivate_::top.