suricata
detect-http-raw-header.c
Go to the documentation of this file.
1 /* Copyright (C) 2007-2019 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  * \ingroup httplayer
20  *
21  * @{
22  */
23 
24 
25 /**
26  * \file
27  *
28  * \author Pablo Rincon <pablo.rincon.crespo@gmail.com>
29  *
30  * Implements support for http_raw_header keyword.
31  */
32 
33 #include "suricata-common.h"
34 #include "threads.h"
35 #include "decode.h"
36 
37 #include "detect.h"
38 #include "detect-parse.h"
39 #include "detect-engine.h"
40 #include "detect-engine-mpm.h"
42 #include "detect-content.h"
43 
44 #include "flow.h"
45 #include "flow-var.h"
46 #include "flow-util.h"
47 
48 #include "util-debug.h"
49 
50 #include "app-layer.h"
51 #include "app-layer-parser.h"
52 #include "app-layer-htp.h"
53 #include "detect-http-raw-header.h"
54 
55 static int DetectHttpRawHeaderSetup(DetectEngineCtx *, Signature *, const char *);
56 static int DetectHttpRawHeaderSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str);
57 #ifdef UNITTESTS
58 static void DetectHttpRawHeaderRegisterTests(void);
59 #endif
60 static bool DetectHttpRawHeaderValidateCallback(const Signature *s, const char **sigerror);
61 static int g_http_raw_header_buffer_id = 0;
62 static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx,
63  const DetectEngineTransforms *transforms, Flow *_f,
64  const uint8_t flow_flags, void *txv, const int list_id);
65 static InspectionBuffer *GetData2(DetectEngineThreadCtx *det_ctx,
66  const DetectEngineTransforms *transforms, Flow *_f, const uint8_t flow_flags, void *txv,
67  const int list_id);
68 
69 static int PrefilterMpmHttpHeaderRawRequestRegister(DetectEngineCtx *de_ctx,
70  SigGroupHead *sgh, MpmCtx *mpm_ctx,
71  const DetectBufferMpmRegistery *mpm_reg, int list_id);
72 static int PrefilterMpmHttpHeaderRawResponseRegister(DetectEngineCtx *de_ctx,
73  SigGroupHead *sgh, MpmCtx *mpm_ctx,
74  const DetectBufferMpmRegistery *mpm_reg, int list_id);
75 
76 /**
77  * \brief Registers the keyword handlers for the "http_raw_header" keyword.
78  */
80 {
81  /* http_raw_header content modifier */
82  sigmatch_table[DETECT_AL_HTTP_RAW_HEADER].name = "http_raw_header";
83  sigmatch_table[DETECT_AL_HTTP_RAW_HEADER].desc = "content modifier to match the raw HTTP header buffer";
84  sigmatch_table[DETECT_AL_HTTP_RAW_HEADER].url = "/rules/http-keywords.html#http-header-and-http-raw-header";
85  sigmatch_table[DETECT_AL_HTTP_RAW_HEADER].Setup = DetectHttpRawHeaderSetup;
86 #ifdef UNITTESTS
88 #endif
91 
92  /* http.header.raw sticky buffer */
93  sigmatch_table[DETECT_HTTP_RAW_HEADER].name = "http.header.raw";
94  sigmatch_table[DETECT_HTTP_RAW_HEADER].desc = "sticky buffer to match the raw HTTP header buffer";
95  sigmatch_table[DETECT_HTTP_RAW_HEADER].url = "/rules/http-keywords.html#http-header-and-http-raw-header";
96  sigmatch_table[DETECT_HTTP_RAW_HEADER].Setup = DetectHttpRawHeaderSetupSticky;
98 
100  HTP_REQUEST_HEADERS + 1, DetectEngineInspectBufferGeneric, GetData);
102  HTP_RESPONSE_HEADERS + 1, DetectEngineInspectBufferGeneric, GetData);
103 
104  DetectAppLayerMpmRegister2("http_raw_header", SIG_FLAG_TOSERVER, 2,
105  PrefilterMpmHttpHeaderRawRequestRegister, NULL, ALPROTO_HTTP1,
106  0); /* progress handled in register */
107  DetectAppLayerMpmRegister2("http_raw_header", SIG_FLAG_TOCLIENT, 2,
108  PrefilterMpmHttpHeaderRawResponseRegister, NULL, ALPROTO_HTTP1,
109  0); /* progress handled in register */
110 
112  HTTP2StateDataClient, DetectEngineInspectBufferGeneric, GetData2);
114  HTTP2StateDataServer, DetectEngineInspectBufferGeneric, GetData2);
115 
117  GetData2, ALPROTO_HTTP2, HTTP2StateDataClient);
119  GetData2, ALPROTO_HTTP2, HTTP2StateDataServer);
120 
121  DetectBufferTypeSetDescriptionByName("http_raw_header",
122  "raw http headers");
123 
125  DetectHttpRawHeaderValidateCallback);
126 
127  g_http_raw_header_buffer_id = DetectBufferTypeGetByName("http_raw_header");
128 }
129 
130 /**
131  * \brief The setup function for the http_raw_header keyword for a signature.
132  *
133  * \param de_ctx Pointer to the detection engine context.
134  * \param s Pointer to signature for the current Signature being parsed
135  * from the rules.
136  * \param m Pointer to the head of the SigMatchs for the current rule
137  * being parsed.
138  * \param arg Pointer to the string holding the keyword value.
139  *
140  * \retval 0 On success.
141  * \retval -1 On failure.
142  */
143 int DetectHttpRawHeaderSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg)
144 {
146  de_ctx, s, arg, DETECT_AL_HTTP_RAW_HEADER, g_http_raw_header_buffer_id, ALPROTO_HTTP1);
147 }
148 
149 /**
150  * \brief this function setup the http.header.raw keyword used in the rule
151  *
152  * \param de_ctx Pointer to the Detection Engine Context
153  * \param s Pointer to the Signature to which the current keyword belongs
154  * \param str Should hold an empty string always
155  *
156  * \retval 0 On success
157  */
158 static int DetectHttpRawHeaderSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str)
159 {
160  if (DetectBufferSetActiveList(s, g_http_raw_header_buffer_id) < 0)
161  return -1;
163  return -1;
164  return 0;
165 }
166 
167 static bool DetectHttpRawHeaderValidateCallback(const Signature *s, const char **sigerror)
168 {
170  *sigerror = "http_raw_header signature "
171  "without a flow direction. Use flow:to_server for "
172  "inspecting request headers or flow:to_client for "
173  "inspecting response headers.";
174 
175  SCLogError(SC_ERR_INVALID_SIGNATURE, "%s", *sigerror);
176  SCReturnInt(false);
177  }
178  return true;
179 }
180 
181 static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx,
182  const DetectEngineTransforms *transforms, Flow *_f,
183  const uint8_t flow_flags, void *txv, const int list_id)
184 {
185  InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id);
186  if (buffer->inspect == NULL) {
187  htp_tx_t *tx = (htp_tx_t *)txv;
188 
189  HtpTxUserData *tx_ud = htp_tx_get_user_data(tx);
190  if (tx_ud == NULL)
191  return NULL;
192 
193  const bool ts = ((flow_flags & STREAM_TOSERVER) != 0);
194  const uint8_t *data = ts ?
196  if (data == NULL)
197  return NULL;
198  const uint32_t data_len = ts ?
200 
201  InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
202  InspectionBufferApplyTransforms(buffer, transforms);
203  }
204 
205  return buffer;
206 }
207 
208 static InspectionBuffer *GetData2(DetectEngineThreadCtx *det_ctx,
209  const DetectEngineTransforms *transforms, Flow *_f, const uint8_t flow_flags, void *txv,
210  const int list_id)
211 {
212  InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id);
213  if (buffer->inspect == NULL) {
214  uint32_t b_len = 0;
215  const uint8_t *b = NULL;
216 
217  if (rs_http2_tx_get_headers_raw(txv, flow_flags, &b, &b_len) != 1)
218  return NULL;
219  if (b == NULL || b_len == 0)
220  return NULL;
221 
222  InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
223  InspectionBufferApplyTransforms(buffer, transforms);
224  }
225 
226  return buffer;
227 }
228 
230  int list_id;
231  const MpmCtx *mpm_ctx;
234 
235 /** \brief Generic Mpm prefilter callback
236  *
237  * \param det_ctx detection engine thread ctx
238  * \param p packet to inspect
239  * \param f flow to inspect
240  * \param txv tx to inspect
241  * \param pectx inspection context
242  */
243 static void PrefilterMpmHttpHeaderRaw(DetectEngineThreadCtx *det_ctx,
244  const void *pectx,
245  Packet *p, Flow *f, void *txv,
246  const uint64_t idx, const uint8_t flags)
247 {
248  SCEnter();
249 
250  const PrefilterMpmHttpHeaderRawCtx *ctx = pectx;
251  const MpmCtx *mpm_ctx = ctx->mpm_ctx;
252  SCLogDebug("running on list %d", ctx->list_id);
253 
254  const int list_id = ctx->list_id;
255 
256  InspectionBuffer *buffer = GetData(det_ctx, ctx->transforms, f,
257  flags, txv, list_id);
258  if (buffer == NULL)
259  return;
260 
261  const uint32_t data_len = buffer->inspect_len;
262  const uint8_t *data = buffer->inspect;
263 
264  SCLogDebug("mpm'ing buffer:");
265  //PrintRawDataFp(stdout, data, data_len);
266 
267  if (data != NULL && data_len >= mpm_ctx->minlen) {
268  (void)mpm_table[mpm_ctx->mpm_type].Search(mpm_ctx,
269  &det_ctx->mtcu, &det_ctx->pmq, data, data_len);
270  }
271 }
272 
273 static void PrefilterMpmHttpTrailerRaw(DetectEngineThreadCtx *det_ctx,
274  const void *pectx,
275  Packet *p, Flow *f, void *txv,
276  const uint64_t idx, const uint8_t flags)
277 {
278  SCEnter();
279 
280  htp_tx_t *tx = txv;
281  const HtpTxUserData *htud = (const HtpTxUserData *)htp_tx_get_user_data(tx);
282  /* if the request wasn't flagged as having a trailer, we skip */
283  if (htud && (
284  ((flags & STREAM_TOSERVER) && !htud->request_has_trailers) ||
285  ((flags & STREAM_TOCLIENT) && !htud->response_has_trailers))) {
286  SCReturn;
287  }
288  PrefilterMpmHttpHeaderRaw(det_ctx, pectx, p, f, txv, idx, flags);
289  SCReturn;
290 }
291 
292 static void PrefilterMpmHttpHeaderRawFree(void *ptr)
293 {
294  SCFree(ptr);
295 }
296 
297 static int PrefilterMpmHttpHeaderRawRequestRegister(DetectEngineCtx *de_ctx,
298  SigGroupHead *sgh, MpmCtx *mpm_ctx,
299  const DetectBufferMpmRegistery *mpm_reg, int list_id)
300 {
301  SCEnter();
302 
303  /* header */
304  PrefilterMpmHttpHeaderRawCtx *pectx = SCCalloc(1, sizeof(*pectx));
305  if (pectx == NULL)
306  return -1;
307  pectx->list_id = list_id;
308  pectx->mpm_ctx = mpm_ctx;
309  pectx->transforms = &mpm_reg->transforms;
310 
311  int r = PrefilterAppendTxEngine(de_ctx, sgh, PrefilterMpmHttpHeaderRaw,
312  mpm_reg->app_v2.alproto, HTP_REQUEST_HEADERS+1,
313  pectx, PrefilterMpmHttpHeaderRawFree, mpm_reg->pname);
314  if (r != 0) {
315  SCFree(pectx);
316  return r;
317  }
318 
319  /* trailer */
320  pectx = SCCalloc(1, sizeof(*pectx));
321  if (pectx == NULL)
322  return -1;
323  pectx->list_id = list_id;
324  pectx->mpm_ctx = mpm_ctx;
325  pectx->transforms = &mpm_reg->transforms;
326 
327  r = PrefilterAppendTxEngine(de_ctx, sgh, PrefilterMpmHttpTrailerRaw,
328  mpm_reg->app_v2.alproto, HTP_REQUEST_TRAILER+1,
329  pectx, PrefilterMpmHttpHeaderRawFree, mpm_reg->pname);
330  if (r != 0) {
331  SCFree(pectx);
332  }
333  return r;
334 }
335 
336 static int PrefilterMpmHttpHeaderRawResponseRegister(DetectEngineCtx *de_ctx,
337  SigGroupHead *sgh, MpmCtx *mpm_ctx,
338  const DetectBufferMpmRegistery *mpm_reg, int list_id)
339 {
340  SCEnter();
341 
342  /* header */
343  PrefilterMpmHttpHeaderRawCtx *pectx = SCCalloc(1, sizeof(*pectx));
344  if (pectx == NULL)
345  return -1;
346  pectx->list_id = list_id;
347  pectx->mpm_ctx = mpm_ctx;
348  pectx->transforms = &mpm_reg->transforms;
349 
350  int r = PrefilterAppendTxEngine(de_ctx, sgh, PrefilterMpmHttpHeaderRaw,
351  mpm_reg->app_v2.alproto, HTP_RESPONSE_HEADERS,
352  pectx, PrefilterMpmHttpHeaderRawFree, mpm_reg->pname);
353  if (r != 0) {
354  SCFree(pectx);
355  return r;
356  }
357 
358  /* trailer */
359  pectx = SCCalloc(1, sizeof(*pectx));
360  if (pectx == NULL)
361  return -1;
362  pectx->list_id = list_id;
363  pectx->mpm_ctx = mpm_ctx;
364  pectx->transforms = &mpm_reg->transforms;
365 
366  r = PrefilterAppendTxEngine(de_ctx, sgh, PrefilterMpmHttpTrailerRaw,
367  mpm_reg->app_v2.alproto, HTP_RESPONSE_TRAILER,
368  pectx, PrefilterMpmHttpHeaderRawFree, mpm_reg->pname);
369  if (r != 0) {
370  SCFree(pectx);
371  }
372  return r;
373 }
374 
375 /************************************Unittests*********************************/
376 
377 #ifdef UNITTESTS
379 #endif
380 
381 /**
382  * @}
383  */
SigTableElmt_::url
const char * url
Definition: detect.h:1204
DetectSignatureSetAppProto
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
Definition: detect-parse.c:1489
detect-content.h
MpmCtx_::mpm_type
uint8_t mpm_type
Definition: util-mpm.h:90
ts
uint64_t ts
Definition: source-erf-file.c:54
detect-engine.h
SIGMATCH_INFO_STICKY_BUFFER
#define SIGMATCH_INFO_STICKY_BUFFER
Definition: detect.h:1397
PrefilterMpmHttpHeaderRawCtx::list_id
int list_id
Definition: detect-http-raw-header.c:230
SigTableElmt_::desc
const char * desc
Definition: detect.h:1203
flow-util.h
SIGMATCH_INFO_CONTENT_MODIFIER
#define SIGMATCH_INFO_CONTENT_MODIFIER
Definition: detect.h:1395
HtpTxUserData_::request_headers_raw_len
uint32_t request_headers_raw_len
Definition: app-layer-htp.h:228
SigTableElmt_::name
const char * name
Definition: detect.h:1201
PrefilterMpmHttpHeaderRawCtx::transforms
const DetectEngineTransforms * transforms
Definition: detect-http-raw-header.c:232
DETECT_HTTP_RAW_HEADER
@ DETECT_HTTP_RAW_HEADER
Definition: detect-engine-register.h:142
SigGroupHead_
Container for matching data for a signature group.
Definition: detect.h:1346
DetectEngineTransforms
Definition: detect.h:378
SCLogDebug
#define SCLogDebug(...)
Definition: util-debug.h:298
DetectBufferMpmRegistery_::transforms
DetectEngineTransforms transforms
Definition: detect.h:615
InspectionBuffer
Definition: detect.h:344
DetectHttpRawHeaderRegister
void DetectHttpRawHeaderRegister(void)
Registers the keyword handlers for the "http_raw_header" keyword.
Definition: detect-http-raw-header.c:79
DetectHttpRawHeaderRegisterTests
void DetectHttpRawHeaderRegisterTests(void)
Definition: detect-http-raw-header.c:4516
threads.h
Flow_
Flow data structure.
Definition: flow.h:353
DetectEngineThreadCtx_::pmq
PrefilterRuleStore pmq
Definition: detect.h:1101
PrefilterGenericMpmRegister
int PrefilterGenericMpmRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistery *mpm_reg, int list_id)
Definition: detect-engine-prefilter.c:676
SigTableElmt_::flags
uint16_t flags
Definition: detect.h:1195
DETECT_AL_HTTP_RAW_HEADER
@ DETECT_AL_HTTP_RAW_HEADER
Definition: detect-engine-register.h:141
DetectEngineCtx_
main detection engine ctx
Definition: detect.h:758
SC_ERR_INVALID_SIGNATURE
@ SC_ERR_INVALID_SIGNATURE
Definition: util-error.h:69
PrefilterMpmHttpHeaderRawCtx::mpm_ctx
const MpmCtx * mpm_ctx
Definition: detect-http-raw-header.c:231
DetectBufferMpmRegistery_
one time registration of keywords at start up
Definition: detect.h:601
SIG_FLAG_TOCLIENT
#define SIG_FLAG_TOCLIENT
Definition: detect.h:237
SigTableElmt_::Setup
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
Definition: detect.h:1186
detect-http-raw-header.c
Handle HTTP raw header match.
detect-engine-prefilter.h
DetectEngineThreadCtx_::mtcu
MpmThreadCtx mtcu
Definition: detect.h:1099
InspectionBufferGet
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
Definition: detect-engine.c:1010
DetectBufferTypeGetByName
int DetectBufferTypeGetByName(const char *name)
Definition: detect-engine.c:829
SIG_FLAG_TOSERVER
#define SIG_FLAG_TOSERVER
Definition: detect.h:236
app-layer-htp.h
PrefilterMpmHttpHeaderRawCtx
struct PrefilterMpmHttpHeaderRawCtx PrefilterMpmHttpHeaderRawCtx
decode.h
util-debug.h
DetectBufferTypeRegisterValidateCallback
void DetectBufferTypeRegisterValidateCallback(const char *name, bool(*ValidateCallback)(const Signature *, const char **sigerror))
Definition: detect-engine.c:921
de_ctx
DetectEngineCtx * de_ctx
Definition: fuzz_siginit.c:17
DetectEngineThreadCtx_
Definition: detect.h:1003
STREAM_TOSERVER
#define STREAM_TOSERVER
Definition: stream.h:31
PrefilterMpmHttpHeaderRawCtx
Definition: detect-http-raw-header.c:229
SCEnter
#define SCEnter(...)
Definition: util-debug.h:300
detect-engine-mpm.h
detect.h
HtpTxUserData_::response_has_trailers
uint8_t response_has_trailers
Definition: app-layer-htp.h:219
HtpTxUserData_::request_headers_raw
uint8_t * request_headers_raw
Definition: app-layer-htp.h:226
SigTableElmt_::alternative
uint16_t alternative
Definition: detect.h:1199
app-layer-parser.h
MpmCtx_::minlen
uint16_t minlen
Definition: util-mpm.h:99
HtpTxUserData_::request_has_trailers
uint8_t request_has_trailers
Definition: app-layer-htp.h:218
SCReturn
#define SCReturn
Definition: util-debug.h:302
Signature_::flags
uint32_t flags
Definition: detect.h:518
DetectEngineInspectBufferGeneric
int DetectEngineInspectBufferGeneric(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id)
Do the content inspection & validation for a signature.
Definition: detect-engine.c:1617
DetectEngineContentModifierBufferSetup
int DetectEngineContentModifierBufferSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg, int sm_type, int sm_list, AppProto alproto)
Definition: detect-parse.c:146
Packet_
Definition: decode.h:414
DetectAppLayerInspectEngineRegister2
void DetectAppLayerInspectEngineRegister2(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr2 Callback2, InspectionBufferGetDataPtr GetData)
register inspect engine at start up time
Definition: detect-engine.c:174
ALPROTO_HTTP2
@ ALPROTO_HTTP2
Definition: app-layer-protos.h:59
MpmTableElmt_::Search
uint32_t(* Search)(const struct MpmCtx_ *, struct MpmThreadCtx_ *, PrefilterRuleStore *, const uint8_t *, uint32_t)
Definition: util-mpm.h:165
DetectBufferMpmRegistery_::app_v2
struct DetectBufferMpmRegistery_::@85::@87 app_v2
DetectAppLayerMpmRegister2
void DetectAppLayerMpmRegister2(const char *name, int direction, int priority, int(*PrefilterRegister)(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistery *mpm_reg, int list_id), InspectionBufferGetDataPtr GetData, AppProto alproto, int tx_min_progress)
register a MPM engine
Definition: detect-engine-mpm.c:89
DetectBufferMpmRegistery_::pname
char pname[32]
Definition: detect.h:603
flags
uint8_t flags
Definition: decode-gre.h:0
suricata-common.h
HtpTxUserData_::response_headers_raw
uint8_t * response_headers_raw
Definition: app-layer-htp.h:227
InspectionBufferApplyTransforms
void InspectionBufferApplyTransforms(InspectionBuffer *buffer, const DetectEngineTransforms *transforms)
Definition: detect-engine.c:1193
ALPROTO_HTTP1
@ ALPROTO_HTTP1
Definition: app-layer-protos.h:30
sigmatch_table
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
Definition: detect-parse.c:73
STREAM_TOCLIENT
#define STREAM_TOCLIENT
Definition: stream.h:32
SCLogError
#define SCLogError(err_code,...)
Macro used to log ERROR messages.
Definition: util-debug.h:257
HtpTxUserData_
Definition: app-layer-htp.h:213
detect-http-raw-header.h
InspectionBuffer::inspect_len
uint32_t inspect_len
Definition: detect.h:347
InspectionBuffer::inspect
const uint8_t * inspect
Definition: detect.h:345
str
#define str(s)
Definition: suricata-common.h:272
InspectionBufferSetup
void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id, InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len)
setup the buffer with our initial data
Definition: detect-engine.c:1091
SCFree
#define SCFree(p)
Definition: util-mem.h:61
detect-parse.h
Signature_
Signature container.
Definition: detect.h:517
PrefilterAppendTxEngine
int PrefilterAppendTxEngine(DetectEngineCtx *de_ctx, SigGroupHead *sgh, void(*PrefilterTxFunc)(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p, Flow *f, void *tx, const uint64_t idx, const uint8_t flags), AppProto alproto, int tx_min_progress, void *pectx, void(*FreeFunc)(void *pectx), const char *name)
Definition: detect-engine-prefilter.c:259
ALPROTO_HTTP
@ ALPROTO_HTTP
Definition: app-layer-protos.h:63
mpm_table
MpmTableElmt mpm_table[MPM_TABLE_SIZE]
Definition: util-mpm.c:48
SIGMATCH_NOOPT
#define SIGMATCH_NOOPT
Definition: detect.h:1373
DetectBufferSetActiveList
int DetectBufferSetActiveList(Signature *s, const int list)
Definition: detect-engine.c:941
DetectBufferTypeSetDescriptionByName
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)
Definition: detect-engine.c:857
MpmCtx_
Definition: util-mpm.h:88
HtpTxUserData_::response_headers_raw_len
uint32_t response_headers_raw_len
Definition: app-layer-htp.h:229
flow.h
SCCalloc
#define SCCalloc(nm, sz)
Definition: util-mem.h:53
SCReturnInt
#define SCReturnInt(x)
Definition: util-debug.h:304
flow-var.h
SigTableElmt_::RegisterTests
void(* RegisterTests)(void)
Definition: detect.h:1193
app-layer.h