36 static int detect_buffer_id = 0;
37 static int mdns_detect_buffer_id = 0;
87 int list_id,
bool get_rdata)
98 const uint8_t *data = NULL;
99 uint32_t data_len = 0;
105 if (!SCDnsTxGetAnswerRdata(txv, cbdata->
response_id, &data, &data_len)) {
111 if (!SCDnsTxGetAuthorityRdata(txv, cbdata->
response_id, &data, &data_len)) {
117 if (!SCDnsTxGetAdditionalRdata(txv, cbdata->
response_id, &data, &data_len)) {
130 if (!SCDnsTxGetQueryName(
131 det_ctx, txv, STREAM_TOCLIENT, cbdata->
response_id, &data, &data_len)) {
137 if (!SCDnsTxGetAnswerName(
138 det_ctx, txv, STREAM_TOCLIENT, cbdata->
response_id, &data, &data_len)) {
144 if (!SCDnsTxGetAuthorityName(
145 det_ctx, txv, 0, cbdata->
response_id, &data, &data_len)) {
151 if (!SCDnsTxGetAdditionalName(
152 det_ctx, txv, 0, cbdata->
response_id, &data, &data_len)) {
173 uint32_t response_id = 0;
181 GetBuffer(det_ctx,
flags, transforms, txv, &cbdata, engine->
sm_list,
false);
182 if (buffer == NULL || buffer->
inspect == NULL) {
201 buffer = GetBuffer(det_ctx,
flags, transforms, txv, &cbdata, engine->
sm_list,
true);
202 if (buffer == NULL || buffer->
inspect == NULL) {
223 const int list_id =
ctx->list_id;
231 GetBuffer(det_ctx,
flags,
ctx->transforms, txv, &cbdata, list_id,
false);
232 if (buffer == NULL) {
252 buffer = GetBuffer(det_ctx,
flags,
ctx->transforms, txv, &cbdata, list_id,
true);
253 if (buffer == NULL) {
271 uint8_t
flags,
void *alstate,
void *txv, uint64_t tx_id)
287 ret_match = CheckSectionRecords(
304 CheckSectionRecordsPrefilter(det_ctx, pectx, txv,
flags, &
local_id, section);
308 static void DetectDnsResponsePrefilterMpmFree(
void *ptr)
325 mpm_reg->
app_v2.alproto, mpm_reg->
app_v2.tx_min_progress, pectx,
326 DetectDnsResponsePrefilterMpmFree, mpm_reg->
pname);
329 static void SCDetectMdnsResponseRrnameRegister(
void)
331 static const char *keyword =
"mdns.response.rrname";
335 sigmatch_table[keyword_id].
url =
"/rules/mdns-keywords.html#mdns-response-rrname";
354 static const char *keyword =
"dns.response.rrname";
373 SCDetectMdnsResponseRrnameRegister();