]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/unbound/libunbound/python/doc/modules/unbound.rst
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / unbound / libunbound / python / doc / modules / unbound.rst
1 Unbound module documentation
2 ================================
3
4 .. automodule:: unbound
5
6 Class ub_ctx
7 --------------
8 .. autoclass:: ub_ctx
9         :members:
10         :undoc-members:
11         
12         .. automethod:: __init__ 
13
14 Class ub_result
15 ----------------------
16 .. autoclass:: ub_result
17         :members:
18
19         .. attribute:: qname
20
21                 The original question, name text string.
22
23         .. attribute:: qtype
24
25                 The class asked for.
26
27         .. attribute:: canonname
28
29                 Canonical name for the result (the final cname). May be empty if no canonical name exists.
30
31         .. attribute:: answer_packet
32                 
33                 The DNS answer packet. Network formatted. Can contain DNSSEC types.
34
35         .. attribute:: havedata
36                 
37                 If there is any data, this property is true. If false, there was no data (nxdomain may be true, rcode can be set).
38
39         .. attribute:: secure
40                 
41                 True, if the result is validated securely.
42                 False, if validation failed or domain queried has no security info.
43          
44                 It is possible to get a result with no data (havedata is false),
45                 and secure is true. This means that the non-existance of the data
46                 was cryptographically proven (with signatures).
47
48         .. attribute:: bogus
49                 
50                 If the result was not secure (secure==0), and this result is due  to a security failure, bogus is true.
51                 This means the data has been actively tampered with, signatures
52                 failed, expected signatures were not present, timestamps on 
53                 signatures were out of date and so on.
54          
55                 If secure==0 and bogus==0, this can happen if the data is not secure 
56                 because security is disabled for that domain name. 
57                 This means the data is from a domain where data is not signed.
58
59         .. attribute:: nxdomain
60
61                 If there was no data, and the domain did not exist, this is true. 
62                 If it is false, and there was no data, then the domain name is purported to exist, but the requested data type is not available.
63
64         .. attribute:: rcode
65                 
66                 DNS RCODE for the result. May contain additional error code if there was no data due to an error. 
67                 0 (RCODE_NOERROR) if okay. See predefined `RCODE_` constants.
68         
69                 RCODE can be represented in display representation form (string) using :attr:`rcode_str` attribute.
70
71 Class ub_data
72 ----------------------
73 .. autoclass:: ub_data
74         :members:
75
76 Functions
77 ----------------------
78 .. autofunction:: reverse
79 .. autofunction:: idn2dname
80 .. autofunction:: dname2idn
81
82 Predefined constants
83 -----------------------
84
85 **RCODE**
86         * RCODE_FORMERR = 1
87         * RCODE_NOERROR = 0
88         * RCODE_NOTAUTH = 9
89         * RCODE_NOTIMPL = 4
90         * RCODE_NOTZONE = 10
91         * RCODE_NXDOMAIN = 3
92         * RCODE_NXRRSET = 8
93         * RCODE_REFUSED = 5
94         * RCODE_SERVFAIL = 2
95         * RCODE_YXDOMAIN = 6
96         * RCODE_YXRRSET = 7
97
98 **RR_CLASS**
99         * RR_CLASS_ANY = 255
100         * RR_CLASS_CH = 3
101         * RR_CLASS_HS = 4
102         * RR_CLASS_IN = 1
103         * RR_CLASS_NONE = 254
104
105 **RR_TYPE**
106         * RR_TYPE_A = 1
107         * RR_TYPE_A6 = 38
108         * RR_TYPE_AAAA = 28
109         * RR_TYPE_AFSDB = 18
110         * RR_TYPE_ANY = 255
111         * RR_TYPE_APL = 42
112         * RR_TYPE_ATMA = 34
113         * RR_TYPE_AXFR = 252
114         * RR_TYPE_CERT = 37
115         * RR_TYPE_CNAME = 5
116         * RR_TYPE_DHCID = 49
117         * RR_TYPE_DLV = 32769
118         * RR_TYPE_DNAME = 39
119         * RR_TYPE_DNSKEY = 48
120         * RR_TYPE_DS = 43
121         * RR_TYPE_EID = 31
122         * RR_TYPE_GID = 102
123         * RR_TYPE_GPOS = 27
124         * RR_TYPE_HINFO = 13
125         * RR_TYPE_IPSECKEY = 45
126         * RR_TYPE_ISDN = 20
127         * RR_TYPE_IXFR = 251
128         * RR_TYPE_KEY = 25
129         * RR_TYPE_KX = 36
130         * RR_TYPE_LOC = 29
131         * RR_TYPE_MAILA = 254
132         * RR_TYPE_MAILB = 253
133         * RR_TYPE_MB = 7
134         * RR_TYPE_MD = 3
135         * RR_TYPE_MF = 4
136         * RR_TYPE_MG = 8
137         * RR_TYPE_MINFO = 14
138         * RR_TYPE_MR = 9
139         * RR_TYPE_MX = 15
140         * RR_TYPE_NAPTR = 35
141         * RR_TYPE_NIMLOC = 32
142         * RR_TYPE_NS = 2
143         * RR_TYPE_NSAP = 22
144         * RR_TYPE_NSAP_PTR = 23
145         * RR_TYPE_NSEC = 47
146         * RR_TYPE_NSEC3 = 50
147         * RR_TYPE_NSEC3PARAMS = 51
148         * RR_TYPE_NULL = 10
149         * RR_TYPE_NXT = 30
150         * RR_TYPE_OPT = 41
151         * RR_TYPE_PTR = 12
152         * RR_TYPE_PX = 26
153         * RR_TYPE_RP = 17
154         * RR_TYPE_RRSIG = 46
155         * RR_TYPE_RT = 21
156         * RR_TYPE_SIG = 24
157         * RR_TYPE_SINK = 40
158         * RR_TYPE_SOA = 6
159         * RR_TYPE_SRV = 33
160         * RR_TYPE_SSHFP = 44
161         * RR_TYPE_TSIG = 250
162         * RR_TYPE_TXT = 16
163         * RR_TYPE_UID = 101
164         * RR_TYPE_UINFO = 100
165         * RR_TYPE_UNSPEC = 103
166         * RR_TYPE_WKS = 11
167         * RR_TYPE_X25 = 19