return NULL;
SCLogDebug("have data!");
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
}
} else {
buffer->flags |= DETECT_CI_FLAGS_DCE_BE;
}
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
}
}
SCLogDebug("tx %p data %p data_len %u", tx, tx->buffer, tx->buffer_len);
- InspectionBufferSetup(det_ctx, list_id, buffer, tx->buffer, tx->buffer_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, tx->buffer, tx->buffer_len, transforms);
}
return buffer;
}
if (!GetBuf(txv, flow_flags, &b, &b_len))
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
}
static uint32_t DetectEngineTenantGetIdFromVlanId(const void *ctx, const Packet *p);
static uint32_t DetectEngineTenantGetIdFromPcap(const void *ctx, const Packet *p);
+static inline void InspectionBufferApplyTransformsInternal(
+ InspectionBuffer *, const DetectEngineTransforms *);
+
static DetectEngineAppInspectionEngine *g_app_inspect_engines = NULL;
static DetectEnginePktInspectionEngine *g_pkt_inspect_engines = NULL;
static DetectEngineFrameInspectionEngine *g_frame_inspect_engines = NULL;
return buffer;
}
+static inline void InspectionBufferApplyTransformsInternal(
+ InspectionBuffer *buffer, const DetectEngineTransforms *transforms)
+{
+ if (transforms) {
+ for (int i = 0; i < DETECT_TRANSFORMS_MAX; i++) {
+ const int id = transforms->transforms[i].transform;
+ if (id == 0)
+ break;
+ BUG_ON(sigmatch_table[id].Transform == NULL);
+ sigmatch_table[id].Transform(buffer, transforms->transforms[i].options);
+ SCLogDebug("applied transform %s", sigmatch_table[id].name);
+ }
+ }
+}
+
+void InspectionBufferApplyTransforms(
+ InspectionBuffer *buffer, const DetectEngineTransforms *transforms)
+{
+ InspectionBufferApplyTransformsInternal(buffer, transforms);
+}
+
void InspectionBufferInit(InspectionBuffer *buffer, uint32_t initial_size)
{
memset(buffer, 0, sizeof(*buffer));
buffer->len = 0;
buffer->initialized = true;
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferApplyTransformsInternal(buffer, transforms);
}
-/** \brief setup the buffer with our initial data */
-void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id,
+static inline void InspectionBufferSetupInternal(DetectEngineThreadCtx *det_ctx, const int list_id,
InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len)
{
#ifdef DEBUG_VALIDATION
buffer->len = 0;
buffer->initialized = true;
}
+/** \brief setup the buffer with our initial data */
+void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id,
+ InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len)
+{
+ InspectionBufferSetupInternal(det_ctx, list_id, buffer, data, data_len);
+}
+
+/** \brief setup the buffer with our initial data */
+void InspectionBufferSetupAndApplyTransforms(DetectEngineThreadCtx *det_ctx, const int list_id,
+ InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len,
+ const DetectEngineTransforms *transforms)
+{
+ InspectionBufferSetupInternal(det_ctx, list_id, buffer, data, data_len);
+ InspectionBufferApplyTransformsInternal(buffer, transforms);
+}
void InspectionBufferFree(InspectionBuffer *buffer)
{
return true;
}
-void InspectionBufferApplyTransforms(InspectionBuffer *buffer,
- const DetectEngineTransforms *transforms)
-{
- if (transforms) {
- for (int i = 0; i < DETECT_TRANSFORMS_MAX; i++) {
- const int id = transforms->transforms[i].transform;
- if (id == 0)
- break;
- BUG_ON(sigmatch_table[id].Transform == NULL);
- sigmatch_table[id].Transform(buffer, transforms->transforms[i].options);
- SCLogDebug("applied transform %s", sigmatch_table[id].name);
- }
- }
-}
-
static void DetectBufferTypeSetupDetectEngine(DetectEngineCtx *de_ctx)
{
const int size = g_buffer_type_id;
void InspectionBufferInit(InspectionBuffer *buffer, uint32_t initial_size);
void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id,
InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len);
+void InspectionBufferSetupAndApplyTransforms(DetectEngineThreadCtx *det_ctx, const int list_id,
+ InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len,
+ const DetectEngineTransforms *transforms);
void InspectionBufferFree(InspectionBuffer *buffer);
void *InspectionBufferCheckAndExpand(InspectionBuffer *buffer, uint32_t min_size);
void InspectionBufferTruncate(InspectionBuffer *buffer, uint32_t buf_len);
tx->command_descriptor->command_length == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer,
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer,
(const uint8_t *)tx->command_descriptor->command_name,
- tx->command_descriptor->command_length);
- InspectionBufferApplyTransforms(buffer, transforms);
+ tx->command_descriptor->command_length, transforms);
}
return buffer;
const uint32_t data_len = htp_header_value_len(h);
const uint8_t *data = htp_header_value_ptr(h);
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
const uint32_t data_len = htp_header_value_len(h);
const uint8_t *data = htp_header_value_ptr(h);
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
if (rawdata_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, rawdata, rawdata_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, rawdata, rawdata_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
goto end;
}
/* setup buffer and apply transforms */
- InspectionBufferSetup(det_ctx, list_id, buffer, rawdata, rawdata_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, rawdata, rawdata_len, transforms);
}
const uint32_t data_len = buffer->inspect_len;
return;
/* setup buffer and apply transforms */
- InspectionBufferSetup(det_ctx, list_id, buffer, rawdata, rawdata_len);
- InspectionBufferApplyTransforms(buffer, ctx->transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, rawdata, rawdata_len, ctx->transforms);
}
const uint32_t data_len = buffer->inspect_len;
const uint32_t data_len = htp_header_value_len(h);
const uint8_t *data = htp_header_value_ptr(h);
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
const uint32_t data_len = htp_header_value_len(h);
const uint8_t *data = htp_header_value_ptr(h);
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
const uint32_t data_len = bstr_len(htp_tx_request_hostname(tx));
const uint8_t *data = bstr_ptr(htp_tx_request_hostname(tx));
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
data_len = bstr_len(tx->parsed_uri->hostname);
}
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
const uint32_t data_len = bstr_len(htp_tx_request_method(tx));
const uint8_t *data = bstr_ptr(htp_tx_request_method(tx));
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
return NULL;
}
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
{
InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id);
if (buffer->inspect == NULL) {
- InspectionBufferSetup(
- det_ctx, list_id, buffer, (const uint8_t *)"HTTP/2", strlen("HTTP/2"));
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, (const uint8_t *)"HTTP/2", strlen("HTTP/2"), transforms);
}
return buffer;
const uint32_t data_len = ts ?
tx_ud->request_headers_raw_len : tx_ud->response_headers_raw_len;
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
const uint32_t data_len = bstr_len(htp_tx_request_line(tx));
const uint8_t *data = bstr_ptr(htp_tx_request_line(tx));
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
}
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
const uint32_t data_len = bstr_len(htp_tx_response_line(tx));
const uint8_t *data = bstr_ptr(htp_tx_response_line(tx));
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
}
if (rawdata_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, rawdata, rawdata_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, rawdata, rawdata_len, transforms);
}
return buffer;
const uint32_t data_len = bstr_len(htp_tx_response_status(tx));
const uint8_t *data = bstr_ptr(htp_tx_response_status(tx));
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
{
InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id);
if (buffer->inspect == NULL) {
- InspectionBufferSetup(det_ctx, list_id, buffer, (const uint8_t *)"", 0);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, (const uint8_t *)"", 0, transforms);
}
return buffer;
const uint32_t data_len = bstr_len(htp_tx_response_message(tx));
const uint8_t *data = bstr_ptr(htp_tx_response_message(tx));
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
const uint32_t data_len = htp_header_value_len(h);
const uint8_t *data = htp_header_value_ptr(h);
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
const uint32_t data_len = bstr_len(tx_ud->request_uri_normalized);
const uint8_t *data = bstr_ptr(tx_ud->request_uri_normalized);
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
const uint32_t data_len = bstr_len(htp_tx_request_uri(tx));
const uint8_t *data = bstr_ptr(htp_tx_request_uri(tx));
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
const uint32_t data_len = hlen;
const uint8_t *data = (const uint8_t *)icmpv4h;
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
SCReturnPtr(buffer, "InspectionBuffer");
const uint32_t data_len = hlen;
const uint8_t *data = (const uint8_t *)icmpv6h;
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
SCReturnPtr(buffer, "InspectionBuffer");
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
const uint32_t data_len = hlen;
const uint8_t *data = (const uint8_t *)ip4h;
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
const uint32_t data_len = hlen;
const uint8_t *data = (const uint8_t *)ip6h;
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
SCReturnPtr(buffer, "InspectionBuffer");
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
}
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
}
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
}
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
}
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
}
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
}
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
}
return NULL;
}
- InspectionBufferSetup(det_ctx, list_id, buffer, hassh, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, hassh, b_len, transforms);
}
return buffer;
return NULL;
}
- InspectionBufferSetup(det_ctx, list_id, buffer, hasshServer, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, hasshServer, b_len, transforms);
}
return buffer;
const DetectEngineTransforms *transforms, Flow *_f,
const uint8_t flow_flags, void *txv, const int list_id)
{
-
+
SCEnter();
InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id);
return NULL;
}
- InspectionBufferSetup(det_ctx, list_id, buffer, hassh, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, hassh, b_len, transforms);
}
return buffer;
const DetectEngineTransforms *transforms, Flow *_f,
const uint8_t flow_flags, void *txv, const int list_id)
{
-
+
SCEnter();
InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id);
return NULL;
}
- InspectionBufferSetup(det_ctx, list_id, buffer, hassh, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, hassh, b_len, transforms);
}
return buffer;
return NULL;
}
- InspectionBufferSetup(det_ctx, list_id, buffer, protocol, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, protocol, b_len, transforms);
}
return buffer;
return NULL;
}
- InspectionBufferSetup(det_ctx, list_id, buffer, software, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, software, b_len, transforms);
}
return buffer;
const uint32_t data_len = hlen;
const uint8_t *data = (const uint8_t *)tcph;
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
const uint32_t data_len = strlen(connp->cert0_fingerprint);
const uint8_t *data = (uint8_t *)connp->cert0_fingerprint;
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
const uint32_t data_len = strlen(connp->cert0_issuerdn);
const uint8_t *data = (uint8_t *)connp->cert0_issuerdn;
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
const uint32_t data_len = strlen(connp->cert0_serial);
const uint8_t *data = (uint8_t *)connp->cert0_serial;
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
const uint32_t data_len = strlen(connp->cert0_subject);
const uint8_t *data = (uint8_t *)connp->cert0_subject;
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
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(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
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(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
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(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
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(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
} else {
data = ssl_state->server_connp.random;
}
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
}
} else {
data = ssl_state->server_connp.random + DETECT_TLS_RANDOM_TIME_LEN;
}
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
}
} else {
data = ssl_state->server_connp.random;
}
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
}
const uint32_t data_len = strlen(ssl_state->client_connp.sni);
const uint8_t *data = (uint8_t *)ssl_state->client_connp.sni;
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
const uint32_t data_len = UDP_HEADER_LEN;
const uint8_t *data = (const uint8_t *)udph;
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(
+ det_ctx, list_id, buffer, data, data_len, transforms);
}
return buffer;
if (b == NULL || b_len == 0)
return NULL;
- InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
- InspectionBufferApplyTransforms(buffer, transforms);
+ InspectionBufferSetupAndApplyTransforms(det_ctx, list_id, buffer, b, b_len, transforms);
}
return buffer;
}