36 static int detect_buffer_id = 0;
37 static int mdns_detect_buffer_id = 0;
38 static int llmnr_detect_buffer_id = 0;
100 int list_id,
bool get_rdata)
104 if (buffer == NULL) {
111 const uint8_t *data = NULL;
112 uint32_t data_len = 0;
118 if (!SCDnsTxGetAnswerRdata(txv, cbdata->
response_id, &data, &data_len)) {
124 if (!SCDnsTxGetAuthorityRdata(txv, cbdata->
response_id, &data, &data_len)) {
130 if (!SCDnsTxGetAdditionalRdata(txv, cbdata->
response_id, &data, &data_len)) {
143 if (!SCDnsTxGetQueryName(
144 det_ctx, txv, STREAM_TOCLIENT, cbdata->
response_id, &data, &data_len)) {
150 if (!SCDnsTxGetAnswerName(
151 det_ctx, txv, STREAM_TOCLIENT, cbdata->
response_id, &data, &data_len)) {
157 if (!SCDnsTxGetAuthorityName(
158 det_ctx, txv, 0, cbdata->
response_id, &data, &data_len)) {
164 if (!SCDnsTxGetAdditionalName(
165 det_ctx, txv, 0, cbdata->
response_id, &data, &data_len)) {
186 uint32_t response_id = 0;
194 GetBuffer(det_ctx,
flags, transforms, txv, &cbdata, engine->
sm_list,
false);
195 if (buffer == NULL || buffer->
inspect == NULL) {
214 buffer = GetBuffer(det_ctx,
flags, transforms, txv, &cbdata, engine->
sm_list,
true);
215 if (buffer == NULL || buffer->
inspect == NULL) {
236 const int list_id =
ctx->list_id;
244 GetBuffer(det_ctx,
flags,
ctx->transforms, txv, &cbdata, list_id,
false);
245 if (buffer == NULL) {
265 buffer = GetBuffer(det_ctx,
flags,
ctx->transforms, txv, &cbdata, list_id,
true);
266 if (buffer == NULL) {
284 uint8_t
flags,
void *alstate,
void *txv, uint64_t tx_id)
300 ret_match = CheckSectionRecords(
317 CheckSectionRecordsPrefilter(det_ctx, pectx, txv,
flags, &
local_id, section);
321 static void DetectDnsResponsePrefilterMpmFree(
void *ptr)
338 mpm_reg->
app_v2.alproto, mpm_reg->
app_v2.tx_min_progress, pectx,
339 DetectDnsResponsePrefilterMpmFree, mpm_reg->
pname);
342 static void SCDetectMdnsResponseRrnameRegister(
void)
344 static const char *keyword =
"mdns.response.rrname";
348 sigmatch_table[keyword_id].
url =
"/rules/mdns-keywords.html#mdns-response-rrname";
365 static void SCDetectLlmnrResponseRrnameRegister(
void)
367 static const char *keyword =
"llmnr.response.rrname";
371 sigmatch_table[keyword_id].
url =
"/rules/llmnr-keywords.html#llmnr-response-rrname";
389 static const char *keyword =
"dns.response.rrname";
408 SCDetectMdnsResponseRrnameRegister();
409 SCDetectLlmnrResponseRrnameRegister();