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
30int DetectAddressParse(const DetectEngineCtx *, DetectAddressHead *, const char *);
32
34
36
38
39int DetectAddressMatchIPv4(const DetectMatchAddressIPv4 *, uint16_t, const Address *);
40int DetectAddressMatchIPv6(const DetectMatchAddressIPv6 *, uint16_t, const Address *);
41
43
44void DetectAddressTests(void);
45
49 const char *string, bool *contains_negation);
50
51#endif /* SURICATA_DETECT_ADDRESS_H */
void DetectAddressTests(void)
void DetectAddressFree(DetectAddress *)
Frees a DetectAddress instance.
DetectAddress * DetectAddressLookupInHead(const DetectAddressHead *, Address *)
Find the group matching address in a group head.
DetectAddress * DetectAddressInit(void)
Creates and returns a new instance of a DetectAddress.
int DetectAddressMatchIPv6(const DetectMatchAddressIPv6 *, uint16_t, const Address *)
Match a packets address against a signatures addrs array.
int DetectAddressCmp(DetectAddress *, DetectAddress *)
Used to compare 2 address ranges.
int DetectAddressTestConfVars(void)
DetectAddress * DetectAddressCopy(DetectAddress *)
copy a DetectAddress
int DetectAddressMatchIPv4(const DetectMatchAddressIPv4 *, uint16_t, const Address *)
Match a packets address against a signatures addrs array.
int DetectAddressMapInit(DetectEngineCtx *de_ctx)
void DetectAddressMapFree(DetectEngineCtx *de_ctx)
const DetectAddressHead * DetectParseAddress(DetectEngineCtx *de_ctx, const char *string, bool *contains_negation)
bool DetectAddressListsAreEqual(DetectAddress *list1, DetectAddress *list2)
Checks if two address group lists are equal.
void DetectAddressHeadCleanup(DetectAddressHead *)
Cleans a DetectAddressHead. The functions frees the address group heads(ipv4 and ipv6) inside the Det...
int DetectAddressParse(const DetectEngineCtx *, DetectAddressHead *, const char *)
Parses an address group sent as a character string and updates the DetectAddressHead sent as the argu...
DetectEngineCtx * de_ctx
address structure for use in the detection engine.
Definition detect.h:168
main detection engine ctx
Definition detect.h:932