suricata
flow-queue.c File Reference
#include "suricata-common.h"
#include "threads.h"
#include "flow-private.h"
#include "flow-queue.h"
#include "flow-util.h"
#include "util-error.h"
#include "util-debug.h"
#include "util-print.h"
Include dependency graph for flow-queue.c:

Go to the source code of this file.

Functions

FlowQueue * FlowQueueNew (void)
 
FlowQueue * FlowQueueInit (FlowQueue *q)
 
void FlowQueueDestroy (FlowQueue *q)
 Destroy a flow queue. More...
 
void FlowQueuePrivateAppendFlow (FlowQueuePrivate *fqc, Flow *f)
 
void FlowQueuePrivatePrependFlow (FlowQueuePrivate *fqc, Flow *f)
 
void FlowQueuePrivateAppendPrivate (FlowQueuePrivate *dest, FlowQueuePrivate *src)
 
void FlowQueueAppendPrivate (FlowQueue *fq, FlowQueuePrivate *fqc)
 
FlowQueuePrivate FlowQueueExtractPrivate (FlowQueue *fq)
 
Flow * FlowQueuePrivateGetFromTop (FlowQueuePrivate *fqc)
 
void FlowEnqueue (FlowQueue *q, Flow *f)
 add a flow to a queue More...
 
Flow * FlowDequeue (FlowQueue *q)
 remove a flow from the queue More...
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

Flow queue handler functions

Definition in file flow-queue.c.

Function Documentation

◆ FlowDequeue()

Flow* FlowDequeue ( FlowQueue *  q)

remove a flow from the queue

Parameters
qqueue
Return values
fflow or NULL if empty list.

Definition at line 191 of file flow-queue.c.

References f, FlowQueuePrivateGetFromTop(), FQLOCK_LOCK, and FlowQueue_::priv.

Referenced by FlowShutdown().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FlowEnqueue()

void FlowEnqueue ( FlowQueue *  q,
Flow *  f 
)

add a flow to a queue

Parameters
qqueue
fflow

Definition at line 173 of file flow-queue.c.

References BUG_ON, f, FlowQueuePrivateAppendFlow(), FQLOCK_LOCK, and FlowQueue_::priv.

Here is the call graph for this function:

◆ FlowQueueAppendPrivate()

void FlowQueueAppendPrivate ( FlowQueue *  fq,
FlowQueuePrivate *  fqc 
)

◆ FlowQueueDestroy()

void FlowQueueDestroy ( FlowQueue *  q)

Destroy a flow queue.

Parameters
qthe flow queue to destroy

Definition at line 60 of file flow-queue.c.

References FQLOCK_DESTROY.

Referenced by FlowShutdown().

Here is the caller graph for this function:

◆ FlowQueueExtractPrivate()

FlowQueuePrivate FlowQueueExtractPrivate ( FlowQueue *  fq)

Definition at line 140 of file flow-queue.c.

References FQLOCK_LOCK, and FlowQueue_::priv.

◆ FlowQueueInit()

FlowQueue* FlowQueueInit ( FlowQueue *  q)

Definition at line 46 of file flow-queue.c.

References FQLOCK_INIT.

Referenced by FlowInitConfig(), and FlowQueueNew().

Here is the caller graph for this function:

◆ FlowQueueNew()

FlowQueue* FlowQueueNew ( void  )

Definition at line 35 of file flow-queue.c.

References FlowQueueInit(), SCLogError, and SCMalloc.

Here is the call graph for this function:

◆ FlowQueuePrivateAppendFlow()

void FlowQueuePrivateAppendFlow ( FlowQueuePrivate *  fqc,
Flow *  f 
)

Definition at line 65 of file flow-queue.c.

References FlowQueuePrivate_::bot, f, FlowQueuePrivate_::len, Flow_::next, and FlowQueuePrivate_::top.

Referenced by FlowEnqueue().

Here is the caller graph for this function:

◆ FlowQueuePrivateAppendPrivate()

void FlowQueuePrivateAppendPrivate ( FlowQueuePrivate *  dest,
FlowQueuePrivate *  src 
)

◆ FlowQueuePrivateGetFromTop()

Flow* FlowQueuePrivateGetFromTop ( FlowQueuePrivate *  fqc)

Definition at line 151 of file flow-queue.c.

References FlowQueuePrivate_::bot, f, FlowQueuePrivate_::len, Flow_::next, and FlowQueuePrivate_::top.

Referenced by FlowDequeue(), and UTHBuildPacketOfFlows().

Here is the caller graph for this function:

◆ FlowQueuePrivatePrependFlow()

void FlowQueuePrivatePrependFlow ( FlowQueuePrivate *  fqc,
Flow *  f 
)