~kernevil/ubuntu/trusty/bind9/sdlz-hmac-keys

« back to all changes in this revision

Viewing changes to bin/tests/printmsg.c

  • Committer: Package Import Robot
  • Author(s): LaMont Jones, Matthew Grant, LaMont Jones
  • Date: 2012-10-29 08:37:49 UTC
  • mfrom: (1.9.2)
  • Revision ID: package-import@ubuntu.com-20121029083749-r9inpzl0yuj9xdlu
Tags: 1:9.8.4.dfsg-1
[Matthew Grant]

* Turn off dlopen as it was causing test compile failures.
* Add missing library .postrm files for debhelper

[LaMont Jones]

* New upstream version
* soname fixup
* Ack NMUs

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
 
2
 * Copyright (C) 2004, 2007, 2011  Internet Systems Consortium, Inc. ("ISC")
3
3
 * Copyright (C) 1998-2001  Internet Software Consortium.
4
4
 *
5
5
 * Permission to use, copy, modify, and/or distribute this software for any
15
15
 * PERFORMANCE OF THIS SOFTWARE.
16
16
 */
17
17
 
18
 
/* $Id: printmsg.c,v 1.29 2007-06-19 23:46:59 tbox Exp $ */
 
18
/* $Id: printmsg.c,v 1.29.814.2 2011/08/25 23:45:49 tbox Exp $ */
19
19
 
20
20
#include <config.h>
21
21
 
77
77
        isc_region_t r;
78
78
        dns_name_t empty_name;
79
79
        char t[65536];
 
80
#ifdef USEINITALWS
80
81
        isc_boolean_t first;
 
82
#endif
81
83
        isc_boolean_t no_rdata;
82
84
 
83
85
        if (sectionid == DNS_SECTION_QUESTION)
100
102
                dns_message_currentname(msg, sectionid, &name);
101
103
 
102
104
                isc_buffer_init(&target, t, sizeof(t));
 
105
#ifdef USEINITALWS
103
106
                first = ISC_TRUE;
 
107
#endif
104
108
                print_name = name;
105
109
 
106
110
                for (rdataset = ISC_LIST_HEAD(name->list);
159
163
 
160
164
isc_result_t
161
165
printmessage(dns_message_t *msg) {
162
 
        isc_boolean_t did_flag = ISC_FALSE;
163
166
        isc_result_t result;
164
167
        dns_rdataset_t *opt, *tsig;
165
168
        dns_name_t *tsigname;
169
172
        printf(";; ->>HEADER<<- opcode: %s, status: %s, id: %u\n",
170
173
               opcodetext[msg->opcode], rcodetext[msg->rcode], msg->id);
171
174
 
172
 
        printf(";; flags: ");
173
 
        if ((msg->flags & DNS_MESSAGEFLAG_QR) != 0) {
174
 
                printf("qr");
175
 
                did_flag = ISC_TRUE;
176
 
        }
177
 
        if ((msg->flags & DNS_MESSAGEFLAG_AA) != 0) {
178
 
                printf("%saa", did_flag ? " " : "");
179
 
                did_flag = ISC_TRUE;
180
 
        }
181
 
        if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0) {
182
 
                printf("%stc", did_flag ? " " : "");
183
 
                did_flag = ISC_TRUE;
184
 
        }
185
 
        if ((msg->flags & DNS_MESSAGEFLAG_RD) != 0) {
186
 
                printf("%srd", did_flag ? " " : "");
187
 
                did_flag = ISC_TRUE;
188
 
        }
189
 
        if ((msg->flags & DNS_MESSAGEFLAG_RA) != 0) {
190
 
                printf("%sra", did_flag ? " " : "");
191
 
                did_flag = ISC_TRUE;
192
 
        }
193
 
        if ((msg->flags & DNS_MESSAGEFLAG_AD) != 0) {
194
 
                printf("%sad", did_flag ? " " : "");
195
 
                did_flag = ISC_TRUE;
196
 
        }
197
 
        if ((msg->flags & DNS_MESSAGEFLAG_CD) != 0) {
198
 
                printf("%scd", did_flag ? " " : "");
199
 
                did_flag = ISC_TRUE;
200
 
        }
 
175
        printf(";; flags:");
 
176
        if ((msg->flags & DNS_MESSAGEFLAG_QR) != 0)
 
177
                printf(" qr");
 
178
        if ((msg->flags & DNS_MESSAGEFLAG_AA) != 0)
 
179
                printf(" aa");
 
180
        if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0)
 
181
                printf(" tc");
 
182
        if ((msg->flags & DNS_MESSAGEFLAG_RD) != 0)
 
183
                printf(" rd");
 
184
        if ((msg->flags & DNS_MESSAGEFLAG_RA) != 0)
 
185
                printf(" ra");
 
186
        if ((msg->flags & DNS_MESSAGEFLAG_AD) != 0)
 
187
                printf(" ad");
 
188
        if ((msg->flags & DNS_MESSAGEFLAG_CD) != 0)
 
189
                printf(" cd");
201
190
        printf("; QUERY: %u, ANSWER: %u, AUTHORITY: %u, ADDITIONAL: %u\n",
202
191
               msg->counts[DNS_SECTION_QUESTION],
203
192
               msg->counts[DNS_SECTION_ANSWER],