Ejemplo n.º 1
0
/** dump one rrset zonefile line */
static int
dump_rrset_line(SSL* ssl, struct ub_packed_rrset_key* k, time_t now, size_t i)
{
	char s[65535];
	if(!packed_rr_to_string(k, i, now, s, sizeof(s))) {
		return ssl_printf(ssl, "BADRR\n");
	}
	return ssl_printf(ssl, "%s", s);
}
Ejemplo n.º 2
0
/** print packed rrset */
static void
print_rrset(struct ub_packed_rrset_key* rrset)
{
	struct packed_rrset_data* d = (struct packed_rrset_data*)rrset->
	                entry.data;
	char buf[65535];
	size_t i;
	for(i=0; i<d->count+d->rrsig_count; i++) {
		if(!packed_rr_to_string(rrset, i, 0, buf, sizeof(buf)))
			printf("failedtoconvert %d\n", (int)i);
		else
			printf("%s\n", buf);
	}
}
Ejemplo n.º 3
0
void log_packed_rrset(enum verbosity_value v, const char* str,
	struct ub_packed_rrset_key* rrset)
{
	struct packed_rrset_data* d = (struct packed_rrset_data*)rrset->
		entry.data;
	char buf[65535];
	size_t i;
	if(verbosity < v)
		return;
	for(i=0; i<d->count+d->rrsig_count; i++) {
		if(!packed_rr_to_string(rrset, i, 0, buf, sizeof(buf))) {
			log_info("%s: rr %d wire2str-error", str, (int)i);
		} else {
			log_info("%s: %s", str, buf);
		}
	}
}