suricata
|
#include "detect-engine-port.h"
Go to the source code of this file.
Data Structures | |
struct | SCPortIntervalTree_ |
Typedefs | |
typedef struct SCPortIntervalTree_ | SCPortIntervalTree |
Functions | |
SCPortIntervalTree * | SCPortIntervalTreeInit (void) |
Function to initialize the interval tree. More... | |
void | SCPortIntervalTreeFree (DetectEngineCtx *, SCPortIntervalTree *) |
Function to free an entire interval tree. More... | |
int | SCPortIntervalInsert (DetectEngineCtx *, SCPortIntervalTree *, const DetectPort *) |
Function to insert a node in the interval tree. More... | |
void | SCPortIntervalFindOverlappingRanges (DetectEngineCtx *, const uint16_t, const uint16_t, const struct PI *, DetectPort **) |
Callee function to find all overlapping port ranges as asked by the detection engine during Stage 2 of signature grouping. More... | |
Definition in file util-port-interval-tree.h.
typedef struct SCPortIntervalTree_ SCPortIntervalTree |
void SCPortIntervalFindOverlappingRanges | ( | DetectEngineCtx * | de_ctx, |
const uint16_t | port, | ||
const uint16_t | port2, | ||
const struct PI * | head, | ||
DetectPort ** | list | ||
) |
Callee function to find all overlapping port ranges as asked by the detection engine during Stage 2 of signature grouping.
de_ctx | Detection Engine Context |
port | Given low port |
port2 | Given high port |
head | Pointer to the head of the tree named PI |
list | Pointer to the list of port objects that needs to be filled/updated |
Definition at line 315 of file util-port-interval-tree.c.
int SCPortIntervalInsert | ( | DetectEngineCtx * | de_ctx, |
SCPortIntervalTree * | it, | ||
const DetectPort * | p | ||
) |
Function to insert a node in the interval tree.
de_ctx | Detection Engine Context |
it | Pointer to the interval tree |
p | Pointer to a DetectPort object |
Definition at line 109 of file util-port-interval-tree.c.
References de_ctx, DEBUG_VALIDATE_BUG_ON, SCPortIntervalNode::port, DetectPort_::port, SCPortIntervalNode::port2, DetectPort_::port2, SC_EINVAL, SC_OK, SCCalloc, SCFree, SCLogDebug, SCPortIntervalNode::sh, DetectPort_::sh, SigGroupHeadCopySigs(), and SCPortIntervalTree_::tree.
void SCPortIntervalTreeFree | ( | DetectEngineCtx * | de_ctx, |
SCPortIntervalTree * | it | ||
) |
Function to free an entire interval tree.
de_ctx | Detection Engine Context |
it | Pointer to the interval tree |
Definition at line 92 of file util-port-interval-tree.c.
SCPortIntervalTree* SCPortIntervalTreeInit | ( | void | ) |
Function to initialize the interval tree.
Definition at line 58 of file util-port-interval-tree.c.
References SCCalloc.