44static int query_buffer_id = 0;
45static int answer_buffer_id = 0;
46static int authority_buffer_id = 0;
47static int additional_buffer_id = 0;
49static int mdns_query_buffer_id = 0;
50static int mdns_answer_buffer_id = 0;
51static int mdns_authority_buffer_id = 0;
52static int mdns_additional_buffer_id = 0;
68 return DetectSetup(
de_ctx, s,
str, query_buffer_id);
73 return DetectSetup(
de_ctx, s,
str, answer_buffer_id);
78 return DetectSetup(
de_ctx, s,
str, additional_buffer_id);
83 return DetectSetup(
de_ctx, s,
str, authority_buffer_id);
88 return DetectSetup(
de_ctx, s,
str, mdns_query_buffer_id);
93 return DetectSetup(
de_ctx, s,
str, mdns_answer_buffer_id);
98 return DetectSetup(
de_ctx, s,
str, mdns_additional_buffer_id);
103 return DetectSetup(
de_ctx, s,
str, mdns_authority_buffer_id);
106static int Register(
const char *keyword,
const char *desc,
const char *doc,
129 query_buffer_id = Register(
"dns.queries.rrname",
"DNS query rrname sticky buffer",
130 "/rules/dns-keywords.html#dns.queries.rrname", SetupQueryBuffer, SCDnsTxGetQueryName,
132 answer_buffer_id = Register(
"dns.answers.rrname",
"DNS answer rrname sticky buffer",
133 "/rules/dns-keywords.html#dns.answers.rrname", SetupAnswerBuffer, SCDnsTxGetAnswerName,
135 additional_buffer_id =
136 Register(
"dns.additionals.rrname",
"DNS additionals rrname sticky buffer",
137 "/rules/dns-keywords.html#dns-additionals-rrname", SetupAdditionalsBuffer,
139 authority_buffer_id = Register(
"dns.authorities.rrname",
"DNS authorities rrname sticky buffer",
140 "/rules/dns-keywords.html#dns-authorities-rrname", SetupAuthoritiesBuffer,
143 mdns_query_buffer_id = Register(
"mdns.queries.rrname",
"mDNS query rrname sticky buffer",
144 "/rules/mdns-keywords.html#mdns.queries.rrname", SetupQueryBufferMdns,
146 mdns_answer_buffer_id = Register(
"mdns.answers.rrname",
"mDNS answer rrname sticky buffer",
147 "/rules/mdns-keywords.html#mdns.answers.rrname", SetupAnswerBufferMdns,
149 mdns_additional_buffer_id =
150 Register(
"mdns.additionals.rrname",
"mDNS additionals rrname sticky buffer",
151 "/rules/mdns-keywords.html#mdns-additionals-rrname", SetupAdditionalsBufferMdns,
153 mdns_authority_buffer_id =
154 Register(
"mdns.authorities.rrname",
"mDNS authorities rrname sticky buffer",
155 "/rules/mdns-keywords.html#mdns-authorities-rrname", SetupAuthoritiesBufferMdns,
void DetectDnsNameRegister(void)
int SCDetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list)
int SCDetectHelperNewKeywordId(void)
bool(* InspectionMultiBufferGetDataPtr)(struct DetectEngineThreadCtx_ *det_ctx, const void *txv, const uint8_t flow_flags, uint32_t local_id, const uint8_t **buf, uint32_t *buf_len)
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)
void DetectBufferTypeSupportsMultiInstance(const char *name)
void DetectAppLayerMultiRegister(const char *name, AppProto alproto, uint32_t dir, int progress, InspectionMultiBufferGetDataPtr GetData, int priority)
int DetectBufferTypeGetByName(const char *name)
int SCDetectSignatureSetAppProto(Signature *s, AppProto alproto)
SigTableElmt * sigmatch_table
#define SIG_FLAG_TOCLIENT
#define SIGMATCH_INFO_STICKY_BUFFER
#define SIG_FLAG_TOSERVER
main detection engine ctx
int(* Setup)(DetectEngineCtx *, Signature *, const char *)