|
suricata
|
#include "util-port-interval-tree.h"#include "util-validate.h"#include "detect-engine-siggroup.h"#include "detect-engine-port.h"
Go to the source code of this file.
Macros | |
| #define | STACK_SIZE 100 |
Functions | |
| IRB_GENERATE (PI, SCPortIntervalNode, irb, SCPortIntervalCompareAndUpdate) | |
| SCPortIntervalTree * | SCPortIntervalTreeInit (void) |
| Function to initialize the interval tree. More... | |
| void | SCPortIntervalTreeFree (DetectEngineCtx *de_ctx, SCPortIntervalTree *it) |
| Function to free an entire interval tree. More... | |
| int | SCPortIntervalInsert (DetectEngineCtx *de_ctx, SCPortIntervalTree *it, const DetectPort *p) |
| Function to insert a node in the interval tree. More... | |
| 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. More... | |
Definition in file util-port-interval-tree.c.
| #define STACK_SIZE 100 |
Definition at line 200 of file util-port-interval-tree.c.
| IRB_GENERATE | ( | PI | , |
| SCPortIntervalNode | , | ||
| irb | , | ||
| SCPortIntervalCompareAndUpdate | |||
| ) |
| 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.