suricata
detect-engine-uint.h
Go to the documentation of this file.
1 /* Copyright (C) 2020 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 Philippe Antoine <p.antoine@catenacyber.fr>
22  */
23 
24 #ifndef __DETECT_ENGINE_UINT_H
25 #define __DETECT_ENGINE_UINT_H
26 
27 #include "rust.h"
29 
30 // These definitions are kept to minimize the diff
31 // We can run a big sed commit next
32 #define DETECT_UINT_GT DetectUintModeGt
33 #define DETECT_UINT_GTE DetectUintModeGte
34 #define DETECT_UINT_RA DetectUintModeRange
35 #define DETECT_UINT_EQ DetectUintModeEqual
36 #define DETECT_UINT_NE DetectUintModeNe
37 #define DETECT_UINT_LT DetectUintModeLt
38 #define DETECT_UINT_LTE DetectUintModeLte
39 
40 typedef DetectUintData_u64 DetectU64Data;
41 typedef DetectUintData_u32 DetectU32Data;
42 typedef DetectUintData_u16 DetectU16Data;
43 typedef DetectUintData_u8 DetectU8Data;
44 
45 int DetectU64Match(const uint64_t parg, const DetectUintData_u64 *du64);
46 DetectUintData_u64 *DetectU64Parse(const char *u64str);
47 
48 int DetectU32Match(const uint32_t parg, const DetectUintData_u32 *du32);
49 DetectUintData_u32 *DetectU32Parse(const char *u32str);
52 
53 int DetectU8Match(const uint8_t parg, const DetectUintData_u8 *du8);
54 DetectUintData_u8 *DetectU8Parse(const char *u8str);
57 
58 int DetectU16Match(const uint16_t parg, const DetectUintData_u16 *du16);
59 DetectUintData_u16 *DetectU16Parse(const char *u16str);
62 
63 #endif /* __DETECT_UTIL_UINT_H */
PrefilterPacketU32Set
void PrefilterPacketU32Set(PrefilterPacketHeaderValue *v, void *smctx)
Definition: detect-engine-uint.c:51
PrefilterPacketU16Set
void PrefilterPacketU16Set(PrefilterPacketHeaderValue *v, void *smctx)
Definition: detect-engine-uint.c:126
DetectU8Parse
DetectUintData_u8 * DetectU8Parse(const char *u8str)
This function is used to parse u8 options passed via some u8 keyword.
Definition: detect-engine-uint.c:85
rust.h
PrefilterPacketU8Compare
bool PrefilterPacketU8Compare(PrefilterPacketHeaderValue v, void *smctx)
Definition: detect-engine-uint.c:98
DetectU32Match
int DetectU32Match(const uint32_t parg, const DetectUintData_u32 *du32)
Definition: detect-engine-uint.c:31
DetectU8Data
DetectUintData_u8 DetectU8Data
Definition: detect-engine-uint.h:43
DetectU8Match
int DetectU8Match(const uint8_t parg, const DetectUintData_u8 *du8)
Definition: detect-engine-uint.c:71
DetectU16Parse
DetectUintData_u16 * DetectU16Parse(const char *u16str)
This function is used to parse u16 options passed via some u16 keyword.
Definition: detect-engine-uint.c:121
DetectU16Match
int DetectU16Match(const uint16_t parg, const DetectUintData_u16 *du16)
Definition: detect-engine-uint.c:107
PrefilterPacketU32Compare
bool PrefilterPacketU32Compare(PrefilterPacketHeaderValue v, void *smctx)
Definition: detect-engine-uint.c:60
DetectU64Parse
DetectUintData_u64 * DetectU64Parse(const char *u64str)
Definition: detect-engine-uint.c:147
DetectU32Data
DetectUintData_u32 DetectU32Data
Definition: detect-engine-uint.h:41
PrefilterPacketU8Set
void PrefilterPacketU8Set(PrefilterPacketHeaderValue *v, void *smctx)
Definition: detect-engine-uint.c:90
DetectU64Data
DetectUintData_u64 DetectU64Data
Definition: detect-engine-uint.h:40
DetectU64Match
int DetectU64Match(const uint64_t parg, const DetectUintData_u64 *du64)
Definition: detect-engine-uint.c:142
PrefilterPacketU16Compare
bool PrefilterPacketU16Compare(PrefilterPacketHeaderValue v, void *smctx)
Definition: detect-engine-uint.c:134
PrefilterPacketHeaderValue
Definition: detect-engine-prefilter-common.h:23
detect-engine-prefilter-common.h
DetectU32Parse
DetectUintData_u32 * DetectU32Parse(const char *u32str)
This function is used to parse u32 options passed via some u32 keyword.
Definition: detect-engine-uint.c:45
DetectU16Data
DetectUintData_u16 DetectU16Data
Definition: detect-engine-uint.h:42