dump_rrset(RES* ssl, struct ub_packed_rrset_key* k, 
	struct packed_rrset_data* d, time_t now)
{
	size_t i;
	/* rd lock held by caller */
	if(!k || !d) return 1;
	if(k->id == 0) return 1; /* deleted */
	if(d->ttl < now) return 1; /* expired */

	/* meta line */
	if(!ssl_printf(ssl, ";rrset%s " ARG_LL "d %u %u %d %d\n",
		(k->rk.flags & PACKED_RRSET_NSEC_AT_APEX)?" nsec_apex":"",
		(long long)(d->ttl - now),
		(unsigned)d->count, (unsigned)d->rrsig_count,
		(int)d->trust, (int)d->security
		)) 
		return 0;
	for(i=0; i<d->count + d->rrsig_count; i++) {
		if(!dump_rrset_line(ssl, k, now, i))
			return 0;
	}
	return 1;
}
dump_rrset(RES* ssl, struct ub_packed_rrset_key* k, 
	struct packed_rrset_data* d, time_t now)
{
	size_t i;
	 
	if(!k || !d) return 1;
	if(k->id == 0) return 1;  
	if(d->ttl < now) return 1;  

	 
	if(!ssl_printf(ssl, ";rrset%s " ARG_LL "d %u %u %d %d\n",
		(k->rk.flags & PACKED_RRSET_NSEC_AT_APEX)?" nsec_apex":"",
		(long long)(d->ttl - now),
		(unsigned)d->count, (unsigned)d->rrsig_count,
		(int)d->trust, (int)d->security
		)) 
		return 0;
	for(i=0; i<d->count + d->rrsig_count; i++) {
		if(!dump_rrset_line(ssl, k, now, i))
			return 0;
	}
	return 1;
}