suricata
detect-engine-address.h
Go to the documentation of this file.
1 /* Copyright (C) 2007-2021 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 SURICATA_DETECT_ADDRESS_H
25 #define SURICATA_DETECT_ADDRESS_H
26 
30 int DetectAddressParse(const DetectEngineCtx *, DetectAddressHead *, const char *);
32 
34 
36 
38 
39 int DetectAddressMatchIPv4(const DetectMatchAddressIPv4 *, uint16_t, const Address *);
40 int DetectAddressMatchIPv6(const DetectMatchAddressIPv6 *, uint16_t, const Address *);
41 
43 
44 void DetectAddressTests(void);
45 
49  const char *string, bool *contains_negation);
50 
51 #endif /* SURICATA_DETECT_ADDRESS_H */
DetectAddressCmp
int DetectAddressCmp(DetectAddress *, DetectAddress *)
Used to compare 2 address ranges.
Definition: detect-engine-address.c:1562
DetectAddressMatchIPv6
int DetectAddressMatchIPv6(const DetectMatchAddressIPv6 *, uint16_t, const Address *)
Match a packets address against a signatures addrs array.
Definition: detect-engine-address.c:1622
DetectAddressMatchIPv4
int DetectAddressMatchIPv4(const DetectMatchAddressIPv4 *, uint16_t, const Address *)
Match a packets address against a signatures addrs array.
Definition: detect-engine-address.c:1589
DetectAddressTests
void DetectAddressTests(void)
DetectParseAddress
const DetectAddressHead * DetectParseAddress(DetectEngineCtx *de_ctx, const char *string, bool *contains_negation)
Definition: detect-engine-address.c:1434
DetectAddress_
address structure for use in the detection engine.
Definition: detect.h:165
DetectAddressHead_
Definition: detect.h:180
DetectEngineCtx_
main detection engine ctx
Definition: detect.h:843
DetectAddressCopy
DetectAddress * DetectAddressCopy(DetectAddress *)
copy a DetectAddress
Definition: detect-engine-address.c:127
DetectAddressFree
void DetectAddressFree(DetectAddress *)
Frees a DetectAddress instance.
Definition: detect-engine-address.c:82
DetectAddressTestConfVars
int DetectAddressTestConfVars(void)
Definition: detect-engine-address.c:1217
Address_
Definition: decode.h:108
de_ctx
DetectEngineCtx * de_ctx
Definition: fuzz_siginit.c:17
DetectAddressMapFree
void DetectAddressMapFree(DetectEngineCtx *de_ctx)
Definition: detect-engine-address.c:1337
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:1476
DetectAddressMapInit
int DetectAddressMapInit(DetectEngineCtx *de_ctx)
Definition: detect-engine-address.c:1326
DetectAddressLookupInHead
DetectAddress * DetectAddressLookupInHead(const DetectAddressHead *, Address *)
Find the group matching address in a group head.
Definition: detect-engine-address.c:1798
DetectAddressListsAreEqual
bool DetectAddressListsAreEqual(DetectAddress *list1, DetectAddress *list2)
Checks if two address group lists are equal.
Definition: detect-engine-address.c:349
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:1394
DetectAddressInit
DetectAddress * DetectAddressInit(void)
Creates and returns a new instance of a DetectAddress.
Definition: detect-engine-address.c:69
DetectMatchAddressIPv6_
Definition: detect.h:191
DetectMatchAddressIPv4_
Definition: detect.h:186