suricata
util-port-interval-tree.h
Go to the documentation of this file.
1/* Copyright (C) 2024 Open Information Security Foundation
2 *
3 * You can copy, redistribute or modify this Program under the terms of
4 * the GNU General Public License version 2 as published by the Free
5 * Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * version 2 along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17
18/**
19 * \file
20 *
21 * \author Shivani Bhardwaj <shivani@oisf.net>
22 */
23
24#ifndef SURICATA_UTIL_PORT_INTERVAL_TREE_H
25#define SURICATA_UTIL_PORT_INTERVAL_TREE_H
26
27#include "detect-engine-port.h"
28
33
38 DetectEngineCtx *, const uint16_t, const uint16_t, const struct PI *, DetectPort **);
39
40#endif /* SURICATA_UTIL_PORT_INTERVAL_TREE_H */
main detection engine ctx
Definition detect.h:932
Port structure for detection engine.
Definition detect.h:220
SCPortIntervalNode * head
struct SCPortIntervalTree_ SCPortIntervalTree
void SCPortIntervalTreeFree(DetectEngineCtx *, SCPortIntervalTree *)
Function to free an entire interval tree.
int SCPortIntervalInsert(DetectEngineCtx *, SCPortIntervalTree *, const DetectPort *)
Function to insert a node in the interval tree.
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 o...
SCPortIntervalTree * SCPortIntervalTreeInit(void)
Function to initialize the interval tree.