/
incoming.pxd
88 lines (68 loc) · 2.07 KB
/
incoming.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
import cython
cdef cython.uint DNS_COMPRESSION_HEADER_LEN
cdef cython.uint MAX_DNS_LABELS
cdef cython.uint DNS_COMPRESSION_POINTER_LEN
cdef cython.uint MAX_NAME_LENGTH
cdef cython.uint _TYPE_A
cdef cython.uint _TYPE_CNAME
cdef cython.uint _TYPE_PTR
cdef cython.uint _TYPE_TXT
cdef cython.uint _TYPE_SRV
cdef cython.uint _TYPE_HINFO
cdef cython.uint _TYPE_AAAA
cdef cython.uint _TYPE_NSEC
cdef cython.uint _FLAGS_QR_MASK
cdef cython.uint _FLAGS_QR_MASK
cdef cython.uint _FLAGS_TC
cdef cython.uint _FLAGS_QR_QUERY
cdef cython.uint _FLAGS_QR_RESPONSE
cdef object UNPACK_3H
cdef object UNPACK_6H
cdef object UNPACK_HH
cdef object UNPACK_HHiH
cdef object DECODE_EXCEPTIONS
cdef object IncomingDecodeError
cdef class DNSIncoming:
cdef bint _did_read_others
cdef public unsigned int flags
cdef unsigned int offset
cdef public bytes data
cdef unsigned int _data_len
cdef public object name_cache
cdef public object questions
cdef object _answers
cdef public object id
cdef public cython.uint num_questions
cdef public cython.uint num_answers
cdef public cython.uint num_authorities
cdef public cython.uint num_additionals
cdef public object valid
cdef public object now
cdef public object scope_id
cdef public object source
@cython.locals(
off=cython.uint,
label_idx=cython.uint,
length=cython.uint,
link=cython.uint
)
cdef _decode_labels_at_offset(self, unsigned int off, cython.list labels, object seen_pointers)
cdef _read_header(self)
cdef _initial_parse(self)
@cython.locals(
end=cython.uint,
length=cython.uint
)
cdef _read_others(self)
cdef _read_questions(self)
@cython.locals(
length=cython.uint
)
cdef bytes _read_character_string(self)
cdef _read_string(self, unsigned int length)
@cython.locals(
name_start=cython.uint
)
cdef _read_record(self, object domain, unsigned int type_, object class_, object ttl, unsigned int length)
cdef _read_bitmap(self, unsigned int end)
cdef _read_name(self)