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 SURICATA_DETECT_ENGINE_UINT_H
25#define SURICATA_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
40typedef DetectUintData_u64 DetectU64Data;
41typedef DetectUintData_u32 DetectU32Data;
42typedef DetectUintData_u16 DetectU16Data;
43typedef DetectUintData_u8 DetectU8Data;
44
45int DetectU64Match(const uint64_t parg, const DetectUintData_u64 *du64);
46DetectUintData_u64 *DetectU64Parse(const char *u64str);
47
48int DetectU32Match(const uint32_t parg, const DetectUintData_u32 *du32);
49DetectUintData_u32 *DetectU32Parse(const char *u32str);
52
53int DetectU8Match(const uint8_t parg, const DetectUintData_u8 *du8);
54DetectUintData_u8 *DetectU8Parse(const char *u8str);
57
58int DetectU16Match(const uint16_t parg, const DetectUintData_u16 *du16);
59DetectUintData_u16 *DetectU16Parse(const char *u16str);
62
63#endif /* SURICATA_DETECT_ENGINE_UINT_H */
DetectUintData_u8 * DetectU8Parse(const char *u8str)
This function is used to parse u8 options passed via some u8 keyword.
int DetectU16Match(const uint16_t parg, const DetectUintData_u16 *du16)
void PrefilterPacketU16Set(PrefilterPacketHeaderValue *v, void *smctx)
DetectUintData_u64 * DetectU64Parse(const char *u64str)
DetectUintData_u32 * DetectU32Parse(const char *u32str)
This function is used to parse u32 options passed via some u32 keyword.
bool PrefilterPacketU16Compare(PrefilterPacketHeaderValue v, void *smctx)
int DetectU32Match(const uint32_t parg, const DetectUintData_u32 *du32)
DetectUintData_u64 DetectU64Data
void PrefilterPacketU8Set(PrefilterPacketHeaderValue *v, void *smctx)
int DetectU8Match(const uint8_t parg, const DetectUintData_u8 *du8)
int DetectU64Match(const uint64_t parg, const DetectUintData_u64 *du64)
bool PrefilterPacketU8Compare(PrefilterPacketHeaderValue v, void *smctx)
DetectUintData_u16 DetectU16Data
DetectUintData_u32 DetectU32Data
void PrefilterPacketU32Set(PrefilterPacketHeaderValue *v, void *smctx)
bool PrefilterPacketU32Compare(PrefilterPacketHeaderValue v, void *smctx)
DetectUintData_u16 * DetectU16Parse(const char *u16str)
This function is used to parse u16 options passed via some u16 keyword.
DetectUintData_u8 DetectU8Data