suricata
defrag-stack.h File Reference
#include "suricata-common.h"
#include "defrag.h"
Include dependency graph for defrag-stack.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  DefragTrackerStack_
 

Macros

#define DQLOCK_MUTEX
 
#define DQLOCK_INIT(q)   SCMutexInit(&(q)->m, NULL)
 
#define DQLOCK_DESTROY(q)   SCMutexDestroy(&(q)->m)
 
#define DQLOCK_LOCK(q)   SCMutexLock(&(q)->m)
 
#define DQLOCK_TRYLOCK(q)   SCMutexTrylock(&(q)->m)
 
#define DQLOCK_UNLOCK(q)   SCMutexUnlock(&(q)->m)
 

Typedefs

typedef struct DefragTrackerStack_ DefragTrackerStack
 

Functions

DefragTrackerStackDefragTrackerStackInit (DefragTrackerStack *)
 
void DefragTrackerStackDestroy (DefragTrackerStack *)
 Destroy a tracker queue. More...
 
void DefragTrackerEnqueue (DefragTrackerStack *, DefragTracker *)
 add a tracker to a queue More...
 
DefragTrackerDefragTrackerDequeue (DefragTrackerStack *)
 remove a tracker from the queue More...
 

Detailed Description

Macro Definition Documentation

◆ DQLOCK_DESTROY

#define DQLOCK_DESTROY (   q)    SCMutexDestroy(&(q)->m)

Definition at line 65 of file defrag-stack.h.

◆ DQLOCK_INIT

#define DQLOCK_INIT (   q)    SCMutexInit(&(q)->m, NULL)

Definition at line 64 of file defrag-stack.h.

◆ DQLOCK_LOCK

#define DQLOCK_LOCK (   q)    SCMutexLock(&(q)->m)

Definition at line 66 of file defrag-stack.h.

◆ DQLOCK_MUTEX

#define DQLOCK_MUTEX

Spinlocks or Mutex for the defrag tracker queues.

Definition at line 33 of file defrag-stack.h.

◆ DQLOCK_TRYLOCK

#define DQLOCK_TRYLOCK (   q)    SCMutexTrylock(&(q)->m)

Definition at line 67 of file defrag-stack.h.

◆ DQLOCK_UNLOCK

#define DQLOCK_UNLOCK (   q)    SCMutexUnlock(&(q)->m)

Definition at line 68 of file defrag-stack.h.

Typedef Documentation

◆ DefragTrackerStack

Function Documentation

◆ DefragTrackerDequeue()

DefragTracker* DefragTrackerDequeue ( DefragTrackerStack q)

remove a tracker from the queue

Parameters
qqueue
Return values
dttracker or NULL if empty list.

Definition at line 81 of file defrag-stack.c.

References BUG_ON, DQLOCK_LOCK, DQLOCK_UNLOCK, DefragTrackerStack_::len, DefragTracker_::lnext, and DefragTrackerStack_::s.

Referenced by DefragHashShutdown().

Here is the caller graph for this function:

◆ DefragTrackerEnqueue()

void DefragTrackerEnqueue ( DefragTrackerStack q,
DefragTracker dt 
)

add a tracker to a queue

Parameters
qqueue
dttracker

Definition at line 57 of file defrag-stack.c.

References BUG_ON, DQLOCK_LOCK, DQLOCK_UNLOCK, DefragTrackerStack_::len, DefragTracker_::lnext, and DefragTrackerStack_::s.

Referenced by DefragTrackerMoveToSpare().

Here is the caller graph for this function:

◆ DefragTrackerStackDestroy()

void DefragTrackerStackDestroy ( DefragTrackerStack q)

Destroy a tracker queue.

Parameters
qthe tracker queue to destroy

Definition at line 46 of file defrag-stack.c.

References DQLOCK_DESTROY.

◆ DefragTrackerStackInit()

DefragTrackerStack* DefragTrackerStackInit ( DefragTrackerStack )

Definition at line 32 of file defrag-stack.c.

References DQLOCK_INIT.

Referenced by DefragInitConfig().

Here is the caller graph for this function: