@@ -18,6 +18,23 @@ cdef cython.set _ADDRESS_RECORD_TYPES
1818cdef object IPVersion, _IPVersion_ALL
1919cdef object _TYPE_PTR, _CLASS_IN, _DNS_OTHER_TTL
2020
21+ cdef unsigned int _ANSWER_STRATEGY_SERVICE_TYPE_ENUMERATION
22+ cdef unsigned int _ANSWER_STRATEGY_POINTER
23+ cdef unsigned int _ANSWER_STRATEGY_ADDRESS
24+ cdef unsigned int _ANSWER_STRATEGY_SERVICE
25+ cdef unsigned int _ANSWER_STRATEGY_TEXT
26+
27+ cdef list _EMPTY_SERVICES_LIST
28+ cdef list _EMPTY_TYPES_LIST
29+
30+ cdef class _AnswerStrategy:
31+
32+ cdef public DNSQuestion question
33+ cdef public unsigned int strategy_type
34+ cdef public list types
35+ cdef public list services
36+
37+
2138cdef class _QueryResponse:
2239
2340 cdef bint _is_probe
@@ -53,24 +70,30 @@ cdef class QueryHandler:
5370 cdef QuestionHistory question_history
5471
5572 @ cython.locals (service = ServiceInfo)
56- cdef _add_service_type_enumeration_query_answers(self , cython.dict answer_set, DNSRRSet known_answers)
73+ cdef _add_service_type_enumeration_query_answers(self , list types, cython.dict answer_set, DNSRRSet known_answers)
5774
5875 @ cython.locals (service = ServiceInfo)
59- cdef _add_pointer_answers(self , str lower_name , cython.dict answer_set, DNSRRSet known_answers)
76+ cdef _add_pointer_answers(self , list services , cython.dict answer_set, DNSRRSet known_answers)
6077
6178 @ cython.locals (service = ServiceInfo, dns_address = DNSAddress)
62- cdef _add_address_answers(self , str lower_name , cython.dict answer_set, DNSRRSet known_answers, cython.uint type_)
79+ cdef _add_address_answers(self , list services , cython.dict answer_set, DNSRRSet known_answers, cython.uint type_)
6380
6481 @ cython.locals (question_lower_name = str , type_ = cython.uint, service = ServiceInfo)
65- cdef cython.dict _answer_question(self , DNSQuestion question, DNSRRSet known_answers)
82+ cdef cython.dict _answer_question(self , DNSQuestion question, unsigned int strategy_type, list types, list services, DNSRRSet known_answers)
6683
6784 @ cython.locals (
6885 msg = DNSIncoming,
86+ msgs = list ,
87+ strategy = _AnswerStrategy,
6988 question = DNSQuestion,
7089 answer_set = cython.dict,
7190 known_answers = DNSRRSet,
7291 known_answers_set = cython.set,
92+ is_unicast = bint,
7393 is_probe = object ,
74- now = object
94+ now = float
7595 )
7696 cpdef async_response(self , cython.list msgs, cython.bint unicast_source)
97+
98+ @ cython.locals (name = str , question_lower_name = str )
99+ cdef _get_answer_strategies(self , DNSQuestion question)
0 commit comments