This commit addresses task 3167 and changes usages of '_Bool` to `bool`.
The latter is included from `suricata-common.h`
typedef struct IPV6ExtHdrs_
{
- _Bool rh_set;
+ bool rh_set;
uint8_t rh_type;
- _Bool fh_set;
- _Bool fh_more_frags_set;
+ bool fh_set;
+ bool fh_more_frags_set;
uint8_t fh_nh;
uint8_t fh_prev_nh;
typedef struct TCPVars_
{
/* commonly used and needed opts */
- _Bool ts_set;
+ bool ts_set;
uint32_t ts_val; /* host-order */
uint32_t ts_ecr; /* host-order */
TCPOpt sack;
return data;
}
-static _Bool HasConflicts(const DetectAppLayerProtocolData *us,
+static bool HasConflicts(const DetectAppLayerProtocolData *us,
const DetectAppLayerProtocolData *them)
{
/* mixing negated and non negated is illegal */
v->u8[2] = (uint8_t)a->negated;
}
-static _Bool
+static bool
PrefilterPacketAppProtoCompare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectAppLayerProtocolData *a = smctx;
PrefilterPacketAppProtoMatch);
}
-static _Bool PrefilterAppProtoIsPrefilterable(const Signature *s)
+static bool PrefilterAppProtoIsPrefilterable(const Signature *s)
{
if (s->flags & SIG_FLAG_PDONLY) {
SCLogDebug("prefilter on PD %u", s->id);
* \retval 1 valid
* \retval 0 invalid
*/
-_Bool DetectContentPMATCHValidateCallback(const Signature *s)
+bool DetectContentPMATCHValidateCallback(const Signature *s)
{
if (!(s->flags & SIG_FLAG_DSIZE)) {
return TRUE;
void DetectContentPrint(DetectContentData *);
void DetectContentFree(void *);
-_Bool DetectContentPMATCHValidateCallback(const Signature *s);
+bool DetectContentPMATCHValidateCallback(const Signature *s);
void DetectContentPropagateLimits(Signature *s);
#endif /* __DETECT_CONTENT_H__ */
static void DetectDsizeFree(void *);
static int PrefilterSetupDsize(DetectEngineCtx *de_ctx, SigGroupHead *sgh);
-static _Bool PrefilterDsizeIsPrefilterable(const Signature *s);
+static bool PrefilterDsizeIsPrefilterable(const Signature *s);
/**
* \brief Registration function for dsize: keyword
v->u16[2] = a->dsize2;
}
-static _Bool
+static bool
PrefilterPacketDsizeCompare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectDsizeData *a = smctx;
PrefilterPacketDsizeMatch);
}
-static _Bool PrefilterDsizeIsPrefilterable(const Signature *s)
+static bool PrefilterDsizeIsPrefilterable(const Signature *s)
{
const SigMatch *sm;
for (sm = s->init_data->smlists[DETECT_SM_LIST_MATCH] ; sm != NULL; sm = sm->next) {
static int
SetupEngineForPacketHeader(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
int sm_type, PrefilterPacketHeaderHashCtx *hctx,
- _Bool (*Compare)(PrefilterPacketHeaderValue v, void *),
+ bool (*Compare)(PrefilterPacketHeaderValue v, void *),
void (*Match)(DetectEngineThreadCtx *det_ctx, Packet *p, const void *pectx))
{
Signature *s = NULL;
SetupEngineForPacketHeaderPrefilterPacketU8HashCtx(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, int sm_type, uint32_t *counts,
void (*Set)(PrefilterPacketHeaderValue *v, void *),
- _Bool (*Compare)(PrefilterPacketHeaderValue v, void *),
+ bool (*Compare)(PrefilterPacketHeaderValue v, void *),
void (*Match)(DetectEngineThreadCtx *det_ctx, Packet *p, const void *pectx))
{
Signature *s = NULL;
*/
static void SetupSingle(DetectEngineCtx *de_ctx, HashListTable *hash_table,
SigGroupHead *sgh, int sm_type,
- _Bool (*Compare)(PrefilterPacketHeaderValue v, void *),
+ bool (*Compare)(PrefilterPacketHeaderValue v, void *),
void (*Match)(DetectEngineThreadCtx *det_ctx,
Packet *p, const void *pectx))
{
static void SetupU8Hash(DetectEngineCtx *de_ctx, HashListTable *hash_table,
SigGroupHead *sgh, int sm_type,
void (*Set)(PrefilterPacketHeaderValue *v, void *),
- _Bool (*Compare)(PrefilterPacketHeaderValue v, void *),
+ bool (*Compare)(PrefilterPacketHeaderValue v, void *),
void (*Match)(DetectEngineThreadCtx *det_ctx,
Packet *p, const void *pectx))
{
static int PrefilterSetupPacketHeaderCommon(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, int sm_type,
void (*Set)(PrefilterPacketHeaderValue *v, void *),
- _Bool (*Compare)(PrefilterPacketHeaderValue v, void *),
+ bool (*Compare)(PrefilterPacketHeaderValue v, void *),
void (*Match)(DetectEngineThreadCtx *det_ctx,
Packet *p, const void *pectx),
- _Bool u8hash)
+ bool u8hash)
{
Signature *s = NULL;
uint32_t sig = 0;
int PrefilterSetupPacketHeaderU8Hash(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, int sm_type,
void (*Set)(PrefilterPacketHeaderValue *v, void *),
- _Bool (*Compare)(PrefilterPacketHeaderValue v, void *),
+ bool (*Compare)(PrefilterPacketHeaderValue v, void *),
void (*Match)(DetectEngineThreadCtx *det_ctx,
Packet *p, const void *pectx))
{
int PrefilterSetupPacketHeader(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, int sm_type,
void (*Set)(PrefilterPacketHeaderValue *v, void *),
- _Bool (*Compare)(PrefilterPacketHeaderValue v, void *),
+ bool (*Compare)(PrefilterPacketHeaderValue v, void *),
void (*Match)(DetectEngineThreadCtx *det_ctx,
Packet *p, const void *pectx))
{
int PrefilterSetupPacketHeader(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, int sm_type,
void (*Set)(PrefilterPacketHeaderValue *v, void *),
- _Bool (*Compare)(PrefilterPacketHeaderValue v, void *),
+ bool (*Compare)(PrefilterPacketHeaderValue v, void *),
void (*Match)(DetectEngineThreadCtx *det_ctx,
Packet *p, const void *pectx));
int PrefilterSetupPacketHeaderU8Hash(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, int sm_type,
void (*Set)(PrefilterPacketHeaderValue *v, void *),
- _Bool (*Compare)(PrefilterPacketHeaderValue v, void *),
+ bool (*Compare)(PrefilterPacketHeaderValue v, void *),
void (*Match)(DetectEngineThreadCtx *det_ctx,
Packet *p, const void *pectx));
-static inline _Bool
+static inline bool
PrefilterPacketHeaderExtraMatch(const PrefilterPacketHeaderCtx *ctx,
const Packet *p)
{
}
void DetectBufferTypeRegisterValidateCallback(const char *name,
- _Bool (*ValidateCallback)(const Signature *, const char **sigerror))
+ bool (*ValidateCallback)(const Signature *, const char **sigerror))
{
BUG_ON(g_buffer_type_reg_closed);
DetectBufferTypeRegister(name);
void DetectBufferTypeRegisterSetupCallback(const char *name,
void (*Callback)(const DetectEngineCtx *, Signature *));
void DetectBufferTypeRegisterValidateCallback(const char *name,
- _Bool (*ValidateCallback)(const Signature *, const char **sigerror));
+ bool (*ValidateCallback)(const Signature *, const char **sigerror));
int DetectBufferTypeGetByIdTransforms(DetectEngineCtx *de_ctx, const int id,
int *transforms, int transform_cnt);
void DetectFlowFree(void *);
static int PrefilterSetupFlow(DetectEngineCtx *de_ctx, SigGroupHead *sgh);
-static _Bool PrefilterFlowIsPrefilterable(const Signature *s);
+static bool PrefilterFlowIsPrefilterable(const Signature *s);
/**
* \brief Registration function for flow: keyword
v->u8[1] = fb->match_cnt;
}
-static _Bool
+static bool
PrefilterPacketFlowCompare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectFlowData *fb = smctx;
PrefilterPacketFlowMatch);
}
-static _Bool PrefilterFlowIsPrefilterable(const Signature *s)
+static bool PrefilterFlowIsPrefilterable(const Signature *s)
{
const SigMatch *sm;
for (sm = s->init_data->smlists[DETECT_SM_LIST_MATCH] ; sm != NULL; sm = sm->next) {
static void DetectFragBitsFree(void *);
static int PrefilterSetupFragBits(DetectEngineCtx *de_ctx, SigGroupHead *sgh);
-static _Bool PrefilterFragBitsIsPrefilterable(const Signature *s);
+static bool PrefilterFragBitsIsPrefilterable(const Signature *s);
/**
* \brief Registration function for fragbits: keyword
v->u8[1] = fb->fragbits;
}
-static _Bool
+static bool
PrefilterPacketFragBitsCompare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectFragBitsData *fb = smctx;
PrefilterPacketFragBitsMatch);
}
-static _Bool PrefilterFragBitsIsPrefilterable(const Signature *s)
+static bool PrefilterFragBitsIsPrefilterable(const Signature *s)
{
const SigMatch *sm;
for (sm = s->init_data->smlists[DETECT_SM_LIST_MATCH] ; sm != NULL; sm = sm->next) {
void DetectFragOffsetFree(void *);
static int PrefilterSetupFragOffset(DetectEngineCtx *de_ctx, SigGroupHead *sgh);
-static _Bool PrefilterFragOffsetIsPrefilterable(const Signature *s);
+static bool PrefilterFragOffsetIsPrefilterable(const Signature *s);
/**
* \brief Registration function for fragoffset
v->u16[1] = fb->frag_off;
}
-static _Bool
+static bool
PrefilterPacketFragOffsetCompare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectFragOffsetData *fb = smctx;
PrefilterPacketFragOffsetMatch);
}
-static _Bool PrefilterFragOffsetIsPrefilterable(const Signature *s)
+static bool PrefilterFragOffsetIsPrefilterable(const Signature *s)
{
const SigMatch *sm;
for (sm = s->init_data->smlists[DETECT_SM_LIST_MATCH] ; sm != NULL; sm = sm->next) {
#ifdef UNITTESTS
static void DetectHttpHHRegisterTests(void);
#endif
-static _Bool DetectHttpHostValidateCallback(const Signature *s, const char **sigerror);
+static bool DetectHttpHostValidateCallback(const Signature *s, const char **sigerror);
static int DetectHttpHostSetup(DetectEngineCtx *, Signature *, const char *);
static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx,
const DetectEngineTransforms *transforms,
ALPROTO_HTTP);
}
-static _Bool DetectHttpHostValidateCallback(const Signature *s, const char **sigerror)
+static bool DetectHttpHostValidateCallback(const Signature *s, const char **sigerror)
{
const SigMatch *sm = s->init_data->smlists[g_http_host_buffer_id];
for ( ; sm != NULL; sm = sm->next) {
void DetectHttpMethodRegisterTests(void);
#endif
void DetectHttpMethodFree(void *);
-static _Bool DetectHttpMethodValidateCallback(const Signature *s, const char **sigerror);
+static bool DetectHttpMethodValidateCallback(const Signature *s, const char **sigerror);
static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx,
const DetectEngineTransforms *transforms, Flow *_f,
const uint8_t _flow_flags, void *txv, const int list_id);
* \retval 1 valid
* \retval 0 invalid
*/
-static _Bool DetectHttpMethodValidateCallback(const Signature *s, const char **sigerror)
+static bool DetectHttpMethodValidateCallback(const Signature *s, const char **sigerror)
{
const SigMatch *sm = s->init_data->smlists[g_http_method_buffer_id];
for ( ; sm != NULL; sm = sm->next) {
#ifdef UNITTESTS
static void DetectHttpRawHeaderRegisterTests(void);
#endif
-static _Bool DetectHttpRawHeaderValidateCallback(const Signature *s, const char **sigerror);
+static bool DetectHttpRawHeaderValidateCallback(const Signature *s, const char **sigerror);
static int g_http_raw_header_buffer_id = 0;
static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx,
const DetectEngineTransforms *transforms, Flow *_f,
return 0;
}
-static _Bool DetectHttpRawHeaderValidateCallback(const Signature *s, const char **sigerror)
+static bool DetectHttpRawHeaderValidateCallback(const Signature *s, const char **sigerror)
{
if ((s->flags & (SIG_FLAG_TOCLIENT|SIG_FLAG_TOSERVER)) == (SIG_FLAG_TOCLIENT|SIG_FLAG_TOSERVER)) {
*sigerror = "http_raw_header signature "
void DetectIcmpIdRegisterTests(void);
void DetectIcmpIdFree(void *);
static int PrefilterSetupIcmpId(DetectEngineCtx *de_ctx, SigGroupHead *sgh);
-static _Bool PrefilterIcmpIdIsPrefilterable(const Signature *s);
+static bool PrefilterIcmpIdIsPrefilterable(const Signature *s);
/**
* \brief Registration function for icode: icmp_id
DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study);
}
-static inline _Bool GetIcmpId(Packet *p, uint16_t *id)
+static inline bool GetIcmpId(Packet *p, uint16_t *id)
{
if (PKT_IS_PSEUDOPKT(p))
return FALSE;
v->u16[0] = a->id;
}
-static _Bool
+static bool
PrefilterPacketIcmpIdCompare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectIcmpIdData *a = smctx;
PrefilterPacketIcmpIdMatch);
}
-static _Bool PrefilterIcmpIdIsPrefilterable(const Signature *s)
+static bool PrefilterIcmpIdIsPrefilterable(const Signature *s)
{
const SigMatch *sm;
for (sm = s->init_data->smlists[DETECT_SM_LIST_MATCH] ; sm != NULL; sm = sm->next) {
void DetectIcmpSeqRegisterTests(void);
void DetectIcmpSeqFree(void *);
static int PrefilterSetupIcmpSeq(DetectEngineCtx *de_ctx, SigGroupHead *sgh);
-static _Bool PrefilterIcmpSeqIsPrefilterable(const Signature *s);
+static bool PrefilterIcmpSeqIsPrefilterable(const Signature *s);
/**
* \brief Registration function for icmp_seq
DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study);
}
-static inline _Bool GetIcmpSeq(Packet *p, uint16_t *seq)
+static inline bool GetIcmpSeq(Packet *p, uint16_t *seq)
{
uint16_t seqn;
v->u16[0] = a->seq;
}
-static _Bool
+static bool
PrefilterPacketIcmpSeqCompare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectIcmpSeqData *a = smctx;
PrefilterPacketIcmpSeqMatch);
}
-static _Bool PrefilterIcmpSeqIsPrefilterable(const Signature *s)
+static bool PrefilterIcmpSeqIsPrefilterable(const Signature *s)
{
const SigMatch *sm;
for (sm = s->init_data->smlists[DETECT_SM_LIST_MATCH] ; sm != NULL; sm = sm->next) {
void DetectICodeFree(void *);
static int PrefilterSetupICode(DetectEngineCtx *de_ctx, SigGroupHead *sgh);
-static _Bool PrefilterICodeIsPrefilterable(const Signature *s);
+static bool PrefilterICodeIsPrefilterable(const Signature *s);
/**
* \brief Registration function for icode: keyword
v->u8[2] = a->code2;
}
-static _Bool
+static bool
PrefilterPacketICodeCompare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectICodeData *a = smctx;
PrefilterPacketICodeMatch);
}
-static _Bool PrefilterICodeIsPrefilterable(const Signature *s)
+static bool PrefilterICodeIsPrefilterable(const Signature *s)
{
const SigMatch *sm;
for (sm = s->init_data->smlists[DETECT_SM_LIST_MATCH] ; sm != NULL; sm = sm->next) {
void DetectIdFree(void *);
static int PrefilterSetupId(DetectEngineCtx *de_ctx, SigGroupHead *sgh);
-static _Bool PrefilterIdIsPrefilterable(const Signature *s);
+static bool PrefilterIdIsPrefilterable(const Signature *s);
/**
* \brief Registration function for keyword: id
v->u16[0] = a->id;
}
-static _Bool
+static bool
PrefilterPacketIdCompare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectIdData *a = smctx;
PrefilterPacketIdMatch);
}
-static _Bool PrefilterIdIsPrefilterable(const Signature *s)
+static bool PrefilterIdIsPrefilterable(const Signature *s)
{
const SigMatch *sm;
for (sm = s->init_data->smlists[DETECT_SM_LIST_MATCH] ; sm != NULL; sm = sm->next) {
void DetectITypeFree(void *);
static int PrefilterSetupIType(DetectEngineCtx *de_ctx, SigGroupHead *sgh);
-static _Bool PrefilterITypeIsPrefilterable(const Signature *s);
+static bool PrefilterITypeIsPrefilterable(const Signature *s);
/**
* \brief Registration function for itype: keyword
v->u8[2] = a->type2;
}
-static _Bool
+static bool
PrefilterPacketITypeCompare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectITypeData *a = smctx;
PrefilterPacketITypeMatch);
}
-static _Bool PrefilterITypeIsPrefilterable(const Signature *s)
+static bool PrefilterITypeIsPrefilterable(const Signature *s)
{
const SigMatch *sm;
for (sm = s->init_data->smlists[DETECT_SM_LIST_MATCH] ; sm != NULL; sm = sm->next) {
}
static int GetFlowVarById(lua_State *luastate, Flow *f,
- FlowVar **ret_fv, _Bool fv_may_be_null, uint32_t *ret_idx)
+ FlowVar **ret_fv, bool fv_may_be_null, uint32_t *ret_idx)
{
DetectLuaData *ld = NULL;
if (ret_idx)
}
static int GetFlowIntById(lua_State *luastate, Flow *f,
- FlowVar **ret_fv, _Bool fv_may_be_null, uint32_t *ret_idx)
+ FlowVar **ret_fv, bool fv_may_be_null, uint32_t *ret_idx)
{
DetectLuaData *ld = NULL;
if (ret_idx)
static void DetectAckRegisterTests(void);
static void DetectAckFree(void *);
static int PrefilterSetupTcpAck(DetectEngineCtx *de_ctx, SigGroupHead *sgh);
-static _Bool PrefilterTcpAckIsPrefilterable(const Signature *s);
+static bool PrefilterTcpAckIsPrefilterable(const Signature *s);
void DetectAckRegister(void)
{
v->u32[0] = a->ack;
}
-static _Bool
+static bool
PrefilterPacketAckCompare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectAckData *a = smctx;
PrefilterPacketAckMatch);
}
-static _Bool PrefilterTcpAckIsPrefilterable(const Signature *s)
+static bool PrefilterTcpAckIsPrefilterable(const Signature *s)
{
const SigMatch *sm;
for (sm = s->init_data->smlists[DETECT_SM_LIST_MATCH] ; sm != NULL; sm = sm->next) {
static int DetectFlagsSetup (DetectEngineCtx *, Signature *, const char *);
static void DetectFlagsFree(void *);
-static _Bool PrefilterTcpFlagsIsPrefilterable(const Signature *s);
+static bool PrefilterTcpFlagsIsPrefilterable(const Signature *s);
static int PrefilterSetupTcpFlags(DetectEngineCtx *de_ctx, SigGroupHead *sgh);
/**
SCLogDebug("v->u8[0] = %02x", v->u8[0]);
}
-static _Bool
+static bool
PrefilterPacketFlagsCompare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectFlagsData *a = smctx;
}
-static _Bool PrefilterTcpFlagsIsPrefilterable(const Signature *s)
+static bool PrefilterTcpFlagsIsPrefilterable(const Signature *s)
{
const SigMatch *sm;
for (sm = s->init_data->smlists[DETECT_SM_LIST_MATCH] ; sm != NULL; sm = sm->next) {
static void DetectSeqRegisterTests(void);
static void DetectSeqFree(void *);
static int PrefilterSetupTcpSeq(DetectEngineCtx *de_ctx, SigGroupHead *sgh);
-static _Bool PrefilterTcpSeqIsPrefilterable(const Signature *s);
+static bool PrefilterTcpSeqIsPrefilterable(const Signature *s);
void DetectSeqRegister(void)
{
v->u32[0] = a->seq;
}
-static _Bool
+static bool
PrefilterPacketSeqCompare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectSeqData *a = smctx;
PrefilterPacketSeqMatch);
}
-static _Bool PrefilterTcpSeqIsPrefilterable(const Signature *s)
+static bool PrefilterTcpSeqIsPrefilterable(const Signature *s)
{
const SigMatch *sm;
for (sm = s->init_data->smlists[DETECT_SM_LIST_MATCH] ; sm != NULL; sm = sm->next) {
void DetectTcpmssRegisterTests (void);
#endif
static int PrefilterSetupTcpmss(DetectEngineCtx *de_ctx, SigGroupHead *sgh);
-static _Bool PrefilterTcpmssIsPrefilterable(const Signature *s);
+static bool PrefilterTcpmssIsPrefilterable(const Signature *s);
/**
* \brief Registration function for tcpmss: keyword
v->u16[2] = a->arg2;
}
-static _Bool
+static bool
PrefilterPacketTcpmssCompare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectTcpmssData *a = smctx;
PrefilterPacketTcpmssMatch);
}
-static _Bool PrefilterTcpmssIsPrefilterable(const Signature *s)
+static bool PrefilterTcpmssIsPrefilterable(const Signature *s)
{
const SigMatch *sm;
for (sm = s->init_data->smlists[DETECT_SM_LIST_MATCH] ; sm != NULL; sm = sm->next) {
void DetectTemplate2RegisterTests (void);
#endif
static int PrefilterSetupTemplate2(DetectEngineCtx *de_ctx, SigGroupHead *sgh);
-static _Bool PrefilterTemplate2IsPrefilterable(const Signature *s);
+static bool PrefilterTemplate2IsPrefilterable(const Signature *s);
/**
* \brief Registration function for template2: keyword
v->u8[2] = a->arg2;
}
-static _Bool
+static bool
PrefilterPacketTemplate2Compare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectTemplate2Data *a = smctx;
PrefilterPacketTemplate2Match);
}
-static _Bool PrefilterTemplate2IsPrefilterable(const Signature *s)
+static bool PrefilterTemplate2IsPrefilterable(const Signature *s)
{
const SigMatch *sm;
for (sm = s->init_data->smlists[DETECT_SM_LIST_MATCH] ; sm != NULL; sm = sm->next) {
void *txv, const int list_id);
static void DetectTlsFingerprintSetupCallback(const DetectEngineCtx *de_ctx,
Signature *s);
-static _Bool DetectTlsFingerprintValidateCallback(const Signature *s,
+static bool DetectTlsFingerprintValidateCallback(const Signature *s,
const char **sigerror);
static int g_tls_cert_fingerprint_buffer_id = 0;
return buffer;
}
-static _Bool DetectTlsFingerprintValidateCallback(const Signature *s,
+static bool DetectTlsFingerprintValidateCallback(const Signature *s,
const char **sigerror)
{
const SigMatch *sm = s->init_data->smlists[g_tls_cert_fingerprint_buffer_id];
return FALSE;
}
- _Bool have_delimiters = FALSE;
+ bool have_delimiters = FALSE;
uint32_t u;
for (u = 0; u < cd->content_len; u++)
{
DetectContentData *cd = (DetectContentData *)sm->ctx;
- _Bool changed = FALSE;
+ bool changed = FALSE;
uint32_t u;
for (u = 0; u < cd->content_len; u++)
{
void *txv, const int list_id);
static void DetectTlsSerialSetupCallback(const DetectEngineCtx *de_ctx,
Signature *s);
-static _Bool DetectTlsSerialValidateCallback(const Signature *s,
+static bool DetectTlsSerialValidateCallback(const Signature *s,
const char **sigerror);
static int g_tls_cert_serial_buffer_id = 0;
return buffer;
}
-static _Bool DetectTlsSerialValidateCallback(const Signature *s,
+static bool DetectTlsSerialValidateCallback(const Signature *s,
const char **sigerror)
{
const SigMatch *sm = s->init_data->smlists[g_tls_cert_serial_buffer_id];
DetectContentData *cd = (DetectContentData *)sm->ctx;
- _Bool changed = FALSE;
+ bool changed = FALSE;
uint32_t u;
for (u = 0; u < cd->content_len; u++)
{
void *txv, const int list_id);
static void DetectTlsJa3HashSetupCallback(const DetectEngineCtx *de_ctx,
Signature *s);
-static _Bool DetectTlsJa3HashValidateCallback(const Signature *s,
+static bool DetectTlsJa3HashValidateCallback(const Signature *s,
const char **sigerror);
static int g_tls_ja3_hash_buffer_id = 0;
return buffer;
}
-static _Bool DetectTlsJa3HashValidateCallback(const Signature *s,
+static bool DetectTlsJa3HashValidateCallback(const Signature *s,
const char **sigerror)
{
const SigMatch *sm = s->init_data->smlists[g_tls_ja3_hash_buffer_id];
DetectContentData *cd = (DetectContentData *)sm->ctx;
- _Bool changed = FALSE;
+ bool changed = FALSE;
uint32_t u;
for (u = 0; u < cd->content_len; u++)
{
void *txv, const int list_id);
static void DetectTlsJa3SHashSetupCallback(const DetectEngineCtx *de_ctx,
Signature *s);
-static _Bool DetectTlsJa3SHashValidateCallback(const Signature *s,
+static bool DetectTlsJa3SHashValidateCallback(const Signature *s,
const char **sigerror);
static int g_tls_ja3s_hash_buffer_id = 0;
return buffer;
}
-static _Bool DetectTlsJa3SHashValidateCallback(const Signature *s,
+static bool DetectTlsJa3SHashValidateCallback(const Signature *s,
const char **sigerror)
{
const SigMatch *sm = s->init_data->smlists[g_tls_ja3s_hash_buffer_id];
DetectContentData *cd = (DetectContentData *)sm->ctx;
- _Bool changed = FALSE;
+ bool changed = FALSE;
uint32_t u;
for (u = 0; u < cd->content_len; u++)
{
void DetectTtlRegisterTests (void);
#endif
static int PrefilterSetupTtl(DetectEngineCtx *de_ctx, SigGroupHead *sgh);
-static _Bool PrefilterTtlIsPrefilterable(const Signature *s);
+static bool PrefilterTtlIsPrefilterable(const Signature *s);
/**
* \brief Registration function for ttl: keyword
v->u8[2] = a->ttl2;
}
-static _Bool
+static bool
PrefilterPacketTtlCompare(PrefilterPacketHeaderValue v, void *smctx)
{
const DetectTtlData *a = smctx;
PrefilterPacketTtlMatch);
}
-static _Bool PrefilterTtlIsPrefilterable(const Signature *s)
+static bool PrefilterTtlIsPrefilterable(const Signature *s)
{
const SigMatch *sm;
for (sm = s->init_data->smlists[DETECT_SM_LIST_MATCH] ; sm != NULL; sm = sm->next) {
const char *description;
int id;
int parent_id;
- _Bool mpm;
- _Bool packet; /**< compat to packet matches */
+ bool mpm;
+ bool packet; /**< compat to packet matches */
bool supports_transforms;
void (*SetupCallback)(const struct DetectEngineCtx_ *, struct Signature_ *);
bool (*ValidateCallback)(const struct Signature_ *, const char **sigerror);
/** keyword setup function pointer */
int (*Setup)(DetectEngineCtx *, Signature *, const char *);
- _Bool (*SupportsPrefilter)(const Signature *s);
+ bool (*SupportsPrefilter)(const Signature *s);
int (*SetupPrefilter)(DetectEngineCtx *de_ctx, struct SigGroupHead_ *sgh);
void (*Free)(void *);
int (*DataSet)(void *, void *),
void (*DataFree)(void *),
uint32_t (*DataHash)(void *),
- _Bool (*DataCompare)(void *, void *))
+ bool (*DataCompare)(void *, void *))
{
THashTableContext *ctx = SCCalloc(1, sizeof(*ctx));
BUG_ON(!ctx);
int (*DataSet)(void *dst, void *src);
void (*DataFree)(void *);
uint32_t (*DataHash)(void *);
- _Bool (*DataCompare)(void *, void *);
+ bool (*DataCompare)(void *, void *);
} THashConfig;
#define THASH_DATA_SIZE(ctx) (sizeof(THashData) + (ctx)->config.data_size)
int (*DataSet)(void *dst, void *src),
void (*DataFree)(void *),
uint32_t (*DataHash)(void *),
- _Bool (*DataCompare)(void *, void *));
+ bool (*DataCompare)(void *, void *));
void THashShutdown(THashTableContext *ctx);