Esempio n. 1
0
    if not q_rr_list:
        print "%sQuery list empty" % margin
    else:
        print "%sQuery list (%d items)" % (margin, len(q_rr_list))
        for rr in q_rr_list:
            print "%s   %s\t%3d" % (margin, rr.owner, rr.type)

    if ldns_obj.is_response:
        an_rr_list = ldns_obj.response_rr_list
        if not an_rr_list:
            print "%sResponse list empty" % margin
        else:
            print "%sResponse list (%d items)" % (margin, len(an_rr_list))
            for rr in an_rr_list:
                print "%s   %s\t%3d\t%s\t%s" % (
                    margin, rr.owner, rr.ttl, pldns.typestr(rr.type), rr.rdata)

        au_rr_list = ldns_obj.auth_rr_list
        if not au_rr_list:
            print "%sAuthority list empty" % margin
        else:
            print "%sAuthority list (%d items)" % (margin, len(au_rr_list))
            for rr in au_rr_list:
                print "%s   %s\t%3d\t%s\t%s" % (
                    margin, rr.owner, rr.ttl, pldns.typestr(rr.type), rr.rdata)

        ad_rr_list = ldns_obj.addit_rr_list
        if not ad_rr_list:
            print "%sAdditional list empty" % margin
        else:
            print "%sAdditional list (%d items)" % (margin, len(ad_rr_list))
Esempio n. 2
0
    if not q_rr_list:
        test_println("%sQuery list empty" % margin, get_tag())
    else:
        test_println("%sQuery list (%d items)" % (margin, len(q_rr_list)), get_tag())
        for rr in q_rr_list:
            test_println("%s   %s\t%3d" % (margin, rr.owner, rr.type), get_tag())

    if ldns_obj.is_response:
        an_rr_list = ldns_obj.response_rr_list
        if not an_rr_list:
            test_println("%sResponse list empty" % margin, get_tag())
        else:
            test_println("%sResponse list (%d items)" % (margin, len(an_rr_list)), get_tag())
            for rr in an_rr_list:
                test_println("%s   %s\t%3d\t%s\t%s" % (margin,
                    rr.owner, rr.ttl, pldns.typestr(rr.type), rr.rdata), get_tag())

        au_rr_list = ldns_obj.auth_rr_list
        if not au_rr_list:
            test_println("%sAuthority list empty" % margin, get_tag())
        else:
            test_println("%sAuthority list (%d items)" % (margin, len(au_rr_list)), get_tag())
            for rr in au_rr_list:
                test_println("%s   %s\t%3d\t%s\t%s" % (margin,
                    rr.owner, rr.ttl, pldns.typestr(rr.type), rr.rdata), get_tag())

        ad_rr_list = ldns_obj.addit_rr_list
        if not ad_rr_list:
            test_println("%sAdditional list empty" % margin, get_tag())
        else:
            test_println("%sAdditional list (%d items)" % (margin, len(ad_rr_list)), get_tag())
    if not q_rr_list:
        test_println("%sQuery list empty" % margin, get_tag())
    else:
        test_println("%sQuery list (%d items)" % (margin, len(q_rr_list)), get_tag())
        for rr in q_rr_list:
            test_println("%s   %s\t%3d" % (margin, rr.owner, rr.type), get_tag())

    if ldns_obj.is_response:
        an_rr_list = ldns_obj.response_rr_list
        if not an_rr_list:
            test_println("%sResponse list empty" % margin, get_tag())
        else:
            test_println("%sResponse list (%d items)" % (margin, len(an_rr_list)), get_tag())
            for rr in an_rr_list:
                test_println("%s   %s\t%3d\t%s\t%s" % (margin,
                    rr.owner, rr.ttl, pldns.typestr(rr.type), rr.rdata), get_tag())

        au_rr_list = ldns_obj.auth_rr_list
        if not au_rr_list:
            test_println("%sAuthority list empty" % margin, get_tag())
        else:
            test_println("%sAuthority list (%d items)" % (margin, len(au_rr_list)), get_tag())
            for rr in au_rr_list:
                test_println("%s   %s\t%3d\t%s\t%s" % (margin,
                    rr.owner, rr.ttl, pldns.typestr(rr.type), rr.rdata), get_tag())

        ad_rr_list = ldns_obj.addit_rr_list
        if not ad_rr_list:
            test_println("%sAdditional list empty" % margin, get_tag())
        else:
            test_println("%sAdditional list (%d items)" % (margin, len(ad_rr_list)), get_tag())