suricata
detect-engine-address.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_ADDRESS_H__
25 #define __DETECT_ADDRESS_H__
26 
27 
28 
31 int DetectAddressParse(const DetectEngineCtx *, DetectAddressHead *, const char *);
33 
35 
37 
39 
40 int DetectAddressMatchIPv4(const DetectMatchAddressIPv4 *, uint16_t, const Address *);
41 int DetectAddressMatchIPv6(const DetectMatchAddressIPv6 *, uint16_t, const Address *);
42 
44 
45 void DetectAddressTests(void);
46 
50  const char *string, bool *contains_negation);
51 
52 #ifdef DEBUG
53 void DetectAddressPrintList(DetectAddress *);
54 #endif
55 
56 #endif /* __DETECT_ADDRESS_H__ */
DetectAddressCmp
int DetectAddressCmp(DetectAddress *, DetectAddress *)
Used to compare 2 address ranges.
Definition: detect-engine-address.c:1568
DetectAddressMatchIPv6
int DetectAddressMatchIPv6(const DetectMatchAddressIPv6 *, uint16_t, const Address *)
Match a packets address against a signatures addrs array.
Definition: detect-engine-address.c:1629
DetectAddressMatchIPv4
int DetectAddressMatchIPv4(const DetectMatchAddressIPv4 *, uint16_t, const Address *)
Match a packets address against a signatures addrs array.
Definition: detect-engine-address.c:1595
DetectAddressTests
void DetectAddressTests(void)
Definition: detect-engine-address.c:4804
DetectParseAddress
const DetectAddressHead * DetectParseAddress(DetectEngineCtx *de_ctx, const char *string, bool *contains_negation)
Definition: detect-engine-address.c:1441
DetectAddress_
address structure for use in the detection engine.
Definition: detect.h:139
DetectAddressHead_
Definition: detect.h:154
DetectEngineCtx_
main detection engine ctx
Definition: detect.h:761
DetectAddressFree
void DetectAddressFree(DetectAddress *)
Frees a DetectAddress instance.
Definition: detect-engine-address.c:80
DetectAddressTestConfVars
int DetectAddressTestConfVars(void)
Definition: detect-engine-address.c:1224
Address_
Definition: decode.h:111
de_ctx
DetectEngineCtx * de_ctx
Definition: fuzz_siginit.c:16
DetectAddressMapFree
void DetectAddressMapFree(DetectEngineCtx *de_ctx)
Definition: detect-engine-address.c:1349
DetectAddressHeadCleanup
void DetectAddressHeadCleanup(DetectAddressHead *)
Cleans a DetectAddressHead. The functions frees the address group heads(ipv4 and ipv6) inside the Det...
Definition: detect-engine-address.c:1480
DetectAddressMapInit
int DetectAddressMapInit(DetectEngineCtx *de_ctx)
Definition: detect-engine-address.c:1338
DetectAddressLookupInHead
DetectAddress * DetectAddressLookupInHead(const DetectAddressHead *, Address *)
Find the group matching address in a group head.
Definition: detect-engine-address.c:1809
DetectAddressListsAreEqual
bool DetectAddressListsAreEqual(DetectAddress *list1, DetectAddress *list2)
Checks if two address group lists are equal.
Definition: detect-engine-address.c:366
DetectAddressParse
int DetectAddressParse(const DetectEngineCtx *, DetectAddressHead *, const char *)
Parses an address group sent as a character string and updates the DetectAddressHead sent as the argu...
Definition: detect-engine-address.c:1401
DetectAddressInit
DetectAddress * DetectAddressInit(void)
Creates and returns a new instance of a DetectAddress.
Definition: detect-engine-address.c:67
DetectMatchAddressIPv6_
Definition: detect.h:165
DetectMatchAddressIPv4_
Definition: detect.h:160