• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OISF / suricata / 22618661228

02 Mar 2026 09:33PM UTC coverage: 42.258% (-34.4%) from 76.611%
22618661228

push

github

victorjulien
github-actions: bump actions/download-artifact from 7.0.0 to 8.0.0

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/37930b1c2...70fc10c6e)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

91511 of 216553 relevant lines covered (42.26%)

3416852.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

29.03
/src/detect-engine-uint.c
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

25
#include "suricata-common.h"
26

27
#include "util-byte.h"
28
#include "detect-parse.h"
29
#include "detect-engine-uint.h"
30

31
int DetectU32Match(const uint32_t parg, const DetectUintData_u32 *du32)
32
{
×
33
    return SCDetectU32Match(parg, du32);
×
34
}
×
35

36
/**
37
 * \brief This function is used to parse u32 options passed via some u32 keyword
38
 *
39
 * \param u32str Pointer to the user provided u32 options
40
 *
41
 * \retval DetectU32Data pointer to DetectU32Data on success
42
 * \retval NULL on failure
43
 */
44

45
DetectUintData_u32 *DetectU32Parse(const char *u32str)
46
{
×
47
    return SCDetectU32Parse(u32str);
×
48
}
×
49

50
void
51
PrefilterPacketU32Set(PrefilterPacketHeaderValue *v, void *smctx)
52
{
×
53
    const DetectUintData_u32 *a = smctx;
×
54
    v->u8[0] = a->mode;
×
55
    v->u32[1] = a->arg1;
×
56
    v->u32[2] = a->arg2;
×
57
}
×
58

59
bool
60
PrefilterPacketU32Compare(PrefilterPacketHeaderValue v, void *smctx)
61
{
×
62
    const DetectUintData_u32 *a = smctx;
×
63
    if (v.u8[0] == a->mode &&
×
64
        v.u32[1] == a->arg1 &&
×
65
        v.u32[2] == a->arg2)
×
66
        return true;
×
67
    return false;
×
68
}
×
69

70
//same as u32 but with u8
71
int DetectU8Match(const uint8_t parg, const DetectUintData_u8 *du8)
72
{
619✔
73
    return SCDetectU8Match(parg, du8);
619✔
74
}
619✔
75

76
/**
77
 * \brief This function is used to parse u8 options passed via some u8 keyword
78
 *
79
 * \param u8str Pointer to the user provided u8 options
80
 *
81
 * \retval DetectU8Data pointer to DetectU8Data on success
82
 * \retval NULL on failure
83
 */
84

85
DetectUintData_u8 *DetectU8Parse(const char *u8str)
86
{
70✔
87
    return SCDetectU8Parse(u8str);
70✔
88
}
70✔
89

90
void PrefilterPacketU8Set(PrefilterPacketHeaderValue *v, void *smctx)
91
{
×
92
    const DetectUintData_u8 *a = smctx;
×
93
    v->u8[0] = a->mode;
×
94
    v->u8[1] = a->arg1;
×
95
    v->u8[2] = a->arg2;
×
96
}
×
97

98
bool PrefilterPacketU8Compare(PrefilterPacketHeaderValue v, void *smctx)
99
{
×
100
    const DetectUintData_u8 *a = smctx;
×
101
    if (v.u8[0] == a->mode && v.u8[1] == a->arg1 && v.u8[2] == a->arg2)
×
102
        return true;
×
103
    return false;
×
104
}
×
105

106
// same as u32 but with u16
107
int DetectU16Match(const uint16_t parg, const DetectUintData_u16 *du16)
108
{
877✔
109
    return SCDetectU16Match(parg, du16);
877✔
110
}
877✔
111

112
/**
113
 * \brief This function is used to parse u16 options passed via some u16 keyword
114
 *
115
 * \param u16str Pointer to the user provided u16 options
116
 *
117
 * \retval DetectU16Data pointer to DetectU16Data on success
118
 * \retval NULL on failure
119
 */
120

121
DetectUintData_u16 *DetectU16Parse(const char *u16str)
122
{
771✔
123
    return SCDetectU16Parse(u16str);
771✔
124
}
771✔
125

126
void PrefilterPacketU16Set(PrefilterPacketHeaderValue *v, void *smctx)
127
{
×
128
    const DetectUintData_u16 *a = smctx;
×
129
    v->u8[0] = a->mode;
×
130
    v->u16[1] = a->arg1;
×
131
    v->u16[2] = a->arg2;
×
132
}
×
133

134
bool PrefilterPacketU16Compare(PrefilterPacketHeaderValue v, void *smctx)
135
{
×
136
    const DetectUintData_u16 *a = smctx;
×
137
    if (v.u8[0] == a->mode && v.u16[1] == a->arg1 && v.u16[2] == a->arg2)
×
138
        return true;
×
139
    return false;
×
140
}
×
141

142
int DetectU64Match(const uint64_t parg, const DetectUintData_u64 *du64)
143
{
3,666✔
144
    return SCDetectU64Match(parg, du64);
3,666✔
145
}
3,666✔
146

147
DetectUintData_u64 *DetectU64Parse(const char *u64str)
148
{
6,013✔
149
    return SCDetectU64Parse(u64str);
6,013✔
150
}
6,013✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc