return NULL;
SCLogDebug("have data!");
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
} else {
buffer->flags |= DETECT_CI_FLAGS_DCE_BE;
}
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
return NULL;
SCLogDebug("tx %p data %p data_len %u", tx, data, data_len);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
&data, &data_len) == 0) {
return NULL;
}
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
SCReturnPtr(buffer, "InspectionBuffer");
InspectionBuffer *InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
{
- InspectionBuffer *buffer = &det_ctx->inspect.buffers[list_id];
- if (buffer->inspect == NULL) {
- det_ctx->inspect.to_clear_queue[det_ctx->inspect.to_clear_idx++] = list_id;
- }
- return buffer;
+ return &det_ctx->inspect.buffers[list_id];
}
/** \brief for a InspectionBufferMultipleForList get a InspectionBuffer
}
/** \brief setup the buffer with our initial data */
-void InspectionBufferSetup(InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len)
+void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id,
+ InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len)
{
+ if (buffer->inspect == NULL) {
+#ifdef UNITTESTS
+ if (det_ctx && list_id != -1)
+#endif
+ det_ctx->inspect.to_clear_queue[det_ctx->inspect.to_clear_idx++] = list_id;
+ }
buffer->inspect = buffer->orig = data;
buffer->inspect_len = buffer->orig_len = data_len;
buffer->len = 0;
#include "flow-private.h"
void InspectionBufferInit(InspectionBuffer *buffer, uint32_t initial_size);
-void InspectionBufferSetup(InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len);
+void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id,
+ InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len);
void InspectionBufferFree(InspectionBuffer *buffer);
void InspectionBufferCheckAndExpand(InspectionBuffer *buffer, uint32_t min_size);
void InspectionBufferCopy(InspectionBuffer *buffer, uint8_t *buf, uint32_t buf_len);
StreamingBufferGetDataAtOffset(body->sb,
&data, &data_len, offset);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
buffer->inspect_offset = offset;
/* built-in 'transformation' */
StreamingBufferGetDataAtOffset(cur_file->sb,
&data, &data_len,
cur_file->content_inspected);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
SCLogDebug("[list %d] [before] buffer offset %" PRIu64 "; buffer len %" PRIu32
"; data_len %" PRIu32 "; file_size %" PRIu64,
list_id, buffer->inspect_offset, buffer->inspect_len, data_len, file_size);
const uint8_t *data = (const uint8_t *)cur_file->magic;
uint32_t data_len = (uint32_t)strlen(cur_file->magic);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
SCReturnPtr(buffer, "InspectionBuffer");
const uint8_t *data = cur_file->name;
uint32_t data_len = cur_file->name_len;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
SCReturnPtr(buffer, "InspectionBuffer");
StreamingBufferGetDataAtOffset(body->sb,
&data, &data_len, offset);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
buffer->inspect_offset = offset;
const uint32_t data_len = bstr_len(h->value);
const uint8_t *data = bstr_ptr(h->value);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = bstr_len(h->value);
const uint8_t *data = bstr_ptr(h->value);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return;
/* setup buffer and apply transforms */
- InspectionBufferSetup(buffer, rawdata, rawdata_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, rawdata, rawdata_len);
InspectionBufferApplyTransforms(buffer, ctx->transforms);
}
return;
/* setup buffer and apply transforms */
- InspectionBufferSetup(buffer, rawdata, rawdata_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, rawdata, rawdata_len);
InspectionBufferApplyTransforms(buffer, ctx->transforms);
}
goto end;
}
/* setup buffer and apply transforms */
- InspectionBufferSetup(buffer, rawdata, rawdata_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, rawdata, rawdata_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
goto end;
}
/* setup buffer and apply transforms */
- InspectionBufferSetup(buffer, rawdata, rawdata_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, rawdata, rawdata_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return;
/* setup buffer and apply transforms */
- InspectionBufferSetup(buffer, rawdata, rawdata_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, rawdata, rawdata_len);
InspectionBufferApplyTransforms(buffer, ctx->transforms);
}
const uint32_t data_len = bstr_len(h->value);
const uint8_t *data = bstr_ptr(h->value);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = bstr_len(h->value);
const uint8_t *data = bstr_ptr(h->value);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = bstr_len(tx->request_hostname);
const uint8_t *data = bstr_ptr(tx->request_hostname);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
data_len = bstr_len(tx->parsed_uri->hostname);
}
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = bstr_len(tx->request_method);
const uint8_t *data = bstr_ptr(tx->request_method);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return NULL;
}
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = ts ?
tx_ud->request_headers_raw_len : tx_ud->response_headers_raw_len;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = bstr_len(tx->request_line);
const uint8_t *data = bstr_ptr(tx->request_line);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
const uint32_t data_len = bstr_len(tx->response_line);
const uint8_t *data = bstr_ptr(tx->response_line);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
return;
/* setup buffer and apply transforms */
- InspectionBufferSetup(buffer, rawdata, rawdata_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, rawdata, rawdata_len);
InspectionBufferApplyTransforms(buffer, ctx->transforms);
}
return;
/* setup buffer and apply transforms */
- InspectionBufferSetup(buffer, rawdata, rawdata_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, rawdata, rawdata_len);
InspectionBufferApplyTransforms(buffer, ctx->transforms);
}
goto end;
}
/* setup buffer and apply transforms */
- InspectionBufferSetup(buffer, rawdata, rawdata_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, rawdata, rawdata_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = bstr_len(tx->response_status);
const uint8_t *data = bstr_ptr(tx->response_status);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = bstr_len(tx->response_message);
const uint8_t *data = bstr_ptr(tx->response_message);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = bstr_len(h->value);
const uint8_t *data = bstr_ptr(h->value);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = bstr_len(tx_ud->request_uri_normalized);
const uint8_t *data = bstr_ptr(tx_ud->request_uri_normalized);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = bstr_len(tx->request_uri);
const uint8_t *data = bstr_ptr(tx->request_uri);
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
SCReturnPtr(buffer, "InspectionBuffer");
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
SCReturnPtr(buffer, "InspectionBuffer");
const uint32_t data_len = hlen;
const uint8_t *data = (const uint8_t *)p->icmpv4h;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = hlen;
const uint8_t *data = (const uint8_t *)p->icmpv6h;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = hlen;
const uint8_t *data = (const uint8_t *)p->ip4h;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = hlen;
const uint8_t *data = (const uint8_t *)p->ip6h;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
SCReturnPtr(buffer, "InspectionBuffer");
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
SCReturnPtr(buffer, "InspectionBuffer");
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
return NULL;
}
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
SCReturnPtr(buffer, "InspectionBuffer");
return NULL;
}
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
SCReturnPtr(buffer, "InspectionBuffer");
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return NULL;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(buffer, b, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return buffer;
return NULL;
}
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return NULL;
}
- InspectionBufferSetup(buffer, hassh, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, hassh, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return NULL;
}
- InspectionBufferSetup(buffer, hasshServer, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, hasshServer, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return NULL;
}
- InspectionBufferSetup(buffer, hassh, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, hassh, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return NULL;
}
- InspectionBufferSetup(buffer, hassh, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, hassh, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return NULL;
}
- InspectionBufferSetup(buffer, protocol, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, protocol, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return NULL;
}
- InspectionBufferSetup(buffer, software, b_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, software, b_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = hlen;
const uint8_t *data = (const uint8_t *)p->tcph;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return NULL; /* no buffer */
}
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = strlen(ssl_state->server_connp.cert0_fingerprint);
const uint8_t *data = (uint8_t *)ssl_state->server_connp.cert0_fingerprint;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = strlen(ssl_state->server_connp.cert0_issuerdn);
const uint8_t *data = (uint8_t *)ssl_state->server_connp.cert0_issuerdn;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = strlen(ssl_state->server_connp.cert0_serial);
const uint8_t *data = (uint8_t *)ssl_state->server_connp.cert0_serial;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = strlen(ssl_state->server_connp.cert0_subject);
const uint8_t *data = (uint8_t *)ssl_state->server_connp.cert0_subject;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
return NULL;
}
- InspectionBufferSetup(buffer, cbdata->cert->cert_data,
- cbdata->cert->cert_len);
+ InspectionBufferSetup(
+ det_ctx, list_id, buffer, cbdata->cert->cert_data, cbdata->cert->cert_len);
InspectionBufferApplyTransforms(buffer, transforms);
SCReturnPtr(buffer, "InspectionBuffer");
const uint32_t data_len = strlen(ssl_state->client_connp.ja3_hash);
const uint8_t *data = (uint8_t *)ssl_state->client_connp.ja3_hash;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = strlen(ssl_state->client_connp.ja3_str->data);
const uint8_t *data = (uint8_t *)ssl_state->client_connp.ja3_str->data;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = strlen(ssl_state->server_connp.ja3_hash);
const uint8_t *data = (uint8_t *)ssl_state->server_connp.ja3_hash;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = strlen(ssl_state->server_connp.ja3_str->data);
const uint8_t *data = (uint8_t *)ssl_state->server_connp.ja3_str->data;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
const uint32_t data_len = strlen(ssl_state->client_connp.sni);
const uint8_t *data = (uint8_t *)ssl_state->client_connp.sni;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}
InspectionBuffer buffer;
InspectionBufferInit(&buffer, 9);
- InspectionBufferSetup(&buffer, input, input_len);
+ InspectionBufferSetup(NULL, -1, &buffer, input, input_len);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
TransformCompressWhitespace(&buffer, NULL);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
InspectionBuffer buffer;
InspectionBufferInit(&buffer, 9);
- InspectionBufferSetup(&buffer, input, input_len);
+ InspectionBufferSetup(NULL, -1, &buffer, input, input_len);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
TransformDoubleWhitespace(&buffer);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
InspectionBuffer buffer;
InspectionBufferInit(&buffer, 10);
- InspectionBufferSetup(&buffer, input, input_len);
+ InspectionBufferSetup(NULL, -1, &buffer, input, input_len);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
FAIL_IF(TransformCompressWhitespaceValidate(buffer.inspect, buffer.inspect_len, NULL));
PASS;
InspectionBuffer buffer;
InspectionBufferInit(&buffer, 9);
- InspectionBufferSetup(&buffer, input, input_len);
+ InspectionBufferSetup(NULL, -1, &buffer, input, input_len);
TransformDoubleWhitespace(&buffer);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
FAIL_IF(TransformCompressWhitespaceValidate(buffer.inspect, buffer.inspect_len, NULL));
InspectionBuffer buffer;
InspectionBufferInit(&buffer, input_len);
- InspectionBufferSetup(&buffer, input, input_len);
+ InspectionBufferSetup(NULL, -1, &buffer, input, input_len);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
TransformDotPrefix(&buffer, NULL);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
InspectionBuffer buffer;
InspectionBufferInit(&buffer, input_len);
- InspectionBufferSetup(&buffer, input, input_len);
+ InspectionBufferSetup(NULL, -1, &buffer, input, input_len);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
TransformDotPrefix(&buffer, NULL);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
UtRegisterTest("DetectTransformDotPrefixTest02", DetectTransformDotPrefixTest02);
UtRegisterTest("DetectTransformDotPrefixTest03", DetectTransformDotPrefixTest03);
}
-#endif
\ No newline at end of file
+#endif
InspectionBuffer buffer;
InspectionBufferInit(&buffer, 8);
- InspectionBufferSetup(&buffer, input, input_len);
+ InspectionBufferSetup(NULL, -1, &buffer, input, input_len);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
TransformToMd5(&buffer, NULL);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
DetectTransformToMd5Test01);
}
#endif
-#endif
\ No newline at end of file
+#endif
InspectionBuffer buffer;
InspectionBufferInit(&buffer, 8);
- InspectionBufferSetup(&buffer, input, input_len);
+ InspectionBufferSetup(NULL, -1, &buffer, input, input_len);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
TransformToSha1(&buffer, NULL);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
InspectionBuffer buffer;
InspectionBufferInit(&buffer, 8);
- InspectionBufferSetup(&buffer, input, input_len);
+ InspectionBufferSetup(NULL, -1, &buffer, input, input_len);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
TransformToSha256(&buffer, NULL);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
DetectTransformToSha256Test01);
}
#endif
-#endif
\ No newline at end of file
+#endif
InspectionBuffer buffer;
InspectionBufferInit(&buffer, 8);
- InspectionBufferSetup(&buffer, input, input_len);
+ InspectionBufferSetup(NULL, -1, &buffer, input, input_len);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
TransformStripWhitespace(&buffer, NULL);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
InspectionBuffer buffer;
InspectionBufferInit(&buffer, 8);
- InspectionBufferSetup(&buffer, input, input_len);
+ InspectionBufferSetup(NULL, -1, &buffer, input, input_len);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
TransformDoubleWhitespace(&buffer);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
UtRegisterTest("DetectTransformStripWhitespaceTest03",
DetectTransformStripWhitespaceTest03);
}
-#endif
\ No newline at end of file
+#endif
InspectionBuffer buffer;
InspectionBufferInit(&buffer, 8);
- InspectionBufferSetup(&buffer, input, input_len);
+ InspectionBufferSetup(NULL, -1, &buffer, input, input_len);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
TransformUrlDecode(&buffer, NULL);
PrintRawDataFp(stdout, buffer.inspect, buffer.inspect_len);
const uint32_t data_len = UDP_HEADER_LEN;
const uint8_t *data = (const uint8_t *)p->udph;
- InspectionBufferSetup(buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
InspectionBufferApplyTransforms(buffer, transforms);
}