mirror of
https://github.com/OISF/suricata.git
synced 2026-10-12 02:07:10 +00:00
detect/http: remove unused function parameter
Will help to use generic DetectEngineInspectBufferGeneric
This commit is contained in:
committed by
Victor Julien
parent
49783fa9f7
commit
cd0e4288c4
@@ -96,7 +96,7 @@ int HttpHeaderExpandBuffer(HttpHeaderThreadData *td, HttpHeaderBuffer *buf, size
|
||||
return 0;
|
||||
}
|
||||
|
||||
HttpHeaderBuffer *HttpHeaderGetBufferSpace(DetectEngineThreadCtx *det_ctx, Flow *f, uint8_t flags,
|
||||
HttpHeaderBuffer *HttpHeaderGetBufferSpace(DetectEngineThreadCtx *det_ctx, uint8_t flags,
|
||||
const int keyword_id, HttpHeaderThreadData **ret_hdr_td)
|
||||
{
|
||||
*ret_hdr_td = NULL;
|
||||
|
||||
@@ -42,7 +42,7 @@ typedef struct HttpHeaderThreadData_ {
|
||||
void *HttpHeaderThreadDataInit(void *data);
|
||||
void HttpHeaderThreadDataFree(void *data);
|
||||
|
||||
HttpHeaderBuffer *HttpHeaderGetBufferSpace(DetectEngineThreadCtx *det_ctx, Flow *f, uint8_t flags,
|
||||
HttpHeaderBuffer *HttpHeaderGetBufferSpace(DetectEngineThreadCtx *det_ctx, uint8_t flags,
|
||||
const int keyword_id, HttpHeaderThreadData **ret_hdr_td);
|
||||
|
||||
int HttpHeaderExpandBuffer(HttpHeaderThreadData *td, HttpHeaderBuffer *buf, size_t size);
|
||||
|
||||
@@ -76,13 +76,12 @@ static int g_keyword_thread_id = 0;
|
||||
static HttpHeaderThreadDataConfig g_td_config = { BUFFER_SIZE_STEP };
|
||||
|
||||
static uint8_t *GetBufferForTX(
|
||||
htp_tx_t *tx, DetectEngineThreadCtx *det_ctx, Flow *f, uint8_t flags, uint32_t *buffer_len)
|
||||
htp_tx_t *tx, DetectEngineThreadCtx *det_ctx, uint8_t flags, uint32_t *buffer_len)
|
||||
{
|
||||
*buffer_len = 0;
|
||||
|
||||
HttpHeaderThreadData *hdr_td = NULL;
|
||||
HttpHeaderBuffer *buf =
|
||||
HttpHeaderGetBufferSpace(det_ctx, f, flags, g_keyword_thread_id, &hdr_td);
|
||||
HttpHeaderBuffer *buf = HttpHeaderGetBufferSpace(det_ctx, flags, g_keyword_thread_id, &hdr_td);
|
||||
if (unlikely(buf == NULL)) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -150,7 +149,7 @@ static InspectionBuffer *GetBuffer1ForTX(DetectEngineThreadCtx *det_ctx,
|
||||
InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id);
|
||||
if (buffer->inspect == NULL) {
|
||||
uint32_t rawdata_len = 0;
|
||||
uint8_t *rawdata = GetBufferForTX(txv, det_ctx, f, flow_flags, &rawdata_len);
|
||||
uint8_t *rawdata = GetBufferForTX(txv, det_ctx, flow_flags, &rawdata_len);
|
||||
if (rawdata_len == 0)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -69,13 +69,12 @@ static int g_keyword_thread_id = 0;
|
||||
static HttpHeaderThreadDataConfig g_td_config = { BUFFER_SIZE_STEP };
|
||||
|
||||
static uint8_t *GetBufferForTX(
|
||||
htp_tx_t *tx, DetectEngineThreadCtx *det_ctx, Flow *f, uint8_t flags, uint32_t *buffer_len)
|
||||
htp_tx_t *tx, DetectEngineThreadCtx *det_ctx, uint8_t flags, uint32_t *buffer_len)
|
||||
{
|
||||
*buffer_len = 0;
|
||||
|
||||
HttpHeaderThreadData *hdr_td = NULL;
|
||||
HttpHeaderBuffer *buf =
|
||||
HttpHeaderGetBufferSpace(det_ctx, f, flags, g_keyword_thread_id, &hdr_td);
|
||||
HttpHeaderBuffer *buf = HttpHeaderGetBufferSpace(det_ctx, flags, g_keyword_thread_id, &hdr_td);
|
||||
if (unlikely(buf == NULL)) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -186,7 +185,7 @@ static uint8_t DetectEngineInspectBufferHttpHeader(DetectEngineCtx *de_ctx,
|
||||
}
|
||||
|
||||
uint32_t rawdata_len = 0;
|
||||
uint8_t *rawdata = GetBufferForTX(txv, det_ctx, f, flags, &rawdata_len);
|
||||
uint8_t *rawdata = GetBufferForTX(txv, det_ctx, flags, &rawdata_len);
|
||||
if (rawdata_len == 0) {
|
||||
SCLogDebug("no data");
|
||||
if (engine->match_on_null && eof) {
|
||||
@@ -245,7 +244,7 @@ static void PrefilterMpmHttpHeader(DetectEngineThreadCtx *det_ctx, const void *p
|
||||
InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id);
|
||||
if (buffer->inspect == NULL) {
|
||||
uint32_t rawdata_len = 0;
|
||||
uint8_t *rawdata = GetBufferForTX(txv, det_ctx, f, flags, &rawdata_len);
|
||||
uint8_t *rawdata = GetBufferForTX(txv, det_ctx, flags, &rawdata_len);
|
||||
if (rawdata_len == 0)
|
||||
return;
|
||||
|
||||
|
||||
@@ -75,13 +75,12 @@ static int g_keyword_thread_id = 0;
|
||||
static HttpHeaderThreadDataConfig g_td_config = { BUFFER_SIZE_STEP };
|
||||
|
||||
static uint8_t *GetBufferForTX(
|
||||
htp_tx_t *tx, DetectEngineThreadCtx *det_ctx, Flow *f, uint8_t flags, uint32_t *buffer_len)
|
||||
htp_tx_t *tx, DetectEngineThreadCtx *det_ctx, uint8_t flags, uint32_t *buffer_len)
|
||||
{
|
||||
*buffer_len = 0;
|
||||
|
||||
HttpHeaderThreadData *hdr_td = NULL;
|
||||
HttpHeaderBuffer *buf =
|
||||
HttpHeaderGetBufferSpace(det_ctx, f, flags, g_keyword_thread_id, &hdr_td);
|
||||
HttpHeaderBuffer *buf = HttpHeaderGetBufferSpace(det_ctx, flags, g_keyword_thread_id, &hdr_td);
|
||||
if (unlikely(buf == NULL)) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -155,7 +154,7 @@ static InspectionBuffer *GetBuffer1ForTX(DetectEngineThreadCtx *det_ctx,
|
||||
InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id);
|
||||
if (buffer->inspect == NULL) {
|
||||
uint32_t rawdata_len = 0;
|
||||
uint8_t *rawdata = GetBufferForTX(txv, det_ctx, f, flow_flags, &rawdata_len);
|
||||
uint8_t *rawdata = GetBufferForTX(txv, det_ctx, flow_flags, &rawdata_len);
|
||||
if (rawdata_len == 0)
|
||||
return NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user