suricata
detect-engine-port.h
Go to the documentation of this file.
1 /* Copyright (C) 2007-2010 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 Victor Julien <victor@inliniac.net>
22  */
23 
24 #ifndef __DETECT_PORT_H__
25 #define __DETECT_PORT_H__
26 
27 /* prototypes */
28 int DetectPortParse(const DetectEngineCtx *, DetectPort **head, const char *str);
29 
33 
34 DetectPort *DetectPortLookupGroup(DetectPort *dp, uint16_t port);
35 
36 bool DetectPortListsAreEqual(DetectPort *list1, DetectPort *list2);
37 
42 
43 int DetectPortTestConfVars(void);
44 
49 
50 #ifdef UNITTESTS
51 void DetectPortTests(void);
52 #endif
53 
54 #endif /* __DETECT_PORT_H__ */
55 
DetectPortTestConfVars
int DetectPortTestConfVars(void)
Definition: detect-engine-port.c:1173
DetectEngineCtx_
main detection engine ctx
Definition: detect.h:827
DetectPortLookupGroup
DetectPort * DetectPortLookupGroup(DetectPort *dp, uint16_t port)
Function that find the group matching address in a group head.
Definition: detect-engine-port.c:677
DetectPortPrintList
void DetectPortPrintList(DetectPort *head)
Helper function used to print the list of ports present in this DetectPort list.
Definition: detect-engine-port.c:100
DetectPortCmp
int DetectPortCmp(DetectPort *, DetectPort *)
Function that compare port groups.
Definition: detect-engine-port.c:558
de_ctx
DetectEngineCtx * de_ctx
Definition: fuzz_siginit.c:17
DetectPortParse
int DetectPortParse(const DetectEngineCtx *, DetectPort **head, const char *str)
Function for parsing port strings.
Definition: detect-engine-port.c:1249
DetectPort_
Port structure for detection engine.
Definition: detect.h:211
DetectPortListsAreEqual
bool DetectPortListsAreEqual(DetectPort *list1, DetectPort *list2)
Checks if two port group lists are equal.
Definition: detect-engine-port.c:702
DetectPortCopySingle
DetectPort * DetectPortCopySingle(DetectEngineCtx *, DetectPort *)
Function that return a copy of DetectPort src sigs.
Definition: detect-engine-port.c:614
DetectPortHashAdd
int DetectPortHashAdd(DetectEngineCtx *de_ctx, DetectPort *dp)
Adds a DetectPort to the detection engine context DetectPort hash table.
Definition: detect-engine-port.c:1458
DetectPortHashLookup
DetectPort * DetectPortHashLookup(DetectEngineCtx *de_ctx, DetectPort *dp)
Used to lookup a DetectPort hash from the detection engine context DetectPort hash table.
Definition: detect-engine-port.c:1474
DetectPortInsert
int DetectPortInsert(DetectEngineCtx *, DetectPort **, DetectPort *)
function for inserting a port group object. This also makes sure SigGroupContainer lists are handled ...
Definition: detect-engine-port.c:153
DetectPortFree
void DetectPortFree(const DetectEngineCtx *de_ctx, DetectPort *)
Free a DetectPort and its members.
Definition: detect-engine-port.c:80
str
#define str(s)
Definition: suricata-common.h:286
head
Flow * head
Definition: flow-hash.h:1
DetectPortHashFree
void DetectPortHashFree(DetectEngineCtx *de_ctx)
Frees the hash table - DetectEngineCtx->sgh_hash_table, allocated by DetectPortInit() function.
Definition: detect-engine-port.c:1489
DetectPortTests
void DetectPortTests(void)
DetectPortPrint
void DetectPortPrint(DetectPort *)
Helper function that print the DetectPort info.
Definition: detect-engine-port.c:654
DetectPortCleanupList
void DetectPortCleanupList(const DetectEngineCtx *de_ctx, DetectPort *head)
Free a DetectPort list and each of its members.
Definition: detect-engine-port.c:124
DetectPortHashInit
int DetectPortHashInit(DetectEngineCtx *de_ctx)
Initializes the hash table in the detection engine context to hold the DetectPort hash.
Definition: detect-engine-port.c:1438