suricata
ippair-bit.c File Reference
#include "suricata-common.h"
#include "threads.h"
#include "ippair-bit.h"
#include "ippair.h"
#include "detect.h"
#include "util-var.h"
#include "util-debug.h"
#include "util-unittest.h"
#include "ippair-storage.h"
Include dependency graph for ippair-bit.c:

Go to the source code of this file.

Functions

void IPPairBitInitCtx (void)
 
int IPPairHasBits (IPPair *ippair)
 
int IPPairBitsTimedoutCheck (IPPair *h, SCTime_t ts)
 
void IPPairBitSet (IPPair *h, uint32_t idx, uint32_t expire)
 
void IPPairBitUnset (IPPair *h, uint32_t idx)
 
void IPPairBitToggle (IPPair *h, uint32_t idx, uint32_t expire)
 
int IPPairBitIsset (IPPair *h, uint32_t idx, uint32_t ts)
 
int IPPairBitIsnotset (IPPair *h, uint32_t idx, uint32_t ts)
 
void IPPairBitRegisterTests (void)
 

Detailed Description

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

Implements per ippair bits. Actually, not a bit, but called that way because of Snort's flowbits. It's a binary storage.

Todo:

move away from a linked list implementation

use different datatypes, such as string, int, etc.

Definition in file ippair-bit.c.

Function Documentation

◆ IPPairBitInitCtx()

void IPPairBitInitCtx ( void  )

Definition at line 49 of file ippair-bit.c.

◆ IPPairBitIsnotset()

int IPPairBitIsnotset ( IPPair h,
uint32_t  idx,
uint32_t  ts 
)

Definition at line 171 of file ippair-bit.c.

◆ IPPairBitIsset()

int IPPairBitIsset ( IPPair h,
uint32_t  idx,
uint32_t  ts 
)

Definition at line 157 of file ippair-bit.c.

◆ IPPairBitRegisterTests()

void IPPairBitRegisterTests ( void  )

Definition at line 492 of file ippair-bit.c.

References UtRegisterTest().

Here is the call graph for this function:

◆ IPPairBitSet()

void IPPairBitSet ( IPPair h,
uint32_t  idx,
uint32_t  expire 
)

Definition at line 131 of file ippair-bit.c.

◆ IPPairBitsTimedoutCheck()

int IPPairBitsTimedoutCheck ( IPPair h,
SCTime_t  ts 
)
Return values
1ippair timed out wrt xbits
0ippair still has active (non-expired) xbits

Definition at line 67 of file ippair-bit.c.

References IPPairGetStorageById().

Here is the call graph for this function:

◆ IPPairBitToggle()

void IPPairBitToggle ( IPPair h,
uint32_t  idx,
uint32_t  expire 
)

Definition at line 147 of file ippair-bit.c.

◆ IPPairBitUnset()

void IPPairBitUnset ( IPPair h,
uint32_t  idx 
)

Definition at line 139 of file ippair-bit.c.

◆ IPPairHasBits()

int IPPairHasBits ( IPPair ippair)

Definition at line 58 of file ippair-bit.c.

References IPPairGetStorageById().

Here is the call graph for this function: