suricata
host-queue.c File Reference
#include "suricata-common.h"
#include "threads.h"
#include "debug.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 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...
 
uint32_t HostQueueLen (HostQueue *q)
 

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

Host* HostDequeue ( HostQueue q)

remove a host from the queue

Parameters
qqueue
Return values
hhost or NULL if empty list.

Definition at line 103 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:

void HostEnqueue ( HostQueue q,
Host h 
)

add a host to a queue

Parameters
qqueue
hhost

Definition at line 70 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 HostInitConfig(), and HostMoveToSpare().

Here is the caller graph for this function:

void HostQueueDestroy ( HostQueue q)

Destroy a host queue.

Parameters
qthe host queue to destroy

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

References HQLOCK_DESTROY.

Referenced by HostShutdown().

Here is the caller graph for this function:

HostQueue* HostQueueInit ( HostQueue q)

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

References HQLOCK_INIT.

Referenced by HostInitConfig(), and HostQueueNew().

Here is the caller graph for this function:

uint32_t HostQueueLen ( HostQueue q)

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

References HQLOCK_LOCK, HQLOCK_UNLOCK, HostQueue_::len, and len.

Referenced by HostSpareQueueGetSize().

Here is the caller graph for this function:

HostQueue* HostQueueNew ( void  )

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

References HostQueueInit(), SC_ERR_FATAL, SCLogError, and SCMalloc.

Here is the call graph for this function: