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

Go to the source code of this file.

Functions

HostQueueHostQueueInit (HostQueue *q)
 
HostQueueHostQueueNew (void)
 
void HostQueueDestroy (HostQueue *q)
 Destroy a host queue. More...
 
void HostEnqueue (HostQueue *q, Host *h)
 add a host to a queue More...
 
HostHostDequeue (HostQueue *q)
 remove a host from the queue More...
 

Detailed Description

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

Host queue handler functions

Definition in file host-queue.c.

Function Documentation

◆ HostDequeue()

Host* HostDequeue ( HostQueue q)

remove a host from the queue

Parameters
qqueue
Return values
hhost or NULL if empty list.

Definition at line 102 of file host-queue.c.

References HostQueue_::bot, BUG_ON, HQLOCK_LOCK, HQLOCK_UNLOCK, HostQueue_::len, Host_::lnext, Host_::lprev, and HostQueue_::top.

Referenced by HostShutdown().

Here is the caller graph for this function:

◆ HostEnqueue()

void HostEnqueue ( HostQueue q,
Host h 
)

add a host to a queue

Parameters
qqueue
hhost

Definition at line 69 of file host-queue.c.

References HostQueue_::bot, BUG_ON, HQLOCK_LOCK, HQLOCK_UNLOCK, HostQueue_::len, Host_::lnext, Host_::lprev, and HostQueue_::top.

Referenced by HostMoveToSpare().

Here is the caller graph for this function:

◆ HostQueueDestroy()

void HostQueueDestroy ( HostQueue q)

Destroy a host queue.

Parameters
qthe host queue to destroy

Definition at line 58 of file host-queue.c.

References HQLOCK_DESTROY.

◆ HostQueueInit()

HostQueue* HostQueueInit ( HostQueue q)

Definition at line 33 of file host-queue.c.

References HQLOCK_INIT.

Referenced by HostQueueNew().

Here is the caller graph for this function:

◆ HostQueueNew()

HostQueue* HostQueueNew ( void  )

Definition at line 42 of file host-queue.c.

References HostQueueInit(), SCLogError, and SCMalloc.

Here is the call graph for this function: