-
Notifications
You must be signed in to change notification settings - Fork 219
/
outgoing.pxd
147 lines (104 loc) · 4.18 KB
/
outgoing.pxd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
import cython
from .._cache cimport DNSCache
from .._dns cimport DNSEntry, DNSPointer, DNSQuestion, DNSRecord
from .incoming cimport DNSIncoming
cdef cython.uint _CLASS_UNIQUE
cdef cython.uint _DNS_PACKET_HEADER_LEN
cdef cython.uint _FLAGS_QR_MASK
cdef cython.uint _FLAGS_QR_QUERY
cdef cython.uint _FLAGS_QR_RESPONSE
cdef cython.uint _FLAGS_TC
cdef cython.uint _MAX_MSG_ABSOLUTE
cdef cython.uint _MAX_MSG_TYPICAL
cdef bint TYPE_CHECKING
cdef unsigned int SHORT_CACHE_MAX
cdef object PACK_BYTE
cdef object PACK_SHORT
cdef object PACK_LONG
cdef unsigned int STATE_INIT
cdef unsigned int STATE_FINISHED
cdef object LOGGING_IS_ENABLED_FOR
cdef object LOGGING_DEBUG
cdef cython.tuple BYTE_TABLE
cdef cython.tuple SHORT_LOOKUP
cdef cython.dict LONG_LOOKUP
cdef class DNSOutgoing:
cdef public unsigned int flags
cdef public bint finished
cdef public object id
cdef public bint multicast
cdef public cython.list packets_data
cdef public cython.dict names
cdef public cython.list data
cdef public unsigned int size
cdef public bint allow_long
cdef public unsigned int state
cdef public cython.list questions
cdef public cython.list answers
cdef public cython.list authorities
cdef public cython.list additionals
cpdef _reset_for_next_packet(self)
cdef _write_byte(self, cython.uint value)
cdef void _insert_short_at_start(self, unsigned int value)
cdef _replace_short(self, cython.uint index, cython.uint value)
cdef _get_short(self, cython.uint value)
cdef _write_int(self, object value)
cdef cython.bint _write_question(self, DNSQuestion question)
@cython.locals(
d=cython.bytes,
data_view=cython.list,
index=cython.uint,
length=cython.uint
)
cdef cython.bint _write_record(self, DNSRecord record, double now)
@cython.locals(class_=cython.uint)
cdef _write_record_class(self, DNSEntry record)
@cython.locals(
start_size_int=object
)
cdef cython.bint _check_data_limit_or_rollback(self, cython.uint start_data_length, cython.uint start_size)
@cython.locals(questions_written=cython.uint)
cdef cython.uint _write_questions_from_offset(self, unsigned int questions_offset)
@cython.locals(answers_written=cython.uint)
cdef cython.uint _write_answers_from_offset(self, unsigned int answer_offset)
@cython.locals(records_written=cython.uint)
cdef cython.uint _write_records_from_offset(self, cython.list records, unsigned int offset)
cdef bint _has_more_to_add(self, unsigned int questions_offset, unsigned int answer_offset, unsigned int authority_offset, unsigned int additional_offset)
cdef _write_ttl(self, DNSRecord record, double now)
@cython.locals(
labels=cython.list,
label=cython.str,
index=cython.uint,
start_size=cython.uint,
name_length=cython.uint,
)
cpdef write_name(self, cython.str name)
cdef _write_link_to_name(self, unsigned int index)
cpdef write_short(self, cython.uint value)
cpdef write_string(self, cython.bytes value)
@cython.locals(utfstr=bytes)
cpdef _write_utf(self, cython.str value)
@cython.locals(
debug_enable=bint,
made_progress=bint,
has_more_to_add=bint,
questions_offset="unsigned int",
answer_offset="unsigned int",
authority_offset="unsigned int",
additional_offset="unsigned int",
questions_written="unsigned int",
answers_written="unsigned int",
authorities_written="unsigned int",
additionals_written="unsigned int",
)
cpdef packets(self)
cpdef add_question_or_all_cache(self, DNSCache cache, double now, str name, object type_, object class_)
cpdef add_question_or_one_cache(self, DNSCache cache, double now, str name, object type_, object class_)
cpdef add_question(self, DNSQuestion question)
cpdef add_answer(self, DNSIncoming inp, DNSRecord record)
@cython.locals(now_double=double)
cpdef add_answer_at_time(self, DNSRecord record, double now)
cpdef add_authorative_answer(self, DNSPointer record)
cpdef add_additional_answer(self, DNSRecord record)
cpdef bint is_query(self)
cpdef bint is_response(self)