This file is indexed.

/usr/lib/python2.7/dist-packages/unboundmodule.py is in python-unbound 1.6.7-1ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   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
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_unboundmodule')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_unboundmodule')
    _unboundmodule = swig_import_helper()
    del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_unboundmodule', [dirname(__file__)])
        except ImportError:
            import _unboundmodule
            return _unboundmodule
        try:
            _mod = imp.load_module('_unboundmodule', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _unboundmodule = swig_import_helper()
    del swig_import_helper
else:
    import _unboundmodule
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)

try:
    _object = object
    _newclass = 1
except __builtin__.Exception:
    class _object:
        pass
    _newclass = 0


def GetNameAsLabelList(name, len):
    return _unboundmodule.GetNameAsLabelList(name, len)
GetNameAsLabelList = _unboundmodule.GetNameAsLabelList
class query_info(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, query_info, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, query_info, name)
    __repr__ = _swig_repr
    __swig_getmethods__["qtype"] = _unboundmodule.query_info_qtype_get
    if _newclass:
        qtype = _swig_property(_unboundmodule.query_info_qtype_get)
    __swig_getmethods__["qclass"] = _unboundmodule.query_info_qclass_get
    if _newclass:
        qclass = _swig_property(_unboundmodule.query_info_qclass_get)

    def _get_qtype_str(self): return sldns_wire2str_type(self.qtype)
    __swig_getmethods__["qtype_str"] = _get_qtype_str
    if _newclass:qtype_str = _swig_property(_get_qtype_str)

    def _get_qclass_str(self): return sldns_wire2str_class(self.qclass)
    __swig_getmethods__["qclass_str"] = _get_qclass_str
    if _newclass:qclass_str = _swig_property(_get_qclass_str)

    __swig_getmethods__["qname"] = _unboundmodule._get_qname
    if _newclass:qname = _swig_property(_unboundmodule._get_qname)

    __swig_getmethods__["qname_list"] = _unboundmodule._get_qname_components
    if _newclass:qname_list = _swig_property(_unboundmodule._get_qname_components)

    def _get_qname_str(self): return dnameAsStr(self.qname)
    __swig_getmethods__["qname_str"] = _get_qname_str
    if _newclass:qname_str = _swig_property(_get_qname_str)


    def __init__(self):
        this = _unboundmodule.new_query_info()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_query_info
    __del__ = lambda self: None
query_info_swigregister = _unboundmodule.query_info_swigregister
query_info_swigregister(query_info)

RR_CLASS_IN = _unboundmodule.RR_CLASS_IN
RR_CLASS_CH = _unboundmodule.RR_CLASS_CH
RR_CLASS_HS = _unboundmodule.RR_CLASS_HS
RR_CLASS_NONE = _unboundmodule.RR_CLASS_NONE
RR_CLASS_ANY = _unboundmodule.RR_CLASS_ANY
RR_TYPE_A = _unboundmodule.RR_TYPE_A
RR_TYPE_NS = _unboundmodule.RR_TYPE_NS
RR_TYPE_MD = _unboundmodule.RR_TYPE_MD
RR_TYPE_MF = _unboundmodule.RR_TYPE_MF
RR_TYPE_CNAME = _unboundmodule.RR_TYPE_CNAME
RR_TYPE_SOA = _unboundmodule.RR_TYPE_SOA
RR_TYPE_MB = _unboundmodule.RR_TYPE_MB
RR_TYPE_MG = _unboundmodule.RR_TYPE_MG
RR_TYPE_MR = _unboundmodule.RR_TYPE_MR
RR_TYPE_NULL = _unboundmodule.RR_TYPE_NULL
RR_TYPE_WKS = _unboundmodule.RR_TYPE_WKS
RR_TYPE_PTR = _unboundmodule.RR_TYPE_PTR
RR_TYPE_HINFO = _unboundmodule.RR_TYPE_HINFO
RR_TYPE_MINFO = _unboundmodule.RR_TYPE_MINFO
RR_TYPE_MX = _unboundmodule.RR_TYPE_MX
RR_TYPE_TXT = _unboundmodule.RR_TYPE_TXT
RR_TYPE_RP = _unboundmodule.RR_TYPE_RP
RR_TYPE_AFSDB = _unboundmodule.RR_TYPE_AFSDB
RR_TYPE_X25 = _unboundmodule.RR_TYPE_X25
RR_TYPE_ISDN = _unboundmodule.RR_TYPE_ISDN
RR_TYPE_RT = _unboundmodule.RR_TYPE_RT
RR_TYPE_NSAP = _unboundmodule.RR_TYPE_NSAP
RR_TYPE_NSAP_PTR = _unboundmodule.RR_TYPE_NSAP_PTR
RR_TYPE_SIG = _unboundmodule.RR_TYPE_SIG
RR_TYPE_KEY = _unboundmodule.RR_TYPE_KEY
RR_TYPE_PX = _unboundmodule.RR_TYPE_PX
RR_TYPE_GPOS = _unboundmodule.RR_TYPE_GPOS
RR_TYPE_AAAA = _unboundmodule.RR_TYPE_AAAA
RR_TYPE_LOC = _unboundmodule.RR_TYPE_LOC
RR_TYPE_NXT = _unboundmodule.RR_TYPE_NXT
RR_TYPE_EID = _unboundmodule.RR_TYPE_EID
RR_TYPE_NIMLOC = _unboundmodule.RR_TYPE_NIMLOC
RR_TYPE_SRV = _unboundmodule.RR_TYPE_SRV
RR_TYPE_ATMA = _unboundmodule.RR_TYPE_ATMA
RR_TYPE_NAPTR = _unboundmodule.RR_TYPE_NAPTR
RR_TYPE_KX = _unboundmodule.RR_TYPE_KX
RR_TYPE_CERT = _unboundmodule.RR_TYPE_CERT
RR_TYPE_A6 = _unboundmodule.RR_TYPE_A6
RR_TYPE_DNAME = _unboundmodule.RR_TYPE_DNAME
RR_TYPE_SINK = _unboundmodule.RR_TYPE_SINK
RR_TYPE_OPT = _unboundmodule.RR_TYPE_OPT
RR_TYPE_APL = _unboundmodule.RR_TYPE_APL
RR_TYPE_DS = _unboundmodule.RR_TYPE_DS
RR_TYPE_SSHFP = _unboundmodule.RR_TYPE_SSHFP
RR_TYPE_IPSECKEY = _unboundmodule.RR_TYPE_IPSECKEY
RR_TYPE_RRSIG = _unboundmodule.RR_TYPE_RRSIG
RR_TYPE_NSEC = _unboundmodule.RR_TYPE_NSEC
RR_TYPE_DNSKEY = _unboundmodule.RR_TYPE_DNSKEY
RR_TYPE_DHCID = _unboundmodule.RR_TYPE_DHCID
RR_TYPE_NSEC3 = _unboundmodule.RR_TYPE_NSEC3
RR_TYPE_NSEC3PARAMS = _unboundmodule.RR_TYPE_NSEC3PARAMS
RR_TYPE_UINFO = _unboundmodule.RR_TYPE_UINFO
RR_TYPE_UID = _unboundmodule.RR_TYPE_UID
RR_TYPE_GID = _unboundmodule.RR_TYPE_GID
RR_TYPE_UNSPEC = _unboundmodule.RR_TYPE_UNSPEC
RR_TYPE_TSIG = _unboundmodule.RR_TYPE_TSIG
RR_TYPE_IXFR = _unboundmodule.RR_TYPE_IXFR
RR_TYPE_AXFR = _unboundmodule.RR_TYPE_AXFR
RR_TYPE_MAILB = _unboundmodule.RR_TYPE_MAILB
RR_TYPE_MAILA = _unboundmodule.RR_TYPE_MAILA
RR_TYPE_ANY = _unboundmodule.RR_TYPE_ANY
RR_TYPE_DLV = _unboundmodule.RR_TYPE_DLV

def _get_qname(q):
    return _unboundmodule._get_qname(q)
_get_qname = _unboundmodule._get_qname

def _get_qname_components(q):
    return _unboundmodule._get_qname_components(q)
_get_qname_components = _unboundmodule._get_qname_components

def dnameAsStr(dname):
    return _unboundmodule.dnameAsStr(dname)
dnameAsStr = _unboundmodule.dnameAsStr
class packed_rrset_key(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, packed_rrset_key, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, packed_rrset_key, name)
    __repr__ = _swig_repr
    __swig_getmethods__["flags"] = _unboundmodule.packed_rrset_key_flags_get
    if _newclass:
        flags = _swig_property(_unboundmodule.packed_rrset_key_flags_get)
    __swig_getmethods__["type"] = _unboundmodule.packed_rrset_key_type_get
    if _newclass:
        type = _swig_property(_unboundmodule.packed_rrset_key_type_get)
    __swig_getmethods__["rrset_class"] = _unboundmodule.packed_rrset_key_rrset_class_get
    if _newclass:
        rrset_class = _swig_property(_unboundmodule.packed_rrset_key_rrset_class_get)

    def _get_type_str(self): return sldns_wire2str_type(_unboundmodule.ntohs(self.type))
    __swig_getmethods__["type_str"] = _get_type_str
    if _newclass:type_str = _swig_property(_get_type_str)

    def _get_class_str(self): return sldns_wire2str_class(_unboundmodule.ntohs(self.rrset_class))
    __swig_getmethods__["rrset_class_str"] = _get_class_str
    if _newclass:rrset_class_str = _swig_property(_get_class_str)

    __swig_getmethods__["dname"] = _unboundmodule._get_dname
    if _newclass:dname = _swig_property(_unboundmodule._get_dname)

    __swig_getmethods__["dname_list"] = _unboundmodule._get_dname_components
    if _newclass:dname_list = _swig_property(_unboundmodule._get_dname_components)

    def _get_dname_str(self): return dnameAsStr(self.dname)
    __swig_getmethods__["dname_str"] = _get_dname_str
    if _newclass:dname_str = _swig_property(_get_dname_str)


    def __init__(self):
        this = _unboundmodule.new_packed_rrset_key()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_packed_rrset_key
    __del__ = lambda self: None
packed_rrset_key_swigregister = _unboundmodule.packed_rrset_key_swigregister
packed_rrset_key_swigregister(packed_rrset_key)


def ntohs(netshort):
    return _unboundmodule.ntohs(netshort)
ntohs = _unboundmodule.ntohs

def _get_dname(k):
    return _unboundmodule._get_dname(k)
_get_dname = _unboundmodule._get_dname

def _get_dname_components(k):
    return _unboundmodule._get_dname_components(k)
_get_dname_components = _unboundmodule._get_dname_components
class ub_packed_rrset_key(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ub_packed_rrset_key, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ub_packed_rrset_key, name)
    __repr__ = _swig_repr
    __swig_setmethods__["entry"] = _unboundmodule.ub_packed_rrset_key_entry_set
    __swig_getmethods__["entry"] = _unboundmodule.ub_packed_rrset_key_entry_get
    if _newclass:
        entry = _swig_property(_unboundmodule.ub_packed_rrset_key_entry_get, _unboundmodule.ub_packed_rrset_key_entry_set)
    __swig_setmethods__["id"] = _unboundmodule.ub_packed_rrset_key_id_set
    __swig_getmethods__["id"] = _unboundmodule.ub_packed_rrset_key_id_get
    if _newclass:
        id = _swig_property(_unboundmodule.ub_packed_rrset_key_id_get, _unboundmodule.ub_packed_rrset_key_id_set)
    __swig_setmethods__["rk"] = _unboundmodule.ub_packed_rrset_key_rk_set
    __swig_getmethods__["rk"] = _unboundmodule.ub_packed_rrset_key_rk_get
    if _newclass:
        rk = _swig_property(_unboundmodule.ub_packed_rrset_key_rk_get, _unboundmodule.ub_packed_rrset_key_rk_set)

    def __init__(self):
        this = _unboundmodule.new_ub_packed_rrset_key()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_ub_packed_rrset_key
    __del__ = lambda self: None
ub_packed_rrset_key_swigregister = _unboundmodule.ub_packed_rrset_key_swigregister
ub_packed_rrset_key_swigregister(ub_packed_rrset_key)

class lruhash_entry(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, lruhash_entry, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, lruhash_entry, name)
    __repr__ = _swig_repr
    __swig_setmethods__["lock"] = _unboundmodule.lruhash_entry_lock_set
    __swig_getmethods__["lock"] = _unboundmodule.lruhash_entry_lock_get
    if _newclass:
        lock = _swig_property(_unboundmodule.lruhash_entry_lock_get, _unboundmodule.lruhash_entry_lock_set)
    __swig_setmethods__["overflow_next"] = _unboundmodule.lruhash_entry_overflow_next_set
    __swig_getmethods__["overflow_next"] = _unboundmodule.lruhash_entry_overflow_next_get
    if _newclass:
        overflow_next = _swig_property(_unboundmodule.lruhash_entry_overflow_next_get, _unboundmodule.lruhash_entry_overflow_next_set)
    __swig_setmethods__["lru_next"] = _unboundmodule.lruhash_entry_lru_next_set
    __swig_getmethods__["lru_next"] = _unboundmodule.lruhash_entry_lru_next_get
    if _newclass:
        lru_next = _swig_property(_unboundmodule.lruhash_entry_lru_next_get, _unboundmodule.lruhash_entry_lru_next_set)
    __swig_setmethods__["lru_prev"] = _unboundmodule.lruhash_entry_lru_prev_set
    __swig_getmethods__["lru_prev"] = _unboundmodule.lruhash_entry_lru_prev_get
    if _newclass:
        lru_prev = _swig_property(_unboundmodule.lruhash_entry_lru_prev_get, _unboundmodule.lruhash_entry_lru_prev_set)
    __swig_setmethods__["hash"] = _unboundmodule.lruhash_entry_hash_set
    __swig_getmethods__["hash"] = _unboundmodule.lruhash_entry_hash_get
    if _newclass:
        hash = _swig_property(_unboundmodule.lruhash_entry_hash_get, _unboundmodule.lruhash_entry_hash_set)
    __swig_setmethods__["key"] = _unboundmodule.lruhash_entry_key_set
    __swig_getmethods__["key"] = _unboundmodule.lruhash_entry_key_get
    if _newclass:
        key = _swig_property(_unboundmodule.lruhash_entry_key_get, _unboundmodule.lruhash_entry_key_set)
    __swig_setmethods__["data"] = _unboundmodule.lruhash_entry_data_set
    __swig_getmethods__["data"] = _unboundmodule.lruhash_entry_data_get
    if _newclass:
        data = _swig_property(_unboundmodule.lruhash_entry_data_get, _unboundmodule.lruhash_entry_data_set)

    def __init__(self):
        this = _unboundmodule.new_lruhash_entry()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_lruhash_entry
    __del__ = lambda self: None
lruhash_entry_swigregister = _unboundmodule.lruhash_entry_swigregister
lruhash_entry_swigregister(lruhash_entry)

class packed_rrset_data(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, packed_rrset_data, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, packed_rrset_data, name)
    __repr__ = _swig_repr
    __swig_setmethods__["ttl"] = _unboundmodule.packed_rrset_data_ttl_set
    __swig_getmethods__["ttl"] = _unboundmodule.packed_rrset_data_ttl_get
    if _newclass:
        ttl = _swig_property(_unboundmodule.packed_rrset_data_ttl_get, _unboundmodule.packed_rrset_data_ttl_set)
    __swig_setmethods__["count"] = _unboundmodule.packed_rrset_data_count_set
    __swig_getmethods__["count"] = _unboundmodule.packed_rrset_data_count_get
    if _newclass:
        count = _swig_property(_unboundmodule.packed_rrset_data_count_get, _unboundmodule.packed_rrset_data_count_set)
    __swig_setmethods__["rrsig_count"] = _unboundmodule.packed_rrset_data_rrsig_count_set
    __swig_getmethods__["rrsig_count"] = _unboundmodule.packed_rrset_data_rrsig_count_get
    if _newclass:
        rrsig_count = _swig_property(_unboundmodule.packed_rrset_data_rrsig_count_get, _unboundmodule.packed_rrset_data_rrsig_count_set)
    __swig_setmethods__["trust"] = _unboundmodule.packed_rrset_data_trust_set
    __swig_getmethods__["trust"] = _unboundmodule.packed_rrset_data_trust_get
    if _newclass:
        trust = _swig_property(_unboundmodule.packed_rrset_data_trust_get, _unboundmodule.packed_rrset_data_trust_set)
    __swig_setmethods__["security"] = _unboundmodule.packed_rrset_data_security_set
    __swig_getmethods__["security"] = _unboundmodule.packed_rrset_data_security_get
    if _newclass:
        security = _swig_property(_unboundmodule.packed_rrset_data_security_get, _unboundmodule.packed_rrset_data_security_set)

    def _get_data_rr_len(self): return RRSetData_RRLen(self)
    __swig_getmethods__["rr_len"] = _get_data_rr_len
    if _newclass:rr_len = _swig_property(_get_data_rr_len)
    def _get_data_rr_ttl(self): return RRSetData_RRTTL(self)
    __swig_getmethods__["rr_ttl"] =_get_data_rr_ttl
    if _newclass:rr_len = _swig_property(_get_data_rr_ttl)
    def _get_data_rr_data(self): return RRSetData_RRData(self)
    __swig_getmethods__["rr_data"] = _get_data_rr_data
    if _newclass:rr_len = _swig_property(_get_data_rr_data)


    def __init__(self):
        this = _unboundmodule.new_packed_rrset_data()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_packed_rrset_data
    __del__ = lambda self: None
packed_rrset_data_swigregister = _unboundmodule.packed_rrset_data_swigregister
packed_rrset_data_swigregister(packed_rrset_data)


class RRSetData_RRLen:
    def __init__(self, obj): self.obj = obj
    def __getitem__(self, index): return _unboundmodule._get_data_rr_len(self.obj, index)
    def __len__(self): return obj.count + obj.rrsig_count
class RRSetData_RRTTL:
    def __init__(self, obj): self.obj = obj
    def __getitem__(self, index): return _unboundmodule._get_data_rr_ttl(self.obj, index)
    def __setitem__(self, index, value): _unboundmodule._set_data_rr_ttl(self.obj, index, value)
    def __len__(self): return obj.count + obj.rrsig_count
class RRSetData_RRData:
    def __init__(self, obj): self.obj = obj
    def __getitem__(self, index): return _unboundmodule._get_data_rr_data(self.obj, index)
    def __len__(self): return obj.count + obj.rrsig_count


def _get_data_rr_len(d, idx):
    return _unboundmodule._get_data_rr_len(d, idx)
_get_data_rr_len = _unboundmodule._get_data_rr_len

def _set_data_rr_ttl(d, idx, ttl):
    return _unboundmodule._set_data_rr_ttl(d, idx, ttl)
_set_data_rr_ttl = _unboundmodule._set_data_rr_ttl

def _get_data_rr_ttl(d, idx):
    return _unboundmodule._get_data_rr_ttl(d, idx)
_get_data_rr_ttl = _unboundmodule._get_data_rr_ttl

def _get_data_rr_data(d, idx):
    return _unboundmodule._get_data_rr_data(d, idx)
_get_data_rr_data = _unboundmodule._get_data_rr_data
class reply_info(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, reply_info, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, reply_info, name)
    __repr__ = _swig_repr
    __swig_setmethods__["flags"] = _unboundmodule.reply_info_flags_set
    __swig_getmethods__["flags"] = _unboundmodule.reply_info_flags_get
    if _newclass:
        flags = _swig_property(_unboundmodule.reply_info_flags_get, _unboundmodule.reply_info_flags_set)
    __swig_setmethods__["qdcount"] = _unboundmodule.reply_info_qdcount_set
    __swig_getmethods__["qdcount"] = _unboundmodule.reply_info_qdcount_get
    if _newclass:
        qdcount = _swig_property(_unboundmodule.reply_info_qdcount_get, _unboundmodule.reply_info_qdcount_set)
    __swig_setmethods__["ttl"] = _unboundmodule.reply_info_ttl_set
    __swig_getmethods__["ttl"] = _unboundmodule.reply_info_ttl_get
    if _newclass:
        ttl = _swig_property(_unboundmodule.reply_info_ttl_get, _unboundmodule.reply_info_ttl_set)
    __swig_setmethods__["prefetch_ttl"] = _unboundmodule.reply_info_prefetch_ttl_set
    __swig_getmethods__["prefetch_ttl"] = _unboundmodule.reply_info_prefetch_ttl_get
    if _newclass:
        prefetch_ttl = _swig_property(_unboundmodule.reply_info_prefetch_ttl_get, _unboundmodule.reply_info_prefetch_ttl_set)
    __swig_setmethods__["authoritative"] = _unboundmodule.reply_info_authoritative_set
    __swig_getmethods__["authoritative"] = _unboundmodule.reply_info_authoritative_get
    if _newclass:
        authoritative = _swig_property(_unboundmodule.reply_info_authoritative_get, _unboundmodule.reply_info_authoritative_set)
    __swig_setmethods__["security"] = _unboundmodule.reply_info_security_set
    __swig_getmethods__["security"] = _unboundmodule.reply_info_security_get
    if _newclass:
        security = _swig_property(_unboundmodule.reply_info_security_get, _unboundmodule.reply_info_security_set)
    __swig_setmethods__["an_numrrsets"] = _unboundmodule.reply_info_an_numrrsets_set
    __swig_getmethods__["an_numrrsets"] = _unboundmodule.reply_info_an_numrrsets_get
    if _newclass:
        an_numrrsets = _swig_property(_unboundmodule.reply_info_an_numrrsets_get, _unboundmodule.reply_info_an_numrrsets_set)
    __swig_setmethods__["ns_numrrsets"] = _unboundmodule.reply_info_ns_numrrsets_set
    __swig_getmethods__["ns_numrrsets"] = _unboundmodule.reply_info_ns_numrrsets_get
    if _newclass:
        ns_numrrsets = _swig_property(_unboundmodule.reply_info_ns_numrrsets_get, _unboundmodule.reply_info_ns_numrrsets_set)
    __swig_setmethods__["ar_numrrsets"] = _unboundmodule.reply_info_ar_numrrsets_set
    __swig_getmethods__["ar_numrrsets"] = _unboundmodule.reply_info_ar_numrrsets_get
    if _newclass:
        ar_numrrsets = _swig_property(_unboundmodule.reply_info_ar_numrrsets_get, _unboundmodule.reply_info_ar_numrrsets_set)
    __swig_setmethods__["rrset_count"] = _unboundmodule.reply_info_rrset_count_set
    __swig_getmethods__["rrset_count"] = _unboundmodule.reply_info_rrset_count_get
    if _newclass:
        rrset_count = _swig_property(_unboundmodule.reply_info_rrset_count_get, _unboundmodule.reply_info_rrset_count_set)

    def _rrset_ref_get(self): return ReplyInfo_Ref(self)
    __swig_getmethods__["ref"] = _rrset_ref_get
    if _newclass:ref = _swig_property(_rrset_ref_get)

    def _rrset_rrsets_get(self): return ReplyInfo_RRSet(self)
    __swig_getmethods__["rrsets"] = _rrset_rrsets_get
    if _newclass:rrsets = _swig_property(_rrset_rrsets_get)


    def __init__(self):
        this = _unboundmodule.new_reply_info()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_reply_info
    __del__ = lambda self: None
reply_info_swigregister = _unboundmodule.reply_info_swigregister
reply_info_swigregister(reply_info)

class rrset_ref(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, rrset_ref, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, rrset_ref, name)
    __repr__ = _swig_repr
    __swig_setmethods__["key"] = _unboundmodule.rrset_ref_key_set
    __swig_getmethods__["key"] = _unboundmodule.rrset_ref_key_get
    if _newclass:
        key = _swig_property(_unboundmodule.rrset_ref_key_get, _unboundmodule.rrset_ref_key_set)
    __swig_setmethods__["id"] = _unboundmodule.rrset_ref_id_set
    __swig_getmethods__["id"] = _unboundmodule.rrset_ref_id_get
    if _newclass:
        id = _swig_property(_unboundmodule.rrset_ref_id_get, _unboundmodule.rrset_ref_id_set)

    def __init__(self):
        this = _unboundmodule.new_rrset_ref()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_rrset_ref
    __del__ = lambda self: None
rrset_ref_swigregister = _unboundmodule.rrset_ref_swigregister
rrset_ref_swigregister(rrset_ref)

class dns_msg(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, dns_msg, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, dns_msg, name)
    __repr__ = _swig_repr
    __swig_setmethods__["qinfo"] = _unboundmodule.dns_msg_qinfo_set
    __swig_getmethods__["qinfo"] = _unboundmodule.dns_msg_qinfo_get
    if _newclass:
        qinfo = _swig_property(_unboundmodule.dns_msg_qinfo_get, _unboundmodule.dns_msg_qinfo_set)
    __swig_setmethods__["rep"] = _unboundmodule.dns_msg_rep_set
    __swig_getmethods__["rep"] = _unboundmodule.dns_msg_rep_get
    if _newclass:
        rep = _swig_property(_unboundmodule.dns_msg_rep_get, _unboundmodule.dns_msg_rep_set)

    def __init__(self):
        this = _unboundmodule.new_dns_msg()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_dns_msg
    __del__ = lambda self: None
dns_msg_swigregister = _unboundmodule.dns_msg_swigregister
dns_msg_swigregister(dns_msg)


class ReplyInfo_RRSet:
    def __init__(self, obj): self.obj = obj
    def __getitem__(self, index): return _unboundmodule._rrset_rrsets_get(self.obj, index)
    def __len__(self): return obj.rrset_count

class ReplyInfo_Ref:
    def __init__(self, obj): self.obj = obj
    def __getitem__(self, index): return _unboundmodule._rrset_ref_get(self.obj, index)
    def __len__(self): return obj.rrset_count


def _rrset_rrsets_get(r, idx):
    return _unboundmodule._rrset_rrsets_get(r, idx)
_rrset_rrsets_get = _unboundmodule._rrset_rrsets_get

def _rrset_ref_get(r, idx):
    return _unboundmodule._rrset_ref_get(r, idx)
_rrset_ref_get = _unboundmodule._rrset_ref_get
class mesh_state(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, mesh_state, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, mesh_state, name)
    __repr__ = _swig_repr
    __swig_setmethods__["reply_list"] = _unboundmodule.mesh_state_reply_list_set
    __swig_getmethods__["reply_list"] = _unboundmodule.mesh_state_reply_list_get
    if _newclass:
        reply_list = _swig_property(_unboundmodule.mesh_state_reply_list_get, _unboundmodule.mesh_state_reply_list_set)

    def __init__(self):
        this = _unboundmodule.new_mesh_state()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_mesh_state
    __del__ = lambda self: None
mesh_state_swigregister = _unboundmodule.mesh_state_swigregister
mesh_state_swigregister(mesh_state)

class mesh_reply(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, mesh_reply, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, mesh_reply, name)
    __repr__ = _swig_repr
    __swig_setmethods__["next"] = _unboundmodule.mesh_reply_next_set
    __swig_getmethods__["next"] = _unboundmodule.mesh_reply_next_get
    if _newclass:
        next = _swig_property(_unboundmodule.mesh_reply_next_get, _unboundmodule.mesh_reply_next_set)
    __swig_setmethods__["query_reply"] = _unboundmodule.mesh_reply_query_reply_set
    __swig_getmethods__["query_reply"] = _unboundmodule.mesh_reply_query_reply_get
    if _newclass:
        query_reply = _swig_property(_unboundmodule.mesh_reply_query_reply_get, _unboundmodule.mesh_reply_query_reply_set)

    def __init__(self):
        this = _unboundmodule.new_mesh_reply()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_mesh_reply
    __del__ = lambda self: None
mesh_reply_swigregister = _unboundmodule.mesh_reply_swigregister
mesh_reply_swigregister(mesh_reply)

class comm_reply(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, comm_reply, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, comm_reply, name)
    __repr__ = _swig_repr

    def _addr_get(self): return _comm_reply_addr_get(self)
    __swig_getmethods__["addr"] = _addr_get
    if _newclass:addr = _swig_property(_addr_get)

    def _port_get(self): return _comm_reply_port_get(self)
    __swig_getmethods__["port"] = _port_get
    if _newclass:port = _swig_property(_port_get)

    def _family_get(self): return _comm_reply_family_get(self)
    __swig_getmethods__["family"] = _family_get
    if _newclass:family = _swig_property(_family_get)


    def __init__(self):
        this = _unboundmodule.new_comm_reply()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_comm_reply
    __del__ = lambda self: None
comm_reply_swigregister = _unboundmodule.comm_reply_swigregister
comm_reply_swigregister(comm_reply)


def _comm_reply_addr_get(reply):
    return _unboundmodule._comm_reply_addr_get(reply)
_comm_reply_addr_get = _unboundmodule._comm_reply_addr_get

def _comm_reply_family_get(reply):
    return _unboundmodule._comm_reply_family_get(reply)
_comm_reply_family_get = _unboundmodule._comm_reply_family_get

def _comm_reply_port_get(reply):
    return _unboundmodule._comm_reply_port_get(reply)
_comm_reply_port_get = _unboundmodule._comm_reply_port_get
class edns_option(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, edns_option, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, edns_option, name)
    __repr__ = _swig_repr
    __swig_setmethods__["_next"] = _unboundmodule.edns_option__next_set
    __swig_getmethods__["_next"] = _unboundmodule.edns_option__next_get
    if _newclass:
        _next = _swig_property(_unboundmodule.edns_option__next_get, _unboundmodule.edns_option__next_set)
    __swig_setmethods__["_opt_code"] = _unboundmodule.edns_option__opt_code_set
    __swig_getmethods__["_opt_code"] = _unboundmodule.edns_option__opt_code_get
    if _newclass:
        _opt_code = _swig_property(_unboundmodule.edns_option__opt_code_get, _unboundmodule.edns_option__opt_code_set)
    __swig_setmethods__["_opt_len"] = _unboundmodule.edns_option__opt_len_set
    __swig_getmethods__["_opt_len"] = _unboundmodule.edns_option__opt_len_get
    if _newclass:
        _opt_len = _swig_property(_unboundmodule.edns_option__opt_len_get, _unboundmodule.edns_option__opt_len_set)
    __swig_setmethods__["_opt_data"] = _unboundmodule.edns_option__opt_data_set
    __swig_getmethods__["_opt_data"] = _unboundmodule.edns_option__opt_data_get
    if _newclass:
        _opt_data = _swig_property(_unboundmodule.edns_option__opt_data_get, _unboundmodule.edns_option__opt_data_set)

    def _opt_code_get(self): return _edns_option_opt_code_get(self)
    __swig_getmethods__["code"] = _opt_code_get
    if _newclass: opt_code = _swig_property(_opt_code_get)

    def _opt_data_get(self): return _edns_option_opt_data_get(self)
    __swig_getmethods__["data"] = _opt_data_get
    if _newclass: opt_data = _swig_property(_opt_data_get)


    def __init__(self):
        this = _unboundmodule.new_edns_option()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_edns_option
    __del__ = lambda self: None
edns_option_swigregister = _unboundmodule.edns_option_swigregister
edns_option_swigregister(edns_option)


def _edns_option_opt_code_get(option):
    return _unboundmodule._edns_option_opt_code_get(option)
_edns_option_opt_code_get = _unboundmodule._edns_option_opt_code_get

def _edns_option_opt_data_get(option):
    return _unboundmodule._edns_option_opt_data_get(option)
_edns_option_opt_data_get = _unboundmodule._edns_option_opt_data_get
class edns_data(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, edns_data, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, edns_data, name)
    __repr__ = _swig_repr
    __swig_setmethods__["edns_present"] = _unboundmodule.edns_data_edns_present_set
    __swig_getmethods__["edns_present"] = _unboundmodule.edns_data_edns_present_get
    if _newclass:
        edns_present = _swig_property(_unboundmodule.edns_data_edns_present_get, _unboundmodule.edns_data_edns_present_set)
    __swig_setmethods__["ext_rcode"] = _unboundmodule.edns_data_ext_rcode_set
    __swig_getmethods__["ext_rcode"] = _unboundmodule.edns_data_ext_rcode_get
    if _newclass:
        ext_rcode = _swig_property(_unboundmodule.edns_data_ext_rcode_get, _unboundmodule.edns_data_ext_rcode_set)
    __swig_setmethods__["edns_version"] = _unboundmodule.edns_data_edns_version_set
    __swig_getmethods__["edns_version"] = _unboundmodule.edns_data_edns_version_get
    if _newclass:
        edns_version = _swig_property(_unboundmodule.edns_data_edns_version_get, _unboundmodule.edns_data_edns_version_set)
    __swig_setmethods__["bits"] = _unboundmodule.edns_data_bits_set
    __swig_getmethods__["bits"] = _unboundmodule.edns_data_bits_get
    if _newclass:
        bits = _swig_property(_unboundmodule.edns_data_bits_get, _unboundmodule.edns_data_bits_set)
    __swig_setmethods__["udp_size"] = _unboundmodule.edns_data_udp_size_set
    __swig_getmethods__["udp_size"] = _unboundmodule.edns_data_udp_size_get
    if _newclass:
        udp_size = _swig_property(_unboundmodule.edns_data_udp_size_get, _unboundmodule.edns_data_udp_size_set)

    def _opt_list_iter(self): return EdnsOptsListIter(self.opt_list)
    __swig_getmethods__["opt_list_iter"] = _opt_list_iter
    if _newclass:opt_list_iter = _swig_property(_opt_list_iter)
    def _opt_list(self): return _edns_data_opt_list_get(self)
    __swig_getmethods__["opt_list"] = _opt_list
    if _newclass:opt_list = _swig_property(_opt_list)


    def __init__(self):
        this = _unboundmodule.new_edns_data()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_edns_data
    __del__ = lambda self: None
edns_data_swigregister = _unboundmodule.edns_data_swigregister
edns_data_swigregister(edns_data)


def _edns_data_opt_list_get(edns):
    return _unboundmodule._edns_data_opt_list_get(edns)
_edns_data_opt_list_get = _unboundmodule._edns_data_opt_list_get
class module_env(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, module_env, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, module_env, name)
    __repr__ = _swig_repr
    __swig_setmethods__["cfg"] = _unboundmodule.module_env_cfg_set
    __swig_getmethods__["cfg"] = _unboundmodule.module_env_cfg_get
    if _newclass:
        cfg = _swig_property(_unboundmodule.module_env_cfg_get, _unboundmodule.module_env_cfg_set)
    __swig_setmethods__["msg_cache"] = _unboundmodule.module_env_msg_cache_set
    __swig_getmethods__["msg_cache"] = _unboundmodule.module_env_msg_cache_get
    if _newclass:
        msg_cache = _swig_property(_unboundmodule.module_env_msg_cache_get, _unboundmodule.module_env_msg_cache_set)
    __swig_setmethods__["rrset_cache"] = _unboundmodule.module_env_rrset_cache_set
    __swig_getmethods__["rrset_cache"] = _unboundmodule.module_env_rrset_cache_get
    if _newclass:
        rrset_cache = _swig_property(_unboundmodule.module_env_rrset_cache_get, _unboundmodule.module_env_rrset_cache_set)
    __swig_setmethods__["infra_cache"] = _unboundmodule.module_env_infra_cache_set
    __swig_getmethods__["infra_cache"] = _unboundmodule.module_env_infra_cache_get
    if _newclass:
        infra_cache = _swig_property(_unboundmodule.module_env_infra_cache_get, _unboundmodule.module_env_infra_cache_set)
    __swig_setmethods__["key_cache"] = _unboundmodule.module_env_key_cache_set
    __swig_getmethods__["key_cache"] = _unboundmodule.module_env_key_cache_get
    if _newclass:
        key_cache = _swig_property(_unboundmodule.module_env_key_cache_get, _unboundmodule.module_env_key_cache_set)
    __swig_setmethods__["send_query"] = _unboundmodule.module_env_send_query_set
    __swig_getmethods__["send_query"] = _unboundmodule.module_env_send_query_get
    if _newclass:
        send_query = _swig_property(_unboundmodule.module_env_send_query_get, _unboundmodule.module_env_send_query_set)
    __swig_setmethods__["detach_subs"] = _unboundmodule.module_env_detach_subs_set
    __swig_getmethods__["detach_subs"] = _unboundmodule.module_env_detach_subs_get
    if _newclass:
        detach_subs = _swig_property(_unboundmodule.module_env_detach_subs_get, _unboundmodule.module_env_detach_subs_set)
    __swig_setmethods__["attach_sub"] = _unboundmodule.module_env_attach_sub_set
    __swig_getmethods__["attach_sub"] = _unboundmodule.module_env_attach_sub_get
    if _newclass:
        attach_sub = _swig_property(_unboundmodule.module_env_attach_sub_get, _unboundmodule.module_env_attach_sub_set)
    __swig_setmethods__["kill_sub"] = _unboundmodule.module_env_kill_sub_set
    __swig_getmethods__["kill_sub"] = _unboundmodule.module_env_kill_sub_get
    if _newclass:
        kill_sub = _swig_property(_unboundmodule.module_env_kill_sub_get, _unboundmodule.module_env_kill_sub_set)
    __swig_setmethods__["detect_cycle"] = _unboundmodule.module_env_detect_cycle_set
    __swig_getmethods__["detect_cycle"] = _unboundmodule.module_env_detect_cycle_get
    if _newclass:
        detect_cycle = _swig_property(_unboundmodule.module_env_detect_cycle_get, _unboundmodule.module_env_detect_cycle_set)
    __swig_setmethods__["scratch"] = _unboundmodule.module_env_scratch_set
    __swig_getmethods__["scratch"] = _unboundmodule.module_env_scratch_get
    if _newclass:
        scratch = _swig_property(_unboundmodule.module_env_scratch_get, _unboundmodule.module_env_scratch_set)
    __swig_setmethods__["scratch_buffer"] = _unboundmodule.module_env_scratch_buffer_set
    __swig_getmethods__["scratch_buffer"] = _unboundmodule.module_env_scratch_buffer_get
    if _newclass:
        scratch_buffer = _swig_property(_unboundmodule.module_env_scratch_buffer_get, _unboundmodule.module_env_scratch_buffer_set)
    __swig_setmethods__["worker"] = _unboundmodule.module_env_worker_set
    __swig_getmethods__["worker"] = _unboundmodule.module_env_worker_get
    if _newclass:
        worker = _swig_property(_unboundmodule.module_env_worker_get, _unboundmodule.module_env_worker_set)
    __swig_setmethods__["mesh"] = _unboundmodule.module_env_mesh_set
    __swig_getmethods__["mesh"] = _unboundmodule.module_env_mesh_get
    if _newclass:
        mesh = _swig_property(_unboundmodule.module_env_mesh_get, _unboundmodule.module_env_mesh_set)
    __swig_setmethods__["alloc"] = _unboundmodule.module_env_alloc_set
    __swig_getmethods__["alloc"] = _unboundmodule.module_env_alloc_get
    if _newclass:
        alloc = _swig_property(_unboundmodule.module_env_alloc_get, _unboundmodule.module_env_alloc_set)
    __swig_setmethods__["rnd"] = _unboundmodule.module_env_rnd_set
    __swig_getmethods__["rnd"] = _unboundmodule.module_env_rnd_get
    if _newclass:
        rnd = _swig_property(_unboundmodule.module_env_rnd_get, _unboundmodule.module_env_rnd_set)
    __swig_setmethods__["now"] = _unboundmodule.module_env_now_set
    __swig_getmethods__["now"] = _unboundmodule.module_env_now_get
    if _newclass:
        now = _swig_property(_unboundmodule.module_env_now_get, _unboundmodule.module_env_now_set)
    __swig_setmethods__["now_tv"] = _unboundmodule.module_env_now_tv_set
    __swig_getmethods__["now_tv"] = _unboundmodule.module_env_now_tv_get
    if _newclass:
        now_tv = _swig_property(_unboundmodule.module_env_now_tv_get, _unboundmodule.module_env_now_tv_set)
    __swig_setmethods__["need_to_validate"] = _unboundmodule.module_env_need_to_validate_set
    __swig_getmethods__["need_to_validate"] = _unboundmodule.module_env_need_to_validate_get
    if _newclass:
        need_to_validate = _swig_property(_unboundmodule.module_env_need_to_validate_get, _unboundmodule.module_env_need_to_validate_set)
    __swig_setmethods__["anchors"] = _unboundmodule.module_env_anchors_set
    __swig_getmethods__["anchors"] = _unboundmodule.module_env_anchors_get
    if _newclass:
        anchors = _swig_property(_unboundmodule.module_env_anchors_get, _unboundmodule.module_env_anchors_set)
    __swig_setmethods__["neg_cache"] = _unboundmodule.module_env_neg_cache_set
    __swig_getmethods__["neg_cache"] = _unboundmodule.module_env_neg_cache_get
    if _newclass:
        neg_cache = _swig_property(_unboundmodule.module_env_neg_cache_get, _unboundmodule.module_env_neg_cache_set)
    __swig_setmethods__["probe_timer"] = _unboundmodule.module_env_probe_timer_set
    __swig_getmethods__["probe_timer"] = _unboundmodule.module_env_probe_timer_get
    if _newclass:
        probe_timer = _swig_property(_unboundmodule.module_env_probe_timer_get, _unboundmodule.module_env_probe_timer_set)
    __swig_setmethods__["fwds"] = _unboundmodule.module_env_fwds_set
    __swig_getmethods__["fwds"] = _unboundmodule.module_env_fwds_get
    if _newclass:
        fwds = _swig_property(_unboundmodule.module_env_fwds_get, _unboundmodule.module_env_fwds_set)
    __swig_setmethods__["hints"] = _unboundmodule.module_env_hints_set
    __swig_getmethods__["hints"] = _unboundmodule.module_env_hints_get
    if _newclass:
        hints = _swig_property(_unboundmodule.module_env_hints_get, _unboundmodule.module_env_hints_set)
    __swig_setmethods__["modinfo"] = _unboundmodule.module_env_modinfo_set
    __swig_getmethods__["modinfo"] = _unboundmodule.module_env_modinfo_get
    if _newclass:
        modinfo = _swig_property(_unboundmodule.module_env_modinfo_get, _unboundmodule.module_env_modinfo_set)
    __swig_setmethods__["inplace_cb_lists"] = _unboundmodule.module_env_inplace_cb_lists_set
    __swig_getmethods__["inplace_cb_lists"] = _unboundmodule.module_env_inplace_cb_lists_get
    if _newclass:
        inplace_cb_lists = _swig_property(_unboundmodule.module_env_inplace_cb_lists_get, _unboundmodule.module_env_inplace_cb_lists_set)
    __swig_setmethods__["edns_known_options"] = _unboundmodule.module_env_edns_known_options_set
    __swig_getmethods__["edns_known_options"] = _unboundmodule.module_env_edns_known_options_get
    if _newclass:
        edns_known_options = _swig_property(_unboundmodule.module_env_edns_known_options_get, _unboundmodule.module_env_edns_known_options_set)
    __swig_setmethods__["edns_known_options_num"] = _unboundmodule.module_env_edns_known_options_num_set
    __swig_getmethods__["edns_known_options_num"] = _unboundmodule.module_env_edns_known_options_num_get
    if _newclass:
        edns_known_options_num = _swig_property(_unboundmodule.module_env_edns_known_options_num_get, _unboundmodule.module_env_edns_known_options_num_set)

    def __init__(self):
        this = _unboundmodule.new_module_env()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_module_env
    __del__ = lambda self: None
module_env_swigregister = _unboundmodule.module_env_swigregister
module_env_swigregister(module_env)

class module_qstate(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, module_qstate, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, module_qstate, name)
    __repr__ = _swig_repr
    __swig_setmethods__["qinfo"] = _unboundmodule.module_qstate_qinfo_set
    __swig_getmethods__["qinfo"] = _unboundmodule.module_qstate_qinfo_get
    if _newclass:
        qinfo = _swig_property(_unboundmodule.module_qstate_qinfo_get, _unboundmodule.module_qstate_qinfo_set)
    __swig_setmethods__["query_flags"] = _unboundmodule.module_qstate_query_flags_set
    __swig_getmethods__["query_flags"] = _unboundmodule.module_qstate_query_flags_get
    if _newclass:
        query_flags = _swig_property(_unboundmodule.module_qstate_query_flags_get, _unboundmodule.module_qstate_query_flags_set)
    __swig_setmethods__["is_priming"] = _unboundmodule.module_qstate_is_priming_set
    __swig_getmethods__["is_priming"] = _unboundmodule.module_qstate_is_priming_get
    if _newclass:
        is_priming = _swig_property(_unboundmodule.module_qstate_is_priming_get, _unboundmodule.module_qstate_is_priming_set)
    __swig_setmethods__["is_valrec"] = _unboundmodule.module_qstate_is_valrec_set
    __swig_getmethods__["is_valrec"] = _unboundmodule.module_qstate_is_valrec_get
    if _newclass:
        is_valrec = _swig_property(_unboundmodule.module_qstate_is_valrec_get, _unboundmodule.module_qstate_is_valrec_set)
    __swig_setmethods__["reply"] = _unboundmodule.module_qstate_reply_set
    __swig_getmethods__["reply"] = _unboundmodule.module_qstate_reply_get
    if _newclass:
        reply = _swig_property(_unboundmodule.module_qstate_reply_get, _unboundmodule.module_qstate_reply_set)
    __swig_setmethods__["return_msg"] = _unboundmodule.module_qstate_return_msg_set
    __swig_getmethods__["return_msg"] = _unboundmodule.module_qstate_return_msg_get
    if _newclass:
        return_msg = _swig_property(_unboundmodule.module_qstate_return_msg_get, _unboundmodule.module_qstate_return_msg_set)
    __swig_setmethods__["return_rcode"] = _unboundmodule.module_qstate_return_rcode_set
    __swig_getmethods__["return_rcode"] = _unboundmodule.module_qstate_return_rcode_get
    if _newclass:
        return_rcode = _swig_property(_unboundmodule.module_qstate_return_rcode_get, _unboundmodule.module_qstate_return_rcode_set)
    __swig_setmethods__["region"] = _unboundmodule.module_qstate_region_set
    __swig_getmethods__["region"] = _unboundmodule.module_qstate_region_get
    if _newclass:
        region = _swig_property(_unboundmodule.module_qstate_region_get, _unboundmodule.module_qstate_region_set)
    __swig_setmethods__["curmod"] = _unboundmodule.module_qstate_curmod_set
    __swig_getmethods__["curmod"] = _unboundmodule.module_qstate_curmod_get
    if _newclass:
        curmod = _swig_property(_unboundmodule.module_qstate_curmod_get, _unboundmodule.module_qstate_curmod_set)
    __swig_setmethods__["prefetch_leeway"] = _unboundmodule.module_qstate_prefetch_leeway_set
    __swig_getmethods__["prefetch_leeway"] = _unboundmodule.module_qstate_prefetch_leeway_get
    if _newclass:
        prefetch_leeway = _swig_property(_unboundmodule.module_qstate_prefetch_leeway_get, _unboundmodule.module_qstate_prefetch_leeway_set)
    __swig_setmethods__["env"] = _unboundmodule.module_qstate_env_set
    __swig_getmethods__["env"] = _unboundmodule.module_qstate_env_get
    if _newclass:
        env = _swig_property(_unboundmodule.module_qstate_env_get, _unboundmodule.module_qstate_env_set)
    __swig_setmethods__["mesh_info"] = _unboundmodule.module_qstate_mesh_info_set
    __swig_getmethods__["mesh_info"] = _unboundmodule.module_qstate_mesh_info_get
    if _newclass:
        mesh_info = _swig_property(_unboundmodule.module_qstate_mesh_info_get, _unboundmodule.module_qstate_mesh_info_set)
    __swig_setmethods__["no_cache_lookup"] = _unboundmodule.module_qstate_no_cache_lookup_set
    __swig_getmethods__["no_cache_lookup"] = _unboundmodule.module_qstate_no_cache_lookup_get
    if _newclass:
        no_cache_lookup = _swig_property(_unboundmodule.module_qstate_no_cache_lookup_get, _unboundmodule.module_qstate_no_cache_lookup_set)
    __swig_setmethods__["no_cache_store"] = _unboundmodule.module_qstate_no_cache_store_set
    __swig_getmethods__["no_cache_store"] = _unboundmodule.module_qstate_no_cache_store_get
    if _newclass:
        no_cache_store = _swig_property(_unboundmodule.module_qstate_no_cache_store_get, _unboundmodule.module_qstate_no_cache_store_set)

    def set_ext_state(self, id, state):
        """Sets the ext state"""
        _unboundmodule._ext_state_set(self, id, state)

    def __ext_state_get(self): return ExtState(self)
    __swig_getmethods__["ext_state"] = __ext_state_get
    if _newclass:ext_state = _swig_property(__ext_state_get)#, __ext_state_set)

    def _edns_opts_front_in_iter(self): return EdnsOptsListIter(self.edns_opts_front_in)
    __swig_getmethods__["edns_opts_front_in_iter"] = _edns_opts_front_in_iter
    if _newclass:edns_opts_front_in_iter = _swig_property(_edns_opts_front_in_iter)
    def _edns_opts_back_out_iter(self): return EdnsOptsListIter(self.edns_opts_back_out)
    __swig_getmethods__["edns_opts_back_out_iter"] = _edns_opts_back_out_iter
    if _newclass:edns_opts_back_out_iter = _swig_property(_edns_opts_back_out_iter)
    def _edns_opts_back_in_iter(self): return EdnsOptsListIter(self.edns_opts_back_in)
    __swig_getmethods__["edns_opts_back_in_iter"] = _edns_opts_back_in_iter
    if _newclass:edns_opts_back_in_iter = _swig_property(_edns_opts_back_in_iter)
    def _edns_opts_front_out_iter(self): return EdnsOptsListIter(self.edns_opts_front_out)
    __swig_getmethods__["edns_opts_front_out_iter"] = _edns_opts_front_out_iter
    if _newclass:edns_opts_front_out_iter = _swig_property(_edns_opts_front_out_iter)

    def _edns_opts_front_in(self): return _edns_opts_front_in_get(self)
    __swig_getmethods__["edns_opts_front_in"] = _edns_opts_front_in
    if _newclass:edns_opts_front_in = _swig_property(_edns_opts_front_in)
    def _edns_opts_back_out(self): return _edns_opts_back_out_get(self)
    __swig_getmethods__["edns_opts_back_out"] = _edns_opts_back_out
    if _newclass:edns_opts_back_out = _swig_property(_edns_opts_back_out)
    def _edns_opts_back_in(self): return _edns_opts_back_in_get(self)
    __swig_getmethods__["edns_opts_back_in"] = _edns_opts_back_in
    if _newclass:edns_opts_back_in = _swig_property(_edns_opts_back_in)
    def _edns_opts_front_out(self): return _edns_opts_front_out_get(self)
    __swig_getmethods__["edns_opts_front_out"] = _edns_opts_front_out
    if _newclass:edns_opts_front_out = _swig_property(_edns_opts_front_out)


    def __init__(self):
        this = _unboundmodule.new_module_qstate()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_module_qstate
    __del__ = lambda self: None
module_qstate_swigregister = _unboundmodule.module_qstate_swigregister
module_qstate_swigregister(module_qstate)

MODULE_COUNT = _unboundmodule.MODULE_COUNT
QF_BIT_CD = _unboundmodule.QF_BIT_CD
QF_BIT_AD = _unboundmodule.QF_BIT_AD
QF_BIT_Z = _unboundmodule.QF_BIT_Z
QF_BIT_RA = _unboundmodule.QF_BIT_RA
QF_BIT_RD = _unboundmodule.QF_BIT_RD
QF_BIT_TC = _unboundmodule.QF_BIT_TC
QF_BIT_AA = _unboundmodule.QF_BIT_AA
QF_BIT_QR = _unboundmodule.QF_BIT_QR
RCODE_NOERROR = _unboundmodule.RCODE_NOERROR
RCODE_FORMERR = _unboundmodule.RCODE_FORMERR
RCODE_SERVFAIL = _unboundmodule.RCODE_SERVFAIL
RCODE_NXDOMAIN = _unboundmodule.RCODE_NXDOMAIN
RCODE_NOTIMPL = _unboundmodule.RCODE_NOTIMPL
RCODE_REFUSED = _unboundmodule.RCODE_REFUSED
RCODE_YXDOMAIN = _unboundmodule.RCODE_YXDOMAIN
RCODE_YXRRSET = _unboundmodule.RCODE_YXRRSET
RCODE_NXRRSET = _unboundmodule.RCODE_NXRRSET
RCODE_NOTAUTH = _unboundmodule.RCODE_NOTAUTH
RCODE_NOTZONE = _unboundmodule.RCODE_NOTZONE

class ExtState:
    def __init__(self, obj): self.obj = obj
    def __str__(self):
        return ", ".join([_unboundmodule.strextstate(_unboundmodule._ext_state_get(self.obj,a)) for a in range(0, _unboundmodule.MODULE_COUNT)])
    def __getitem__(self, index): return _unboundmodule._ext_state_get(self.obj, index)
    def __setitem__(self, index, value): _unboundmodule._ext_state_set(self.obj, index, value)
    def __len__(self): return _unboundmodule.MODULE_COUNT

class EdnsOptsListIter:
    def __init__(self, obj):
        self._current = obj
        self._temp = None
    def __iter__(self): return self
    def __next__(self):
        """Python 3 compatibility"""
        return self._get_next()
    def next(self):
        """Python 2 compatibility"""
        return self._get_next()
    def _get_next(self):
        if not edns_opt_list_is_empty(self._current):
            self._temp = self._current
            self._current = _p_p_edns_option_get_next(self._current)
            return _dereference_edns_option(self._temp)
        else:
            raise StopIteration


def _ext_state_get(q, idx):
    return _unboundmodule._ext_state_get(q, idx)
_ext_state_get = _unboundmodule._ext_state_get

def _ext_state_set(q, idx, state):
    return _unboundmodule._ext_state_set(q, idx, state)
_ext_state_set = _unboundmodule._ext_state_set

def edns_opt_list_is_empty(opt):
    return _unboundmodule.edns_opt_list_is_empty(opt)
edns_opt_list_is_empty = _unboundmodule.edns_opt_list_is_empty

def _dereference_edns_option(opt):
    return _unboundmodule._dereference_edns_option(opt)
_dereference_edns_option = _unboundmodule._dereference_edns_option

def _p_p_edns_option_get_next(opt):
    return _unboundmodule._p_p_edns_option_get_next(opt)
_p_p_edns_option_get_next = _unboundmodule._p_p_edns_option_get_next

def _edns_opts_front_in_get(q):
    return _unboundmodule._edns_opts_front_in_get(q)
_edns_opts_front_in_get = _unboundmodule._edns_opts_front_in_get

def _edns_opts_back_out_get(q):
    return _unboundmodule._edns_opts_back_out_get(q)
_edns_opts_back_out_get = _unboundmodule._edns_opts_back_out_get

def _edns_opts_back_in_get(q):
    return _unboundmodule._edns_opts_back_in_get(q)
_edns_opts_back_in_get = _unboundmodule._edns_opts_back_in_get

def _edns_opts_front_out_get(q):
    return _unboundmodule._edns_opts_front_out_get(q)
_edns_opts_front_out_get = _unboundmodule._edns_opts_front_out_get
class config_strlist(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, config_strlist, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, config_strlist, name)
    __repr__ = _swig_repr
    __swig_setmethods__["next"] = _unboundmodule.config_strlist_next_set
    __swig_getmethods__["next"] = _unboundmodule.config_strlist_next_get
    if _newclass:
        next = _swig_property(_unboundmodule.config_strlist_next_get, _unboundmodule.config_strlist_next_set)
    __swig_setmethods__["str"] = _unboundmodule.config_strlist_str_set
    __swig_getmethods__["str"] = _unboundmodule.config_strlist_str_get
    if _newclass:
        str = _swig_property(_unboundmodule.config_strlist_str_get, _unboundmodule.config_strlist_str_set)

    def __init__(self):
        this = _unboundmodule.new_config_strlist()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_config_strlist
    __del__ = lambda self: None
config_strlist_swigregister = _unboundmodule.config_strlist_swigregister
config_strlist_swigregister(config_strlist)

class config_str2list(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, config_str2list, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, config_str2list, name)
    __repr__ = _swig_repr
    __swig_setmethods__["next"] = _unboundmodule.config_str2list_next_set
    __swig_getmethods__["next"] = _unboundmodule.config_str2list_next_get
    if _newclass:
        next = _swig_property(_unboundmodule.config_str2list_next_get, _unboundmodule.config_str2list_next_set)
    __swig_setmethods__["str"] = _unboundmodule.config_str2list_str_set
    __swig_getmethods__["str"] = _unboundmodule.config_str2list_str_get
    if _newclass:
        str = _swig_property(_unboundmodule.config_str2list_str_get, _unboundmodule.config_str2list_str_set)
    __swig_setmethods__["str2"] = _unboundmodule.config_str2list_str2_set
    __swig_getmethods__["str2"] = _unboundmodule.config_str2list_str2_get
    if _newclass:
        str2 = _swig_property(_unboundmodule.config_str2list_str2_get, _unboundmodule.config_str2list_str2_set)

    def __init__(self):
        this = _unboundmodule.new_config_str2list()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_config_str2list
    __del__ = lambda self: None
config_str2list_swigregister = _unboundmodule.config_str2list_swigregister
config_str2list_swigregister(config_str2list)

class config_file(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, config_file, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, config_file, name)
    __repr__ = _swig_repr
    __swig_setmethods__["verbosity"] = _unboundmodule.config_file_verbosity_set
    __swig_getmethods__["verbosity"] = _unboundmodule.config_file_verbosity_get
    if _newclass:
        verbosity = _swig_property(_unboundmodule.config_file_verbosity_get, _unboundmodule.config_file_verbosity_set)
    __swig_setmethods__["stat_interval"] = _unboundmodule.config_file_stat_interval_set
    __swig_getmethods__["stat_interval"] = _unboundmodule.config_file_stat_interval_get
    if _newclass:
        stat_interval = _swig_property(_unboundmodule.config_file_stat_interval_get, _unboundmodule.config_file_stat_interval_set)
    __swig_setmethods__["stat_cumulative"] = _unboundmodule.config_file_stat_cumulative_set
    __swig_getmethods__["stat_cumulative"] = _unboundmodule.config_file_stat_cumulative_get
    if _newclass:
        stat_cumulative = _swig_property(_unboundmodule.config_file_stat_cumulative_get, _unboundmodule.config_file_stat_cumulative_set)
    __swig_setmethods__["stat_extended"] = _unboundmodule.config_file_stat_extended_set
    __swig_getmethods__["stat_extended"] = _unboundmodule.config_file_stat_extended_get
    if _newclass:
        stat_extended = _swig_property(_unboundmodule.config_file_stat_extended_get, _unboundmodule.config_file_stat_extended_set)
    __swig_setmethods__["num_threads"] = _unboundmodule.config_file_num_threads_set
    __swig_getmethods__["num_threads"] = _unboundmodule.config_file_num_threads_get
    if _newclass:
        num_threads = _swig_property(_unboundmodule.config_file_num_threads_get, _unboundmodule.config_file_num_threads_set)
    __swig_setmethods__["port"] = _unboundmodule.config_file_port_set
    __swig_getmethods__["port"] = _unboundmodule.config_file_port_get
    if _newclass:
        port = _swig_property(_unboundmodule.config_file_port_get, _unboundmodule.config_file_port_set)
    __swig_setmethods__["do_ip4"] = _unboundmodule.config_file_do_ip4_set
    __swig_getmethods__["do_ip4"] = _unboundmodule.config_file_do_ip4_get
    if _newclass:
        do_ip4 = _swig_property(_unboundmodule.config_file_do_ip4_get, _unboundmodule.config_file_do_ip4_set)
    __swig_setmethods__["do_ip6"] = _unboundmodule.config_file_do_ip6_set
    __swig_getmethods__["do_ip6"] = _unboundmodule.config_file_do_ip6_get
    if _newclass:
        do_ip6 = _swig_property(_unboundmodule.config_file_do_ip6_get, _unboundmodule.config_file_do_ip6_set)
    __swig_setmethods__["do_udp"] = _unboundmodule.config_file_do_udp_set
    __swig_getmethods__["do_udp"] = _unboundmodule.config_file_do_udp_get
    if _newclass:
        do_udp = _swig_property(_unboundmodule.config_file_do_udp_get, _unboundmodule.config_file_do_udp_set)
    __swig_setmethods__["do_tcp"] = _unboundmodule.config_file_do_tcp_set
    __swig_getmethods__["do_tcp"] = _unboundmodule.config_file_do_tcp_get
    if _newclass:
        do_tcp = _swig_property(_unboundmodule.config_file_do_tcp_get, _unboundmodule.config_file_do_tcp_set)
    __swig_setmethods__["outgoing_num_ports"] = _unboundmodule.config_file_outgoing_num_ports_set
    __swig_getmethods__["outgoing_num_ports"] = _unboundmodule.config_file_outgoing_num_ports_get
    if _newclass:
        outgoing_num_ports = _swig_property(_unboundmodule.config_file_outgoing_num_ports_get, _unboundmodule.config_file_outgoing_num_ports_set)
    __swig_setmethods__["outgoing_num_tcp"] = _unboundmodule.config_file_outgoing_num_tcp_set
    __swig_getmethods__["outgoing_num_tcp"] = _unboundmodule.config_file_outgoing_num_tcp_get
    if _newclass:
        outgoing_num_tcp = _swig_property(_unboundmodule.config_file_outgoing_num_tcp_get, _unboundmodule.config_file_outgoing_num_tcp_set)
    __swig_setmethods__["incoming_num_tcp"] = _unboundmodule.config_file_incoming_num_tcp_set
    __swig_getmethods__["incoming_num_tcp"] = _unboundmodule.config_file_incoming_num_tcp_get
    if _newclass:
        incoming_num_tcp = _swig_property(_unboundmodule.config_file_incoming_num_tcp_get, _unboundmodule.config_file_incoming_num_tcp_set)
    __swig_setmethods__["outgoing_avail_ports"] = _unboundmodule.config_file_outgoing_avail_ports_set
    __swig_getmethods__["outgoing_avail_ports"] = _unboundmodule.config_file_outgoing_avail_ports_get
    if _newclass:
        outgoing_avail_ports = _swig_property(_unboundmodule.config_file_outgoing_avail_ports_get, _unboundmodule.config_file_outgoing_avail_ports_set)
    __swig_setmethods__["msg_buffer_size"] = _unboundmodule.config_file_msg_buffer_size_set
    __swig_getmethods__["msg_buffer_size"] = _unboundmodule.config_file_msg_buffer_size_get
    if _newclass:
        msg_buffer_size = _swig_property(_unboundmodule.config_file_msg_buffer_size_get, _unboundmodule.config_file_msg_buffer_size_set)
    __swig_setmethods__["msg_cache_size"] = _unboundmodule.config_file_msg_cache_size_set
    __swig_getmethods__["msg_cache_size"] = _unboundmodule.config_file_msg_cache_size_get
    if _newclass:
        msg_cache_size = _swig_property(_unboundmodule.config_file_msg_cache_size_get, _unboundmodule.config_file_msg_cache_size_set)
    __swig_setmethods__["msg_cache_slabs"] = _unboundmodule.config_file_msg_cache_slabs_set
    __swig_getmethods__["msg_cache_slabs"] = _unboundmodule.config_file_msg_cache_slabs_get
    if _newclass:
        msg_cache_slabs = _swig_property(_unboundmodule.config_file_msg_cache_slabs_get, _unboundmodule.config_file_msg_cache_slabs_set)
    __swig_setmethods__["num_queries_per_thread"] = _unboundmodule.config_file_num_queries_per_thread_set
    __swig_getmethods__["num_queries_per_thread"] = _unboundmodule.config_file_num_queries_per_thread_get
    if _newclass:
        num_queries_per_thread = _swig_property(_unboundmodule.config_file_num_queries_per_thread_get, _unboundmodule.config_file_num_queries_per_thread_set)
    __swig_setmethods__["jostle_time"] = _unboundmodule.config_file_jostle_time_set
    __swig_getmethods__["jostle_time"] = _unboundmodule.config_file_jostle_time_get
    if _newclass:
        jostle_time = _swig_property(_unboundmodule.config_file_jostle_time_get, _unboundmodule.config_file_jostle_time_set)
    __swig_setmethods__["rrset_cache_size"] = _unboundmodule.config_file_rrset_cache_size_set
    __swig_getmethods__["rrset_cache_size"] = _unboundmodule.config_file_rrset_cache_size_get
    if _newclass:
        rrset_cache_size = _swig_property(_unboundmodule.config_file_rrset_cache_size_get, _unboundmodule.config_file_rrset_cache_size_set)
    __swig_setmethods__["rrset_cache_slabs"] = _unboundmodule.config_file_rrset_cache_slabs_set
    __swig_getmethods__["rrset_cache_slabs"] = _unboundmodule.config_file_rrset_cache_slabs_get
    if _newclass:
        rrset_cache_slabs = _swig_property(_unboundmodule.config_file_rrset_cache_slabs_get, _unboundmodule.config_file_rrset_cache_slabs_set)
    __swig_setmethods__["host_ttl"] = _unboundmodule.config_file_host_ttl_set
    __swig_getmethods__["host_ttl"] = _unboundmodule.config_file_host_ttl_get
    if _newclass:
        host_ttl = _swig_property(_unboundmodule.config_file_host_ttl_get, _unboundmodule.config_file_host_ttl_set)
    __swig_setmethods__["infra_cache_slabs"] = _unboundmodule.config_file_infra_cache_slabs_set
    __swig_getmethods__["infra_cache_slabs"] = _unboundmodule.config_file_infra_cache_slabs_get
    if _newclass:
        infra_cache_slabs = _swig_property(_unboundmodule.config_file_infra_cache_slabs_get, _unboundmodule.config_file_infra_cache_slabs_set)
    __swig_setmethods__["infra_cache_numhosts"] = _unboundmodule.config_file_infra_cache_numhosts_set
    __swig_getmethods__["infra_cache_numhosts"] = _unboundmodule.config_file_infra_cache_numhosts_get
    if _newclass:
        infra_cache_numhosts = _swig_property(_unboundmodule.config_file_infra_cache_numhosts_get, _unboundmodule.config_file_infra_cache_numhosts_set)
    __swig_setmethods__["target_fetch_policy"] = _unboundmodule.config_file_target_fetch_policy_set
    __swig_getmethods__["target_fetch_policy"] = _unboundmodule.config_file_target_fetch_policy_get
    if _newclass:
        target_fetch_policy = _swig_property(_unboundmodule.config_file_target_fetch_policy_get, _unboundmodule.config_file_target_fetch_policy_set)
    __swig_setmethods__["if_automatic"] = _unboundmodule.config_file_if_automatic_set
    __swig_getmethods__["if_automatic"] = _unboundmodule.config_file_if_automatic_get
    if _newclass:
        if_automatic = _swig_property(_unboundmodule.config_file_if_automatic_get, _unboundmodule.config_file_if_automatic_set)
    __swig_setmethods__["num_ifs"] = _unboundmodule.config_file_num_ifs_set
    __swig_getmethods__["num_ifs"] = _unboundmodule.config_file_num_ifs_get
    if _newclass:
        num_ifs = _swig_property(_unboundmodule.config_file_num_ifs_get, _unboundmodule.config_file_num_ifs_set)
    __swig_setmethods__["ifs"] = _unboundmodule.config_file_ifs_set
    __swig_getmethods__["ifs"] = _unboundmodule.config_file_ifs_get
    if _newclass:
        ifs = _swig_property(_unboundmodule.config_file_ifs_get, _unboundmodule.config_file_ifs_set)
    __swig_setmethods__["num_out_ifs"] = _unboundmodule.config_file_num_out_ifs_set
    __swig_getmethods__["num_out_ifs"] = _unboundmodule.config_file_num_out_ifs_get
    if _newclass:
        num_out_ifs = _swig_property(_unboundmodule.config_file_num_out_ifs_get, _unboundmodule.config_file_num_out_ifs_set)
    __swig_setmethods__["out_ifs"] = _unboundmodule.config_file_out_ifs_set
    __swig_getmethods__["out_ifs"] = _unboundmodule.config_file_out_ifs_get
    if _newclass:
        out_ifs = _swig_property(_unboundmodule.config_file_out_ifs_get, _unboundmodule.config_file_out_ifs_set)
    __swig_setmethods__["root_hints"] = _unboundmodule.config_file_root_hints_set
    __swig_getmethods__["root_hints"] = _unboundmodule.config_file_root_hints_get
    if _newclass:
        root_hints = _swig_property(_unboundmodule.config_file_root_hints_get, _unboundmodule.config_file_root_hints_set)
    __swig_setmethods__["stubs"] = _unboundmodule.config_file_stubs_set
    __swig_getmethods__["stubs"] = _unboundmodule.config_file_stubs_get
    if _newclass:
        stubs = _swig_property(_unboundmodule.config_file_stubs_get, _unboundmodule.config_file_stubs_set)
    __swig_setmethods__["forwards"] = _unboundmodule.config_file_forwards_set
    __swig_getmethods__["forwards"] = _unboundmodule.config_file_forwards_get
    if _newclass:
        forwards = _swig_property(_unboundmodule.config_file_forwards_get, _unboundmodule.config_file_forwards_set)
    __swig_setmethods__["donotqueryaddrs"] = _unboundmodule.config_file_donotqueryaddrs_set
    __swig_getmethods__["donotqueryaddrs"] = _unboundmodule.config_file_donotqueryaddrs_get
    if _newclass:
        donotqueryaddrs = _swig_property(_unboundmodule.config_file_donotqueryaddrs_get, _unboundmodule.config_file_donotqueryaddrs_set)
    __swig_setmethods__["acls"] = _unboundmodule.config_file_acls_set
    __swig_getmethods__["acls"] = _unboundmodule.config_file_acls_get
    if _newclass:
        acls = _swig_property(_unboundmodule.config_file_acls_get, _unboundmodule.config_file_acls_set)
    __swig_setmethods__["donotquery_localhost"] = _unboundmodule.config_file_donotquery_localhost_set
    __swig_getmethods__["donotquery_localhost"] = _unboundmodule.config_file_donotquery_localhost_get
    if _newclass:
        donotquery_localhost = _swig_property(_unboundmodule.config_file_donotquery_localhost_get, _unboundmodule.config_file_donotquery_localhost_set)
    __swig_setmethods__["harden_short_bufsize"] = _unboundmodule.config_file_harden_short_bufsize_set
    __swig_getmethods__["harden_short_bufsize"] = _unboundmodule.config_file_harden_short_bufsize_get
    if _newclass:
        harden_short_bufsize = _swig_property(_unboundmodule.config_file_harden_short_bufsize_get, _unboundmodule.config_file_harden_short_bufsize_set)
    __swig_setmethods__["harden_large_queries"] = _unboundmodule.config_file_harden_large_queries_set
    __swig_getmethods__["harden_large_queries"] = _unboundmodule.config_file_harden_large_queries_get
    if _newclass:
        harden_large_queries = _swig_property(_unboundmodule.config_file_harden_large_queries_get, _unboundmodule.config_file_harden_large_queries_set)
    __swig_setmethods__["harden_glue"] = _unboundmodule.config_file_harden_glue_set
    __swig_getmethods__["harden_glue"] = _unboundmodule.config_file_harden_glue_get
    if _newclass:
        harden_glue = _swig_property(_unboundmodule.config_file_harden_glue_get, _unboundmodule.config_file_harden_glue_set)
    __swig_setmethods__["harden_dnssec_stripped"] = _unboundmodule.config_file_harden_dnssec_stripped_set
    __swig_getmethods__["harden_dnssec_stripped"] = _unboundmodule.config_file_harden_dnssec_stripped_get
    if _newclass:
        harden_dnssec_stripped = _swig_property(_unboundmodule.config_file_harden_dnssec_stripped_get, _unboundmodule.config_file_harden_dnssec_stripped_set)
    __swig_setmethods__["harden_referral_path"] = _unboundmodule.config_file_harden_referral_path_set
    __swig_getmethods__["harden_referral_path"] = _unboundmodule.config_file_harden_referral_path_get
    if _newclass:
        harden_referral_path = _swig_property(_unboundmodule.config_file_harden_referral_path_get, _unboundmodule.config_file_harden_referral_path_set)
    __swig_setmethods__["use_caps_bits_for_id"] = _unboundmodule.config_file_use_caps_bits_for_id_set
    __swig_getmethods__["use_caps_bits_for_id"] = _unboundmodule.config_file_use_caps_bits_for_id_get
    if _newclass:
        use_caps_bits_for_id = _swig_property(_unboundmodule.config_file_use_caps_bits_for_id_get, _unboundmodule.config_file_use_caps_bits_for_id_set)
    __swig_setmethods__["private_address"] = _unboundmodule.config_file_private_address_set
    __swig_getmethods__["private_address"] = _unboundmodule.config_file_private_address_get
    if _newclass:
        private_address = _swig_property(_unboundmodule.config_file_private_address_get, _unboundmodule.config_file_private_address_set)
    __swig_setmethods__["private_domain"] = _unboundmodule.config_file_private_domain_set
    __swig_getmethods__["private_domain"] = _unboundmodule.config_file_private_domain_get
    if _newclass:
        private_domain = _swig_property(_unboundmodule.config_file_private_domain_get, _unboundmodule.config_file_private_domain_set)
    __swig_setmethods__["unwanted_threshold"] = _unboundmodule.config_file_unwanted_threshold_set
    __swig_getmethods__["unwanted_threshold"] = _unboundmodule.config_file_unwanted_threshold_get
    if _newclass:
        unwanted_threshold = _swig_property(_unboundmodule.config_file_unwanted_threshold_get, _unboundmodule.config_file_unwanted_threshold_set)
    __swig_setmethods__["chrootdir"] = _unboundmodule.config_file_chrootdir_set
    __swig_getmethods__["chrootdir"] = _unboundmodule.config_file_chrootdir_get
    if _newclass:
        chrootdir = _swig_property(_unboundmodule.config_file_chrootdir_get, _unboundmodule.config_file_chrootdir_set)
    __swig_setmethods__["username"] = _unboundmodule.config_file_username_set
    __swig_getmethods__["username"] = _unboundmodule.config_file_username_get
    if _newclass:
        username = _swig_property(_unboundmodule.config_file_username_get, _unboundmodule.config_file_username_set)
    __swig_setmethods__["directory"] = _unboundmodule.config_file_directory_set
    __swig_getmethods__["directory"] = _unboundmodule.config_file_directory_get
    if _newclass:
        directory = _swig_property(_unboundmodule.config_file_directory_get, _unboundmodule.config_file_directory_set)
    __swig_setmethods__["logfile"] = _unboundmodule.config_file_logfile_set
    __swig_getmethods__["logfile"] = _unboundmodule.config_file_logfile_get
    if _newclass:
        logfile = _swig_property(_unboundmodule.config_file_logfile_get, _unboundmodule.config_file_logfile_set)
    __swig_setmethods__["pidfile"] = _unboundmodule.config_file_pidfile_set
    __swig_getmethods__["pidfile"] = _unboundmodule.config_file_pidfile_get
    if _newclass:
        pidfile = _swig_property(_unboundmodule.config_file_pidfile_get, _unboundmodule.config_file_pidfile_set)
    __swig_setmethods__["use_syslog"] = _unboundmodule.config_file_use_syslog_set
    __swig_getmethods__["use_syslog"] = _unboundmodule.config_file_use_syslog_get
    if _newclass:
        use_syslog = _swig_property(_unboundmodule.config_file_use_syslog_get, _unboundmodule.config_file_use_syslog_set)
    __swig_setmethods__["hide_identity"] = _unboundmodule.config_file_hide_identity_set
    __swig_getmethods__["hide_identity"] = _unboundmodule.config_file_hide_identity_get
    if _newclass:
        hide_identity = _swig_property(_unboundmodule.config_file_hide_identity_get, _unboundmodule.config_file_hide_identity_set)
    __swig_setmethods__["hide_version"] = _unboundmodule.config_file_hide_version_set
    __swig_getmethods__["hide_version"] = _unboundmodule.config_file_hide_version_get
    if _newclass:
        hide_version = _swig_property(_unboundmodule.config_file_hide_version_get, _unboundmodule.config_file_hide_version_set)
    __swig_setmethods__["identity"] = _unboundmodule.config_file_identity_set
    __swig_getmethods__["identity"] = _unboundmodule.config_file_identity_get
    if _newclass:
        identity = _swig_property(_unboundmodule.config_file_identity_get, _unboundmodule.config_file_identity_set)
    __swig_setmethods__["version"] = _unboundmodule.config_file_version_set
    __swig_getmethods__["version"] = _unboundmodule.config_file_version_get
    if _newclass:
        version = _swig_property(_unboundmodule.config_file_version_get, _unboundmodule.config_file_version_set)
    __swig_setmethods__["module_conf"] = _unboundmodule.config_file_module_conf_set
    __swig_getmethods__["module_conf"] = _unboundmodule.config_file_module_conf_get
    if _newclass:
        module_conf = _swig_property(_unboundmodule.config_file_module_conf_get, _unboundmodule.config_file_module_conf_set)
    __swig_setmethods__["trust_anchor_file_list"] = _unboundmodule.config_file_trust_anchor_file_list_set
    __swig_getmethods__["trust_anchor_file_list"] = _unboundmodule.config_file_trust_anchor_file_list_get
    if _newclass:
        trust_anchor_file_list = _swig_property(_unboundmodule.config_file_trust_anchor_file_list_get, _unboundmodule.config_file_trust_anchor_file_list_set)
    __swig_setmethods__["trust_anchor_list"] = _unboundmodule.config_file_trust_anchor_list_set
    __swig_getmethods__["trust_anchor_list"] = _unboundmodule.config_file_trust_anchor_list_get
    if _newclass:
        trust_anchor_list = _swig_property(_unboundmodule.config_file_trust_anchor_list_get, _unboundmodule.config_file_trust_anchor_list_set)
    __swig_setmethods__["trusted_keys_file_list"] = _unboundmodule.config_file_trusted_keys_file_list_set
    __swig_getmethods__["trusted_keys_file_list"] = _unboundmodule.config_file_trusted_keys_file_list_get
    if _newclass:
        trusted_keys_file_list = _swig_property(_unboundmodule.config_file_trusted_keys_file_list_get, _unboundmodule.config_file_trusted_keys_file_list_set)
    __swig_setmethods__["dlv_anchor_file"] = _unboundmodule.config_file_dlv_anchor_file_set
    __swig_getmethods__["dlv_anchor_file"] = _unboundmodule.config_file_dlv_anchor_file_get
    if _newclass:
        dlv_anchor_file = _swig_property(_unboundmodule.config_file_dlv_anchor_file_get, _unboundmodule.config_file_dlv_anchor_file_set)
    __swig_setmethods__["dlv_anchor_list"] = _unboundmodule.config_file_dlv_anchor_list_set
    __swig_getmethods__["dlv_anchor_list"] = _unboundmodule.config_file_dlv_anchor_list_get
    if _newclass:
        dlv_anchor_list = _swig_property(_unboundmodule.config_file_dlv_anchor_list_get, _unboundmodule.config_file_dlv_anchor_list_set)
    __swig_setmethods__["max_ttl"] = _unboundmodule.config_file_max_ttl_set
    __swig_getmethods__["max_ttl"] = _unboundmodule.config_file_max_ttl_get
    if _newclass:
        max_ttl = _swig_property(_unboundmodule.config_file_max_ttl_get, _unboundmodule.config_file_max_ttl_set)
    __swig_setmethods__["val_date_override"] = _unboundmodule.config_file_val_date_override_set
    __swig_getmethods__["val_date_override"] = _unboundmodule.config_file_val_date_override_get
    if _newclass:
        val_date_override = _swig_property(_unboundmodule.config_file_val_date_override_get, _unboundmodule.config_file_val_date_override_set)
    __swig_setmethods__["bogus_ttl"] = _unboundmodule.config_file_bogus_ttl_set
    __swig_getmethods__["bogus_ttl"] = _unboundmodule.config_file_bogus_ttl_get
    if _newclass:
        bogus_ttl = _swig_property(_unboundmodule.config_file_bogus_ttl_get, _unboundmodule.config_file_bogus_ttl_set)
    __swig_setmethods__["val_clean_additional"] = _unboundmodule.config_file_val_clean_additional_set
    __swig_getmethods__["val_clean_additional"] = _unboundmodule.config_file_val_clean_additional_get
    if _newclass:
        val_clean_additional = _swig_property(_unboundmodule.config_file_val_clean_additional_get, _unboundmodule.config_file_val_clean_additional_set)
    __swig_setmethods__["val_permissive_mode"] = _unboundmodule.config_file_val_permissive_mode_set
    __swig_getmethods__["val_permissive_mode"] = _unboundmodule.config_file_val_permissive_mode_get
    if _newclass:
        val_permissive_mode = _swig_property(_unboundmodule.config_file_val_permissive_mode_get, _unboundmodule.config_file_val_permissive_mode_set)
    __swig_setmethods__["val_nsec3_key_iterations"] = _unboundmodule.config_file_val_nsec3_key_iterations_set
    __swig_getmethods__["val_nsec3_key_iterations"] = _unboundmodule.config_file_val_nsec3_key_iterations_get
    if _newclass:
        val_nsec3_key_iterations = _swig_property(_unboundmodule.config_file_val_nsec3_key_iterations_get, _unboundmodule.config_file_val_nsec3_key_iterations_set)
    __swig_setmethods__["key_cache_size"] = _unboundmodule.config_file_key_cache_size_set
    __swig_getmethods__["key_cache_size"] = _unboundmodule.config_file_key_cache_size_get
    if _newclass:
        key_cache_size = _swig_property(_unboundmodule.config_file_key_cache_size_get, _unboundmodule.config_file_key_cache_size_set)
    __swig_setmethods__["key_cache_slabs"] = _unboundmodule.config_file_key_cache_slabs_set
    __swig_getmethods__["key_cache_slabs"] = _unboundmodule.config_file_key_cache_slabs_get
    if _newclass:
        key_cache_slabs = _swig_property(_unboundmodule.config_file_key_cache_slabs_get, _unboundmodule.config_file_key_cache_slabs_set)
    __swig_setmethods__["neg_cache_size"] = _unboundmodule.config_file_neg_cache_size_set
    __swig_getmethods__["neg_cache_size"] = _unboundmodule.config_file_neg_cache_size_get
    if _newclass:
        neg_cache_size = _swig_property(_unboundmodule.config_file_neg_cache_size_get, _unboundmodule.config_file_neg_cache_size_set)
    __swig_setmethods__["local_zones"] = _unboundmodule.config_file_local_zones_set
    __swig_getmethods__["local_zones"] = _unboundmodule.config_file_local_zones_get
    if _newclass:
        local_zones = _swig_property(_unboundmodule.config_file_local_zones_get, _unboundmodule.config_file_local_zones_set)
    __swig_setmethods__["local_zones_nodefault"] = _unboundmodule.config_file_local_zones_nodefault_set
    __swig_getmethods__["local_zones_nodefault"] = _unboundmodule.config_file_local_zones_nodefault_get
    if _newclass:
        local_zones_nodefault = _swig_property(_unboundmodule.config_file_local_zones_nodefault_get, _unboundmodule.config_file_local_zones_nodefault_set)
    __swig_setmethods__["local_data"] = _unboundmodule.config_file_local_data_set
    __swig_getmethods__["local_data"] = _unboundmodule.config_file_local_data_get
    if _newclass:
        local_data = _swig_property(_unboundmodule.config_file_local_data_get, _unboundmodule.config_file_local_data_set)
    __swig_setmethods__["remote_control_enable"] = _unboundmodule.config_file_remote_control_enable_set
    __swig_getmethods__["remote_control_enable"] = _unboundmodule.config_file_remote_control_enable_get
    if _newclass:
        remote_control_enable = _swig_property(_unboundmodule.config_file_remote_control_enable_get, _unboundmodule.config_file_remote_control_enable_set)
    __swig_setmethods__["control_ifs"] = _unboundmodule.config_file_control_ifs_set
    __swig_getmethods__["control_ifs"] = _unboundmodule.config_file_control_ifs_get
    if _newclass:
        control_ifs = _swig_property(_unboundmodule.config_file_control_ifs_get, _unboundmodule.config_file_control_ifs_set)
    __swig_setmethods__["control_port"] = _unboundmodule.config_file_control_port_set
    __swig_getmethods__["control_port"] = _unboundmodule.config_file_control_port_get
    if _newclass:
        control_port = _swig_property(_unboundmodule.config_file_control_port_get, _unboundmodule.config_file_control_port_set)
    __swig_setmethods__["server_key_file"] = _unboundmodule.config_file_server_key_file_set
    __swig_getmethods__["server_key_file"] = _unboundmodule.config_file_server_key_file_get
    if _newclass:
        server_key_file = _swig_property(_unboundmodule.config_file_server_key_file_get, _unboundmodule.config_file_server_key_file_set)
    __swig_setmethods__["server_cert_file"] = _unboundmodule.config_file_server_cert_file_set
    __swig_getmethods__["server_cert_file"] = _unboundmodule.config_file_server_cert_file_get
    if _newclass:
        server_cert_file = _swig_property(_unboundmodule.config_file_server_cert_file_get, _unboundmodule.config_file_server_cert_file_set)
    __swig_setmethods__["control_key_file"] = _unboundmodule.config_file_control_key_file_set
    __swig_getmethods__["control_key_file"] = _unboundmodule.config_file_control_key_file_get
    if _newclass:
        control_key_file = _swig_property(_unboundmodule.config_file_control_key_file_get, _unboundmodule.config_file_control_key_file_set)
    __swig_setmethods__["control_cert_file"] = _unboundmodule.config_file_control_cert_file_set
    __swig_getmethods__["control_cert_file"] = _unboundmodule.config_file_control_cert_file_get
    if _newclass:
        control_cert_file = _swig_property(_unboundmodule.config_file_control_cert_file_get, _unboundmodule.config_file_control_cert_file_set)
    __swig_setmethods__["do_daemonize"] = _unboundmodule.config_file_do_daemonize_set
    __swig_getmethods__["do_daemonize"] = _unboundmodule.config_file_do_daemonize_get
    if _newclass:
        do_daemonize = _swig_property(_unboundmodule.config_file_do_daemonize_get, _unboundmodule.config_file_do_daemonize_set)
    __swig_setmethods__["python_script"] = _unboundmodule.config_file_python_script_set
    __swig_getmethods__["python_script"] = _unboundmodule.config_file_python_script_get
    if _newclass:
        python_script = _swig_property(_unboundmodule.config_file_python_script_get, _unboundmodule.config_file_python_script_set)

    def __init__(self):
        this = _unboundmodule.new_config_file()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_config_file
    __del__ = lambda self: None
config_file_swigregister = _unboundmodule.config_file_swigregister
config_file_swigregister(config_file)

class delegpt_ns(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, delegpt_ns, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, delegpt_ns, name)
    __repr__ = _swig_repr
    __swig_setmethods__["next"] = _unboundmodule.delegpt_ns_next_set
    __swig_getmethods__["next"] = _unboundmodule.delegpt_ns_next_get
    if _newclass:
        next = _swig_property(_unboundmodule.delegpt_ns_next_get, _unboundmodule.delegpt_ns_next_set)
    __swig_setmethods__["resolved"] = _unboundmodule.delegpt_ns_resolved_set
    __swig_getmethods__["resolved"] = _unboundmodule.delegpt_ns_resolved_get
    if _newclass:
        resolved = _swig_property(_unboundmodule.delegpt_ns_resolved_get, _unboundmodule.delegpt_ns_resolved_set)
    __swig_setmethods__["got4"] = _unboundmodule.delegpt_ns_got4_set
    __swig_getmethods__["got4"] = _unboundmodule.delegpt_ns_got4_get
    if _newclass:
        got4 = _swig_property(_unboundmodule.delegpt_ns_got4_get, _unboundmodule.delegpt_ns_got4_set)
    __swig_setmethods__["got6"] = _unboundmodule.delegpt_ns_got6_set
    __swig_getmethods__["got6"] = _unboundmodule.delegpt_ns_got6_get
    if _newclass:
        got6 = _swig_property(_unboundmodule.delegpt_ns_got6_get, _unboundmodule.delegpt_ns_got6_set)
    __swig_setmethods__["lame"] = _unboundmodule.delegpt_ns_lame_set
    __swig_getmethods__["lame"] = _unboundmodule.delegpt_ns_lame_get
    if _newclass:
        lame = _swig_property(_unboundmodule.delegpt_ns_lame_get, _unboundmodule.delegpt_ns_lame_set)
    __swig_setmethods__["done_pside4"] = _unboundmodule.delegpt_ns_done_pside4_set
    __swig_getmethods__["done_pside4"] = _unboundmodule.delegpt_ns_done_pside4_get
    if _newclass:
        done_pside4 = _swig_property(_unboundmodule.delegpt_ns_done_pside4_get, _unboundmodule.delegpt_ns_done_pside4_set)
    __swig_setmethods__["done_pside6"] = _unboundmodule.delegpt_ns_done_pside6_set
    __swig_getmethods__["done_pside6"] = _unboundmodule.delegpt_ns_done_pside6_get
    if _newclass:
        done_pside6 = _swig_property(_unboundmodule.delegpt_ns_done_pside6_get, _unboundmodule.delegpt_ns_done_pside6_set)

    __swig_getmethods__["dname"] = _unboundmodule._get_dpns_dname
    if _newclass:dname = _swig_property(_unboundmodule._get_dpns_dname)

    __swig_getmethods__["dname_list"] = _unboundmodule._get_dpns_dname_components
    if _newclass:dname_list = _swig_property(_unboundmodule._get_dpns_dname_components)

    def _get_dname_str(self): return dnameAsStr(self.dname)
    __swig_getmethods__["dname_str"] = _get_dname_str
    if _newclass:dname_str = _swig_property(_get_dname_str)


    def __init__(self):
        this = _unboundmodule.new_delegpt_ns()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_delegpt_ns
    __del__ = lambda self: None
delegpt_ns_swigregister = _unboundmodule.delegpt_ns_swigregister
delegpt_ns_swigregister(delegpt_ns)

class delegpt_addr(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, delegpt_addr, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, delegpt_addr, name)
    __repr__ = _swig_repr
    __swig_setmethods__["next_result"] = _unboundmodule.delegpt_addr_next_result_set
    __swig_getmethods__["next_result"] = _unboundmodule.delegpt_addr_next_result_get
    if _newclass:
        next_result = _swig_property(_unboundmodule.delegpt_addr_next_result_get, _unboundmodule.delegpt_addr_next_result_set)
    __swig_setmethods__["next_usable"] = _unboundmodule.delegpt_addr_next_usable_set
    __swig_getmethods__["next_usable"] = _unboundmodule.delegpt_addr_next_usable_get
    if _newclass:
        next_usable = _swig_property(_unboundmodule.delegpt_addr_next_usable_get, _unboundmodule.delegpt_addr_next_usable_set)
    __swig_setmethods__["next_target"] = _unboundmodule.delegpt_addr_next_target_set
    __swig_getmethods__["next_target"] = _unboundmodule.delegpt_addr_next_target_get
    if _newclass:
        next_target = _swig_property(_unboundmodule.delegpt_addr_next_target_get, _unboundmodule.delegpt_addr_next_target_set)
    __swig_setmethods__["attempts"] = _unboundmodule.delegpt_addr_attempts_set
    __swig_getmethods__["attempts"] = _unboundmodule.delegpt_addr_attempts_get
    if _newclass:
        attempts = _swig_property(_unboundmodule.delegpt_addr_attempts_get, _unboundmodule.delegpt_addr_attempts_set)
    __swig_setmethods__["sel_rtt"] = _unboundmodule.delegpt_addr_sel_rtt_set
    __swig_getmethods__["sel_rtt"] = _unboundmodule.delegpt_addr_sel_rtt_get
    if _newclass:
        sel_rtt = _swig_property(_unboundmodule.delegpt_addr_sel_rtt_get, _unboundmodule.delegpt_addr_sel_rtt_set)
    __swig_setmethods__["bogus"] = _unboundmodule.delegpt_addr_bogus_set
    __swig_getmethods__["bogus"] = _unboundmodule.delegpt_addr_bogus_get
    if _newclass:
        bogus = _swig_property(_unboundmodule.delegpt_addr_bogus_get, _unboundmodule.delegpt_addr_bogus_set)
    __swig_setmethods__["lame"] = _unboundmodule.delegpt_addr_lame_set
    __swig_getmethods__["lame"] = _unboundmodule.delegpt_addr_lame_get
    if _newclass:
        lame = _swig_property(_unboundmodule.delegpt_addr_lame_get, _unboundmodule.delegpt_addr_lame_set)

    def _addr_get(self): return _delegpt_addr_addr_get(self)
    __swig_getmethods__["addr"] = _addr_get
    if _newclass:addr = _swig_property(_addr_get)


    def __init__(self):
        this = _unboundmodule.new_delegpt_addr()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_delegpt_addr
    __del__ = lambda self: None
delegpt_addr_swigregister = _unboundmodule.delegpt_addr_swigregister
delegpt_addr_swigregister(delegpt_addr)

class delegpt(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, delegpt, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, delegpt, name)
    __repr__ = _swig_repr
    __swig_setmethods__["namelabs"] = _unboundmodule.delegpt_namelabs_set
    __swig_getmethods__["namelabs"] = _unboundmodule.delegpt_namelabs_get
    if _newclass:
        namelabs = _swig_property(_unboundmodule.delegpt_namelabs_get, _unboundmodule.delegpt_namelabs_set)
    __swig_setmethods__["nslist"] = _unboundmodule.delegpt_nslist_set
    __swig_getmethods__["nslist"] = _unboundmodule.delegpt_nslist_get
    if _newclass:
        nslist = _swig_property(_unboundmodule.delegpt_nslist_get, _unboundmodule.delegpt_nslist_set)
    __swig_setmethods__["target_list"] = _unboundmodule.delegpt_target_list_set
    __swig_getmethods__["target_list"] = _unboundmodule.delegpt_target_list_get
    if _newclass:
        target_list = _swig_property(_unboundmodule.delegpt_target_list_get, _unboundmodule.delegpt_target_list_set)
    __swig_setmethods__["usable_list"] = _unboundmodule.delegpt_usable_list_set
    __swig_getmethods__["usable_list"] = _unboundmodule.delegpt_usable_list_get
    if _newclass:
        usable_list = _swig_property(_unboundmodule.delegpt_usable_list_get, _unboundmodule.delegpt_usable_list_set)
    __swig_setmethods__["result_list"] = _unboundmodule.delegpt_result_list_set
    __swig_getmethods__["result_list"] = _unboundmodule.delegpt_result_list_get
    if _newclass:
        result_list = _swig_property(_unboundmodule.delegpt_result_list_get, _unboundmodule.delegpt_result_list_set)
    __swig_setmethods__["bogus"] = _unboundmodule.delegpt_bogus_set
    __swig_getmethods__["bogus"] = _unboundmodule.delegpt_bogus_get
    if _newclass:
        bogus = _swig_property(_unboundmodule.delegpt_bogus_get, _unboundmodule.delegpt_bogus_set)
    __swig_setmethods__["has_parent_side_NS"] = _unboundmodule.delegpt_has_parent_side_NS_set
    __swig_getmethods__["has_parent_side_NS"] = _unboundmodule.delegpt_has_parent_side_NS_get
    if _newclass:
        has_parent_side_NS = _swig_property(_unboundmodule.delegpt_has_parent_side_NS_get, _unboundmodule.delegpt_has_parent_side_NS_set)
    __swig_setmethods__["dp_type_mlc"] = _unboundmodule.delegpt_dp_type_mlc_set
    __swig_getmethods__["dp_type_mlc"] = _unboundmodule.delegpt_dp_type_mlc_get
    if _newclass:
        dp_type_mlc = _swig_property(_unboundmodule.delegpt_dp_type_mlc_get, _unboundmodule.delegpt_dp_type_mlc_set)

    __swig_getmethods__["dname"] = _unboundmodule._get_dp_dname
    if _newclass:dname = _swig_property(_unboundmodule._get_dp_dname)

    __swig_getmethods__["dname_list"] = _unboundmodule._get_dp_dname_components
    if _newclass:dname_list = _swig_property(_unboundmodule._get_dp_dname_components)

    def _get_dname_str(self): return dnameAsStr(self.dname)
    __swig_getmethods__["dname_str"] = _get_dname_str
    if _newclass:dname_str = _swig_property(_get_dname_str)


    def __init__(self):
        this = _unboundmodule.new_delegpt()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _unboundmodule.delete_delegpt
    __del__ = lambda self: None
delegpt_swigregister = _unboundmodule.delegpt_swigregister
delegpt_swigregister(delegpt)


def _get_dp_dname(dp):
    return _unboundmodule._get_dp_dname(dp)
_get_dp_dname = _unboundmodule._get_dp_dname

def _get_dp_dname_components(dp):
    return _unboundmodule._get_dp_dname_components(dp)
_get_dp_dname_components = _unboundmodule._get_dp_dname_components

def _get_dpns_dname(dpns):
    return _unboundmodule._get_dpns_dname(dpns)
_get_dpns_dname = _unboundmodule._get_dpns_dname

def _get_dpns_dname_components(dpns):
    return _unboundmodule._get_dpns_dname_components(dpns)
_get_dpns_dname_components = _unboundmodule._get_dpns_dname_components

def _delegpt_addr_addr_get(target):
    return _unboundmodule._delegpt_addr_addr_get(target)
_delegpt_addr_addr_get = _unboundmodule._delegpt_addr_addr_get
MODULE_STATE_INITIAL = _unboundmodule.MODULE_STATE_INITIAL
MODULE_WAIT_REPLY = _unboundmodule.MODULE_WAIT_REPLY
MODULE_WAIT_MODULE = _unboundmodule.MODULE_WAIT_MODULE
MODULE_WAIT_SUBQUERY = _unboundmodule.MODULE_WAIT_SUBQUERY
MODULE_ERROR = _unboundmodule.MODULE_ERROR
MODULE_FINISHED = _unboundmodule.MODULE_FINISHED
MODULE_EVENT_NEW = _unboundmodule.MODULE_EVENT_NEW
MODULE_EVENT_PASS = _unboundmodule.MODULE_EVENT_PASS
MODULE_EVENT_REPLY = _unboundmodule.MODULE_EVENT_REPLY
MODULE_EVENT_NOREPLY = _unboundmodule.MODULE_EVENT_NOREPLY
MODULE_EVENT_CAPSFAIL = _unboundmodule.MODULE_EVENT_CAPSFAIL
MODULE_EVENT_MODDONE = _unboundmodule.MODULE_EVENT_MODDONE
MODULE_EVENT_ERROR = _unboundmodule.MODULE_EVENT_ERROR
sec_status_unchecked = _unboundmodule.sec_status_unchecked
sec_status_bogus = _unboundmodule.sec_status_bogus
sec_status_indeterminate = _unboundmodule.sec_status_indeterminate
sec_status_insecure = _unboundmodule.sec_status_insecure
sec_status_secure = _unboundmodule.sec_status_secure
NO_VERBOSE = _unboundmodule.NO_VERBOSE
VERB_OPS = _unboundmodule.VERB_OPS
VERB_DETAIL = _unboundmodule.VERB_DETAIL
VERB_QUERY = _unboundmodule.VERB_QUERY
VERB_ALGO = _unboundmodule.VERB_ALGO
inplace_cb_reply = _unboundmodule.inplace_cb_reply
inplace_cb_reply_cache = _unboundmodule.inplace_cb_reply_cache
inplace_cb_reply_local = _unboundmodule.inplace_cb_reply_local
inplace_cb_reply_servfail = _unboundmodule.inplace_cb_reply_servfail
inplace_cb_query = _unboundmodule.inplace_cb_query
inplace_cb_edns_back_parsed = _unboundmodule.inplace_cb_edns_back_parsed
inplace_cb_types_total = _unboundmodule.inplace_cb_types_total
PKT_QR = _unboundmodule.PKT_QR
PKT_AA = _unboundmodule.PKT_AA
PKT_TC = _unboundmodule.PKT_TC
PKT_RD = _unboundmodule.PKT_RD
PKT_CD = _unboundmodule.PKT_CD
PKT_RA = _unboundmodule.PKT_RA
PKT_AD = _unboundmodule.PKT_AD

def set_return_msg(qstate, rr_name, rr_type, rr_class, flags, default_ttl, question, answer, authority, additional):
    return _unboundmodule.set_return_msg(qstate, rr_name, rr_type, rr_class, flags, default_ttl, question, answer, authority, additional)
set_return_msg = _unboundmodule.set_return_msg

class DNSMessage:
    def __init__(self, rr_name, rr_type, rr_class = RR_CLASS_IN, query_flags = 0, default_ttl = 0):
        """Query flags is a combination of PKT_xx contants"""
        self.rr_name = rr_name
        self.rr_type = rr_type
        self.rr_class = rr_class
        self.default_ttl = default_ttl
        self.query_flags = query_flags
        self.question = []
        self.answer = []
        self.authority = []
        self.additional = []

    def set_return_msg(self, qstate):
        """Returns 1 if OK"""
        status = _unboundmodule.set_return_msg(qstate, self.rr_name, self.rr_type, self.rr_class,
                                       self.query_flags, self.default_ttl,
                                       self.question, self.answer, self.authority, self.additional)

        if (status) and (PKT_AA & self.query_flags):
            qstate.return_msg.rep.authoritative = 1

        return status



def dns_cache_find_delegation(env, qname, qnamelen, qtype, qclass, region, msg, timenow):
    return _unboundmodule.dns_cache_find_delegation(env, qname, qnamelen, qtype, qclass, region, msg, timenow)
dns_cache_find_delegation = _unboundmodule.dns_cache_find_delegation

def iter_dp_is_useless(qinfo, qflags, dp):
    return _unboundmodule.iter_dp_is_useless(qinfo, qflags, dp)
iter_dp_is_useless = _unboundmodule.iter_dp_is_useless

def hints_lookup_stub(hints, qname, qclass, dp):
    return _unboundmodule.hints_lookup_stub(hints, qname, qclass, dp)
hints_lookup_stub = _unboundmodule.hints_lookup_stub

def find_delegation(qstate, nm, nmlen):
    return _unboundmodule.find_delegation(qstate, nm, nmlen)
find_delegation = _unboundmodule.find_delegation

def verbose(level, format):
    return _unboundmodule.verbose(level, format)
verbose = _unboundmodule.verbose

def log_info(format):
    return _unboundmodule.log_info(format)
log_info = _unboundmodule.log_info

def log_err(format):
    return _unboundmodule.log_err(format)
log_err = _unboundmodule.log_err

def log_warn(format):
    return _unboundmodule.log_warn(format)
log_warn = _unboundmodule.log_warn

def log_hex(msg, data, length):
    return _unboundmodule.log_hex(msg, data, length)
log_hex = _unboundmodule.log_hex

def log_dns_msg(str, qinfo, rep):
    return _unboundmodule.log_dns_msg(str, qinfo, rep)
log_dns_msg = _unboundmodule.log_dns_msg

def log_query_info(v, str, qinf):
    return _unboundmodule.log_query_info(v, str, qinf)
log_query_info = _unboundmodule.log_query_info

def regional_log_stats(r):
    return _unboundmodule.regional_log_stats(r)
regional_log_stats = _unboundmodule.regional_log_stats

def sldns_wire2str_type(atype):
    return _unboundmodule.sldns_wire2str_type(atype)
sldns_wire2str_type = _unboundmodule.sldns_wire2str_type

def sldns_wire2str_class(aclass):
    return _unboundmodule.sldns_wire2str_class(aclass)
sldns_wire2str_class = _unboundmodule.sldns_wire2str_class

def storeQueryInCache(qstate, qinfo, msgrep, is_referral):
    return _unboundmodule.storeQueryInCache(qstate, qinfo, msgrep, is_referral)
storeQueryInCache = _unboundmodule.storeQueryInCache

def invalidateQueryInCache(qstate, qinfo):
    return _unboundmodule.invalidateQueryInCache(qstate, qinfo)
invalidateQueryInCache = _unboundmodule.invalidateQueryInCache

def strextstate(s):
    return _unboundmodule.strextstate(s)
strextstate = _unboundmodule.strextstate

def strmodulevent(e):
    return _unboundmodule.strmodulevent(e)
strmodulevent = _unboundmodule.strmodulevent

def edns_opt_list_find(list, code):
    return _unboundmodule.edns_opt_list_find(list, code)
edns_opt_list_find = _unboundmodule.edns_opt_list_find

def edns_register_option(opt_code, bypass_cache_stage, no_aggregation, env):
    return _unboundmodule.edns_register_option(opt_code, bypass_cache_stage, no_aggregation, env)
edns_register_option = _unboundmodule.edns_register_option

def register_edns_option(env, code, bypass_cache_stage=False,
                         no_aggregation=False):
    """Wrapper function to provide keyword attributes."""
    return edns_register_option(code, bypass_cache_stage,
                                no_aggregation, env)


def edns_opt_list_remove(list, code):
    return _unboundmodule.edns_opt_list_remove(list, code)
edns_opt_list_remove = _unboundmodule.edns_opt_list_remove

def edns_opt_list_append(list, code, len, region):
    return _unboundmodule.edns_opt_list_append(list, code, len, region)
edns_opt_list_append = _unboundmodule.edns_opt_list_append

def inplace_cb_register(cb, type, cbarg, env, id):
    return _unboundmodule.inplace_cb_register(cb, type, cbarg, env, id)
inplace_cb_register = _unboundmodule.inplace_cb_register

def register_inplace_cb_reply(py_cb, env, id):
    return _unboundmodule.register_inplace_cb_reply(py_cb, env, id)
register_inplace_cb_reply = _unboundmodule.register_inplace_cb_reply

def register_inplace_cb_reply_cache(py_cb, env, id):
    return _unboundmodule.register_inplace_cb_reply_cache(py_cb, env, id)
register_inplace_cb_reply_cache = _unboundmodule.register_inplace_cb_reply_cache

def register_inplace_cb_reply_local(py_cb, env, id):
    return _unboundmodule.register_inplace_cb_reply_local(py_cb, env, id)
register_inplace_cb_reply_local = _unboundmodule.register_inplace_cb_reply_local

def register_inplace_cb_reply_servfail(py_cb, env, id):
    return _unboundmodule.register_inplace_cb_reply_servfail(py_cb, env, id)
register_inplace_cb_reply_servfail = _unboundmodule.register_inplace_cb_reply_servfail
# This file is compatible with both classic and new-style classes.