|
| 1 | + |
| 2 | +import cython |
| 3 | + |
| 4 | + |
| 5 | +cdef cython.uint DNS_COMPRESSION_HEADER_LEN |
| 6 | +cdef cython.uint MAX_DNS_LABELS |
| 7 | +cdef cython.uint DNS_COMPRESSION_POINTER_LEN |
| 8 | +cdef cython.uint MAX_NAME_LENGTH |
| 9 | + |
| 10 | + |
| 11 | +cdef cython.uint _TYPE_A |
| 12 | +cdef cython.uint _TYPE_CNAME |
| 13 | +cdef cython.uint _TYPE_PTR |
| 14 | +cdef cython.uint _TYPE_TXT |
| 15 | +cdef cython.uint _TYPE_SRV |
| 16 | +cdef cython.uint _TYPE_HINFO |
| 17 | +cdef cython.uint _TYPE_AAAA |
| 18 | +cdef cython.uint _TYPE_NSEC |
| 19 | +cdef cython.uint _FLAGS_QR_MASK |
| 20 | +cdef cython.uint _FLAGS_QR_MASK |
| 21 | +cdef cython.uint _FLAGS_TC |
| 22 | +cdef cython.uint _FLAGS_QR_QUERY |
| 23 | +cdef cython.uint _FLAGS_QR_RESPONSE |
| 24 | + |
| 25 | +cdef object UNPACK_3H |
| 26 | +cdef object UNPACK_6H |
| 27 | +cdef object UNPACK_HH |
| 28 | +cdef object UNPACK_HHiH |
| 29 | + |
| 30 | +cdef object DECODE_EXCEPTIONS |
| 31 | + |
| 32 | +cdef object IncomingDecodeError |
| 33 | + |
| 34 | +cdef class DNSIncoming: |
| 35 | + |
| 36 | + cdef bint _did_read_others |
| 37 | + cdef public unsigned int flags |
| 38 | + cdef unsigned int offset |
| 39 | + cdef public bytes data |
| 40 | + cdef unsigned int _data_len |
| 41 | + cdef public object name_cache |
| 42 | + cdef public object questions |
| 43 | + cdef object _answers |
| 44 | + cdef public object id |
| 45 | + cdef public object num_questions |
| 46 | + cdef public object num_answers |
| 47 | + cdef public object num_authorities |
| 48 | + cdef public object num_additionals |
| 49 | + cdef public object valid |
| 50 | + cdef public object now |
| 51 | + cdef public object scope_id |
| 52 | + cdef public object source |
| 53 | + |
| 54 | + @cython.locals( |
| 55 | + off=cython.uint, |
| 56 | + label_idx=cython.uint, |
| 57 | + length=cython.uint, |
| 58 | + link=cython.uint |
| 59 | + ) |
| 60 | + cdef _decode_labels_at_offset(self, unsigned int off, cython.list labels, object seen_pointers) |
| 61 | + |
| 62 | + cdef _read_header(self) |
| 63 | + |
| 64 | + cdef _read_questions(self) |
| 65 | + |
| 66 | + @cython.locals( |
| 67 | + length=cython.uint |
| 68 | + ) |
| 69 | + cdef bytes _read_character_string(self) |
| 70 | + |
| 71 | + cdef _read_string(self, unsigned int length) |
| 72 | + |
| 73 | + @cython.locals( |
| 74 | + name_start=cython.uint |
| 75 | + ) |
| 76 | + cdef _read_record(self, object domain, unsigned int type_, object class_, object ttl, object length) |
| 77 | + |
| 78 | + cdef _read_bitmap(self, unsigned int end) |
| 79 | + |
| 80 | + cdef _read_name(self) |
0 commit comments