suricata
detect-dns-response.c
Go to the documentation of this file.
1 /* Copyright (C) 2025 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  * \file
20  *
21  * Detect keyword for DNS response: dns.response.rrname
22  */
23 
24 #include "detect.h"
25 #include "detect-parse.h"
26 #include "detect-engine.h"
27 #include "detect-engine-buffer.h"
28 #include "detect-engine-mpm.h"
31 #include "detect-engine-helper.h"
32 #include "detect-dns-response.h"
33 #include "util-profiling.h"
34 #include "rust.h"
35 
36 static int detect_buffer_id = 0;
37 static int mdns_detect_buffer_id = 0;
38 static int llmnr_detect_buffer_id = 0;
39 
40 typedef struct PrefilterMpm {
41  int list_id;
42  const MpmCtx *mpm_ctx;
45 
51 
52  /* always last */
54 };
55 
57  enum DnsResponseSection response_section; /**< query, answer, authority, additional */
58  uint32_t response_id; /**< index into response resource records */
59  uint32_t local_id; /**< used as index into thread inspect array */
60 };
61 
62 static int DetectSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str)
63 {
64  if (SCDetectBufferSetActiveList(de_ctx, s, detect_buffer_id) < 0) {
65  return -1;
66  }
68  return -1;
69  }
70 
71  return 0;
72 }
73 
74 static int MdnsDetectSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str)
75 {
76  if (SCDetectBufferSetActiveList(de_ctx, s, mdns_detect_buffer_id) < 0) {
77  return -1;
78  }
80  return -1;
81  }
82 
83  return 0;
84 }
85 
86 static int LlmnrDetectSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str)
87 {
88  if (SCDetectBufferSetActiveList(de_ctx, s, llmnr_detect_buffer_id) < 0) {
89  return -1;
90  }
92  return -1;
93  }
94 
95  return 0;
96 }
97 
98 static InspectionBuffer *GetBuffer(DetectEngineThreadCtx *det_ctx, uint8_t flags,
99  const DetectEngineTransforms *transforms, void *txv, struct DnsResponseGetDataArgs *cbdata,
100  int list_id, bool get_rdata)
101 {
102  InspectionBuffer *buffer =
103  InspectionBufferMultipleForListGet(det_ctx, list_id, cbdata->local_id);
104  if (buffer == NULL) {
105  return NULL;
106  }
107  if (buffer->initialized) {
108  return buffer;
109  }
110 
111  const uint8_t *data = NULL;
112  uint32_t data_len = 0;
113 
114  if (get_rdata) {
115  /* Get rdata values that are formatted as resource names. */
116  switch (cbdata->response_section) {
117  case DNS_RESPONSE_ANSWER:
118  if (!SCDnsTxGetAnswerRdata(txv, cbdata->response_id, &data, &data_len)) {
120  return NULL;
121  }
122  break;
124  if (!SCDnsTxGetAuthorityRdata(txv, cbdata->response_id, &data, &data_len)) {
126  return NULL;
127  }
128  break;
130  if (!SCDnsTxGetAdditionalRdata(txv, cbdata->response_id, &data, &data_len)) {
132  return NULL;
133  }
134  break;
135  default:
137  return NULL;
138  }
139  } else {
140  /* Get name values. */
141  switch (cbdata->response_section) {
142  case DNS_RESPONSE_QUERY:
143  if (!SCDnsTxGetQueryName(
144  det_ctx, txv, STREAM_TOCLIENT, cbdata->response_id, &data, &data_len)) {
146  return NULL;
147  }
148  break;
149  case DNS_RESPONSE_ANSWER:
150  if (!SCDnsTxGetAnswerName(
151  det_ctx, txv, STREAM_TOCLIENT, cbdata->response_id, &data, &data_len)) {
153  return NULL;
154  }
155  break;
157  if (!SCDnsTxGetAuthorityName(
158  det_ctx, txv, 0, cbdata->response_id, &data, &data_len)) {
160  return NULL;
161  }
162  break;
164  if (!SCDnsTxGetAdditionalName(
165  det_ctx, txv, 0, cbdata->response_id, &data, &data_len)) {
167  return NULL;
168  }
169  break;
170  default:
172  return NULL;
173  }
174  }
175 
176  InspectionBufferSetupMulti(det_ctx, buffer, transforms, data, data_len);
177  buffer->flags = DETECT_CI_FLAGS_SINGLE;
178  return buffer;
179 }
180 
181 static inline uint8_t CheckSectionRecords(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
182  const struct DetectEngineAppInspectionEngine_ *engine, const Signature *s, Flow *f,
183  uint8_t flags, void *txv, const DetectEngineTransforms *transforms, uint32_t *local_id,
184  enum DnsResponseSection section)
185 {
186  uint32_t response_id = 0;
187 
188  /* loop through each record in DNS response section inspecting "name" and "rdata" */
189  while (1) {
190  struct DnsResponseGetDataArgs cbdata = { section, response_id, *local_id };
191 
192  /* do inspection for resource record "name" */
193  InspectionBuffer *buffer =
194  GetBuffer(det_ctx, flags, transforms, txv, &cbdata, engine->sm_list, false);
195  if (buffer == NULL || buffer->inspect == NULL) {
196  (*local_id)++;
197  break;
198  }
199 
200  if (DetectEngineContentInspectionBuffer(de_ctx, det_ctx, s, engine->smd, NULL, f, buffer,
203  }
204 
205  (*local_id)++;
206  if (section == DNS_RESPONSE_QUERY) {
207  /* no rdata to inspect for query section, move on to next record */
208  response_id++;
209  continue;
210  }
211 
212  /* do inspection for resource record "rdata" */
213  cbdata.local_id = *local_id;
214  buffer = GetBuffer(det_ctx, flags, transforms, txv, &cbdata, engine->sm_list, true);
215  if (buffer == NULL || buffer->inspect == NULL) {
216  (*local_id)++;
217  response_id++;
218  continue;
219  }
220 
221  if (DetectEngineContentInspectionBuffer(de_ctx, det_ctx, s, engine->smd, NULL, f, buffer,
224  }
225  (*local_id)++;
226  response_id++;
227  }
229 }
230 
231 static inline void CheckSectionRecordsPrefilter(DetectEngineThreadCtx *det_ctx, const void *pectx,
232  void *txv, const uint8_t flags, uint32_t *local_id, enum DnsResponseSection section)
233 {
234  const PrefilterMpm *ctx = (const PrefilterMpm *)pectx;
235  const MpmCtx *mpm_ctx = ctx->mpm_ctx;
236  const int list_id = ctx->list_id;
237  uint32_t response_id = 0;
238 
239  while (1) {
240  struct DnsResponseGetDataArgs cbdata = { section, response_id, *local_id };
241 
242  /* extract resource record "name" */
243  InspectionBuffer *buffer =
244  GetBuffer(det_ctx, flags, ctx->transforms, txv, &cbdata, list_id, false);
245  if (buffer == NULL) {
246  (*local_id)++;
247  break;
248  }
249 
250  if (buffer->inspect_len >= mpm_ctx->minlen) {
251  (void)mpm_table[mpm_ctx->mpm_type].Search(
252  mpm_ctx, &det_ctx->mtc, &det_ctx->pmq, buffer->inspect, buffer->inspect_len);
253  PREFILTER_PROFILING_ADD_BYTES(det_ctx, buffer->inspect_len);
254  }
255 
256  (*local_id)++;
257  if (section == DNS_RESPONSE_QUERY) {
258  /* no rdata to inspect for query section, move on to next name entry */
259  response_id++;
260  continue;
261  }
262 
263  /* extract resource record "rdata" */
264  cbdata.local_id = *local_id;
265  buffer = GetBuffer(det_ctx, flags, ctx->transforms, txv, &cbdata, list_id, true);
266  if (buffer == NULL) {
267  (*local_id)++;
268  response_id++;
269  continue;
270  }
271 
272  if (buffer->inspect_len >= mpm_ctx->minlen) {
273  (void)mpm_table[mpm_ctx->mpm_type].Search(
274  mpm_ctx, &det_ctx->mtc, &det_ctx->pmq, buffer->inspect, buffer->inspect_len);
275  PREFILTER_PROFILING_ADD_BYTES(det_ctx, buffer->inspect_len);
276  }
277  (*local_id)++;
278  response_id++;
279  }
280 }
281 
282 static uint8_t DetectEngineInspectCb(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
283  const struct DetectEngineAppInspectionEngine_ *engine, const Signature *s, Flow *f,
284  uint8_t flags, void *alstate, void *txv, uint64_t tx_id)
285 {
286  const DetectEngineTransforms *transforms = NULL;
287  if (!engine->mpm) {
288  transforms = engine->v2.transforms;
289  }
290 
291  uint32_t local_id = 0;
292  uint8_t ret_match = DETECT_ENGINE_INSPECT_SIG_NO_MATCH;
293 
294  /* loop through each possible DNS response section */
295  for (enum DnsResponseSection section = DNS_RESPONSE_QUERY;
296  section < DNS_RESPONSE_MAX && ret_match == DETECT_ENGINE_INSPECT_SIG_NO_MATCH;
297  section++) {
298 
299  /* check each record in section inspecting "name" and "rdata" */
300  ret_match = CheckSectionRecords(
301  de_ctx, det_ctx, engine, s, f, flags, txv, transforms, &local_id, section);
302  }
303  return ret_match;
304 }
305 
306 static void DetectDnsResponsePrefilterTx(DetectEngineThreadCtx *det_ctx, const void *pectx,
307  Packet *p, Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd,
308  const uint8_t flags)
309 {
310  SCEnter();
311 
312  uint32_t local_id = 0;
313  /* loop through each possible DNS response section */
314  for (enum DnsResponseSection section = DNS_RESPONSE_QUERY; section < DNS_RESPONSE_MAX;
315  section++) {
316  /* check each record in section inspecting "name" and "rdata" */
317  CheckSectionRecordsPrefilter(det_ctx, pectx, txv, flags, &local_id, section);
318  }
319 }
320 
321 static void DetectDnsResponsePrefilterMpmFree(void *ptr)
322 {
323  SCFree(ptr);
324 }
325 
326 static int DetectDnsResponsePrefilterMpmRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
327  MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
328 {
329  PrefilterMpm *pectx = SCCalloc(1, sizeof(*pectx));
330  if (pectx == NULL) {
331  return -1;
332  }
333  pectx->list_id = list_id;
334  pectx->mpm_ctx = mpm_ctx;
335  pectx->transforms = &mpm_reg->transforms;
336 
337  return PrefilterAppendTxEngine(de_ctx, sgh, DetectDnsResponsePrefilterTx,
338  mpm_reg->app_v2.alproto, mpm_reg->app_v2.tx_min_progress, pectx,
339  DetectDnsResponsePrefilterMpmFree, mpm_reg->pname);
340 }
341 
342 static void SCDetectMdnsResponseRrnameRegister(void)
343 {
344  static const char *keyword = "mdns.response.rrname";
345  int keyword_id = SCDetectHelperNewKeywordId();
346  sigmatch_table[keyword_id].name = keyword;
347  sigmatch_table[keyword_id].desc = "mDNS response rrname buffer";
348  sigmatch_table[keyword_id].url = "/rules/mdns-keywords.html#mdns-response-rrname";
349  sigmatch_table[keyword_id].Setup = MdnsDetectSetup;
350  sigmatch_table[keyword_id].flags |= SIGMATCH_NOOPT;
352 
353  /* Register in the TO_SERVER direction, as all mDNS is toserver. */
355  keyword, ALPROTO_MDNS, SIG_FLAG_TOSERVER, 1, DetectEngineInspectCb, NULL);
356  DetectAppLayerMpmRegister(keyword, SIG_FLAG_TOSERVER, 2, DetectDnsResponsePrefilterMpmRegister,
357  NULL, ALPROTO_MDNS, 1);
358 
359  DetectBufferTypeSetDescriptionByName(keyword, "mdns response rdata");
361 
362  mdns_detect_buffer_id = DetectBufferTypeGetByName(keyword);
363 }
364 
365 static void SCDetectLlmnrResponseRrnameRegister(void)
366 {
367  static const char *keyword = "llmnr.response.rrname";
368  int keyword_id = SCDetectHelperNewKeywordId();
369  sigmatch_table[keyword_id].name = keyword;
370  sigmatch_table[keyword_id].desc = "LLMNR response rrname buffer";
371  sigmatch_table[keyword_id].url = "/rules/llmnr-keywords.html#llmnr-response-rrname";
372  sigmatch_table[keyword_id].Setup = LlmnrDetectSetup;
373  sigmatch_table[keyword_id].flags |= SIGMATCH_NOOPT;
375 
377  keyword, ALPROTO_LLMNR, SIG_FLAG_TOCLIENT, 1, DetectEngineInspectCb, NULL);
378  DetectAppLayerMpmRegister(keyword, SIG_FLAG_TOCLIENT, 2, DetectDnsResponsePrefilterMpmRegister,
379  NULL, ALPROTO_LLMNR, 1);
380 
381  DetectBufferTypeSetDescriptionByName(keyword, "llmnr response rdata");
383 
384  llmnr_detect_buffer_id = DetectBufferTypeGetByName(keyword);
385 }
386 
388 {
389  static const char *keyword = "dns.response.rrname";
391  sigmatch_table[DETECT_DNS_RESPONSE].desc = "DNS response sticky buffer";
392  sigmatch_table[DETECT_DNS_RESPONSE].url = "/rules/dns-keywords.html#dns-response-rrname";
396 
397  /* Register in the TO_CLIENT direction. */
399  keyword, ALPROTO_DNS, SIG_FLAG_TOCLIENT, 1, DetectEngineInspectCb, NULL);
400  DetectAppLayerMpmRegister(keyword, SIG_FLAG_TOCLIENT, 2, DetectDnsResponsePrefilterMpmRegister,
401  NULL, ALPROTO_DNS, 1);
402 
403  DetectBufferTypeSetDescriptionByName(keyword, "dns response rrname");
405 
406  detect_buffer_id = DetectBufferTypeGetByName(keyword);
407 
408  SCDetectMdnsResponseRrnameRegister();
409  SCDetectLlmnrResponseRrnameRegister();
410 }
DetectEngineAppInspectionEngine_
Definition: detect.h:416
SigTableElmt_::url
const char * url
Definition: detect.h:1512
DnsResponseGetDataArgs::response_section
enum DnsResponseSection response_section
Definition: detect-dns-response.c:57
DNS_RESPONSE_MAX
@ DNS_RESPONSE_MAX
Definition: detect-dns-response.c:53
DetectEngineAppInspectionEngine_::mpm
bool mpm
Definition: detect.h:420
MpmCtx_::mpm_type
uint8_t mpm_type
Definition: util-mpm.h:99
DetectEngineAppInspectionEngine_::v2
struct DetectEngineAppInspectionEngine_::@82 v2
detect-engine.h
SIGMATCH_NOOPT
#define SIGMATCH_NOOPT
Definition: detect-engine-register.h:306
SigTableElmt_::desc
const char * desc
Definition: detect.h:1511
sigmatch_table
SigTableElmt * sigmatch_table
Definition: detect-parse.c:79
SCDetectHelperNewKeywordId
int SCDetectHelperNewKeywordId(void)
Definition: detect-engine-helper.c:125
ALPROTO_DNS
@ ALPROTO_DNS
Definition: app-layer-protos.h:47
SigTableElmt_::name
const char * name
Definition: detect.h:1509
InspectionBuffer::initialized
bool initialized
Definition: detect-engine-inspect-buffer.h:38
SigGroupHead_
Container for matching data for a signature group.
Definition: detect.h:1679
DnsResponseGetDataArgs::response_id
uint32_t response_id
Definition: detect-dns-response.c:58
DetectEngineTransforms
Definition: detect.h:391
PrefilterMpm::list_id
int list_id
Definition: detect-dns-response.c:41
SigTableElmt_::flags
uint32_t flags
Definition: detect.h:1500
DetectBufferMpmRegistry_::app_v2
struct DetectBufferMpmRegistry_::@90::@92 app_v2
InspectionBuffer
Definition: detect-engine-inspect-buffer.h:34
Flow_
Flow data structure.
Definition: flow.h:354
DetectEngineThreadCtx_::pmq
PrefilterRuleStore pmq
Definition: detect.h:1399
ctx
struct Thresholds ctx
DetectEngineCtx_
main detection engine ctx
Definition: detect.h:973
DnsResponseSection
DnsResponseSection
Definition: detect-dns-response.c:46
DetectBufferTypeSupportsMultiInstance
void DetectBufferTypeSupportsMultiInstance(const char *name)
Definition: detect-engine.c:1289
rust.h
DetectBufferMpmRegistry_
one time registration of keywords at start up
Definition: detect.h:770
InspectionBuffer::flags
uint8_t flags
Definition: detect-engine-inspect-buffer.h:39
SCDetectBufferSetActiveList
int SCDetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list)
Definition: detect-engine-buffer.c:29
p
Packet * p
Definition: fuzz_iprep.c:21
SCDetectSignatureSetAppProto
int SCDetectSignatureSetAppProto(Signature *s, AppProto alproto)
Definition: detect-parse.c:2301
SIG_FLAG_TOCLIENT
#define SIG_FLAG_TOCLIENT
Definition: detect.h:271
DNS_RESPONSE_AUTHORITY
@ DNS_RESPONSE_AUTHORITY
Definition: detect-dns-response.c:49
SigTableElmt_::Setup
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
Definition: detect.h:1491
DetectBufferMpmRegistry_::transforms
DetectEngineTransforms transforms
Definition: detect.h:783
detect-engine-prefilter.h
DetectBufferTypeGetByName
int DetectBufferTypeGetByName(const char *name)
Definition: detect-engine.c:1339
DetectEngineAppInspectionEngine_::sm_list
uint16_t sm_list
Definition: detect.h:424
SIG_FLAG_TOSERVER
#define SIG_FLAG_TOSERVER
Definition: detect.h:270
DetectBufferMpmRegistry_::pname
char pname[DETECT_PROFILE_NAME_LEN]
Definition: detect.h:772
AppLayerTxData
Definition: app-layer-parser.h:163
de_ctx
DetectEngineCtx * de_ctx
Definition: fuzz_siginit.c:22
DetectEngineThreadCtx_
Definition: detect.h:1291
DnsResponseGetDataArgs
Definition: detect-dns-response.c:56
SCEnter
#define SCEnter(...)
Definition: util-debug.h:284
detect-engine-mpm.h
detect.h
DETECT_ENGINE_INSPECT_SIG_MATCH
#define DETECT_ENGINE_INSPECT_SIG_MATCH
Definition: detect-engine-state.h:41
DETECT_ENGINE_CONTENT_INSPECTION_MODE_STATE
@ DETECT_ENGINE_CONTENT_INSPECTION_MODE_STATE
Definition: detect-engine-content-inspection.h:36
detect-engine-helper.h
DetectAppLayerMpmRegister
void DetectAppLayerMpmRegister(const char *name, int direction, int priority, PrefilterRegisterFunc PrefilterRegister, InspectionBufferGetDataPtr GetData, AppProto alproto, int tx_min_progress)
register an app layer keyword for mpm
Definition: detect-engine-mpm.c:152
MpmCtx_::minlen
uint16_t minlen
Definition: util-mpm.h:108
util-profiling.h
Packet_
Definition: decode.h:514
DETECT_DNS_RESPONSE
@ DETECT_DNS_RESPONSE
Definition: detect-engine-register.h:232
MpmTableElmt_::Search
uint32_t(* Search)(const struct MpmCtx_ *, struct MpmThreadCtx_ *, PrefilterRuleStore *, const uint8_t *, uint32_t)
Definition: util-mpm.h:186
DNS_RESPONSE_ANSWER
@ DNS_RESPONSE_ANSWER
Definition: detect-dns-response.c:48
DetectEngineThreadCtx_::mtc
MpmThreadCtx mtc
Definition: detect.h:1395
PrefilterMpm::transforms
const DetectEngineTransforms * transforms
Definition: detect-dns-response.c:43
detect-engine-content-inspection.h
DetectEngineAppInspectionEngine_::smd
SigMatchData * smd
Definition: detect.h:439
PREFILTER_PROFILING_ADD_BYTES
#define PREFILTER_PROFILING_ADD_BYTES(det_ctx, bytes)
Definition: util-profiling.h:286
ALPROTO_LLMNR
@ ALPROTO_LLMNR
Definition: app-layer-protos.h:73
DETECT_CI_FLAGS_SINGLE
#define DETECT_CI_FLAGS_SINGLE
Definition: detect-engine-content-inspection.h:50
flags
uint8_t flags
Definition: decode-gre.h:0
detect-engine-buffer.h
PrefilterAppendTxEngine
int PrefilterAppendTxEngine(DetectEngineCtx *de_ctx, SigGroupHead *sgh, PrefilterTxFn PrefilterTxFunc, AppProto alproto, int tx_min_progress, void *pectx, void(*FreeFunc)(void *pectx), const char *name)
Definition: detect-engine-prefilter.c:355
DETECT_ENGINE_INSPECT_SIG_NO_MATCH
#define DETECT_ENGINE_INSPECT_SIG_NO_MATCH
Definition: detect-engine-state.h:40
DnsResponseGetDataArgs::local_id
uint32_t local_id
Definition: detect-dns-response.c:59
InspectionBuffer::inspect_len
uint32_t inspect_len
Definition: detect-engine-inspect-buffer.h:37
PrefilterMpm::mpm_ctx
const MpmCtx * mpm_ctx
Definition: detect-dns-response.c:42
InspectionBuffer::inspect
const uint8_t * inspect
Definition: detect-engine-inspect-buffer.h:35
str
#define str(s)
Definition: suricata-common.h:316
SCFree
#define SCFree(p)
Definition: util-mem.h:61
ALPROTO_MDNS
@ ALPROTO_MDNS
Definition: app-layer-protos.h:72
detect-parse.h
Signature_
Signature container.
Definition: detect.h:675
DetectEngineAppInspectionEngine_::transforms
const DetectEngineTransforms * transforms
Definition: detect.h:436
SIGMATCH_INFO_STICKY_BUFFER
#define SIGMATCH_INFO_STICKY_BUFFER
Definition: detect-engine-register.h:328
DNS_RESPONSE_QUERY
@ DNS_RESPONSE_QUERY
Definition: detect-dns-response.c:47
mpm_table
MpmTableElmt mpm_table[MPM_TABLE_SIZE]
Definition: util-mpm.c:47
InspectionBufferSetupMultiEmpty
void InspectionBufferSetupMultiEmpty(InspectionBuffer *buffer)
setup the buffer empty
Definition: detect-engine-inspect-buffer.c:144
detect-dns-response.h
DetectAppLayerInspectEngineRegister
void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr Callback, InspectionBufferGetDataPtr GetData)
Registers an app inspection engine.
Definition: detect-engine.c:273
DetectEngineContentInspectionBuffer
bool DetectEngineContentInspectionBuffer(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const Signature *s, const SigMatchData *smd, Packet *p, Flow *f, const InspectionBuffer *b, const enum DetectContentInspectionType inspection_mode)
wrapper around DetectEngineContentInspectionInternal to return true/false only
Definition: detect-engine-content-inspection.c:772
PrefilterMpm
struct PrefilterMpm PrefilterMpm
DetectDnsResponseRegister
void DetectDnsResponseRegister(void)
Definition: detect-dns-response.c:387
DetectBufferTypeSetDescriptionByName
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)
Definition: detect-engine.c:1436
MpmCtx_
Definition: util-mpm.h:97
SCCalloc
#define SCCalloc(nm, sz)
Definition: util-mem.h:53
PrefilterMpm
Definition: detect-dns-response.c:40
DNS_RESPONSE_ADDITIONAL
@ DNS_RESPONSE_ADDITIONAL
Definition: detect-dns-response.c:50
InspectionBufferSetupMulti
void InspectionBufferSetupMulti(DetectEngineThreadCtx *det_ctx, InspectionBuffer *buffer, const DetectEngineTransforms *transforms, const uint8_t *data, const uint32_t data_len)
setup the buffer with our initial data
Definition: detect-engine-inspect-buffer.c:157
InspectionBufferMultipleForListGet
InspectionBuffer * InspectionBufferMultipleForListGet(DetectEngineThreadCtx *det_ctx, const int list_id, const uint32_t local_id)
for a InspectionBufferMultipleForList get a InspectionBuffer
Definition: detect-engine-inspect-buffer.c:76