]> git.saurik.com Git - apple/network_cmds.git/blob - unbound/libunbound/python/doc/examples/example8.rst
network_cmds-480.tar.gz
[apple/network_cmds.git] / unbound / libunbound / python / doc / examples / example8.rst
1 .. _example_mxlookup:
2
3 =================================================
4 Lookup for MX and NS records
5 =================================================
6
7 The pyUnbound extension provides functions which are able to encode RAW RDATA produces by unbound resolver (see :class:`unbound.ub_data`).
8
9 .. literalinclude:: example8-1.py
10 :language: python
11
12 Previous example produces following output::
13
14 Result:
15 raw data: 00 0F 05 6D 61 69 6C 34 03 6E 69 63 02 63 7A 00;00 14 02 6D 78 05 63 7A 6E 69 63 03 6F 72 67 00;00 0A 04 6D 61 69 6C 03 6E 69 63 02 63 7A 00
16 priority:15 address: mail4.nic.cz.
17 priority:20 address: mx.cznic.org.
18 priority:10 address: mail.nic.cz.
19
20 Result:
21 raw data: D9 1F CD 32
22 address: 217.31.205.50
23
24 Result:
25 raw data: 01 61 02 6E 73 03 6E 69 63 02 63 7A 00;01 65 02 6E 73 03 6E 69 63 02 63 7A 00;01 63 02 6E 73 03 6E 69 63 02 63 7A 00
26 host: a.ns.nic.cz.
27 host: e.ns.nic.cz.
28 host: c.ns.nic.cz.