static struct binary_data minfo_wirerdata(struct rr *rrv) { RRCAST(minfo); return compose_binary_data("dd", 1, name2wire_name(rr->rmailbx), name2wire_name(rr->emailbx)); }
static struct binary_data ipseckey_wirerdata(struct rr *rrv) { RRCAST(ipseckey); struct binary_data helper; switch (rr->gateway_type) { case 0: if (rr->algorithm != 0) return compose_binary_data("111d", 1, rr->precedence, rr->gateway_type, rr->algorithm, rr->public_key); else return compose_binary_data("111", 1, rr->precedence, rr->gateway_type, rr->algorithm); break; case 1: helper.length = sizeof(rr->gateway.gateway_ipv4); helper.data = (void *)&rr->gateway.gateway_ipv4; if (rr->algorithm != 0) return compose_binary_data("111dd", 1, rr->precedence, rr->gateway_type, rr->algorithm, helper, rr->public_key); else return compose_binary_data("111d", 1, rr->precedence, rr->gateway_type, rr->algorithm, helper); break; case 2: helper.length = sizeof(rr->gateway.gateway_ipv6); helper.data = (void *)&rr->gateway.gateway_ipv6; if (rr->algorithm != 0) return compose_binary_data("111dd", 1, rr->precedence, rr->gateway_type, rr->algorithm, helper, rr->public_key); else return compose_binary_data("111d", 1, rr->precedence, rr->gateway_type, rr->algorithm, helper); break; case 3: if (rr->algorithm != 0) return compose_binary_data("111dd", 1, rr->precedence, rr->gateway_type, rr->algorithm, name2wire_name(rr->gateway.gateway_name), rr->public_key); else return compose_binary_data("111d", 1, rr->precedence, rr->gateway_type, rr->algorithm, name2wire_name(rr->gateway.gateway_name)); break; } return bad_binary_data(); }
static struct binary_data soa_wirerdata(struct rr *rrv) { RRCAST(soa); return compose_binary_data("dd44444", 1, name2wire_name(rr->mname), name2wire_name(rr->rname), rr->serial, rr->refresh, rr->retry, rr->expire, rr->minimum); }
static struct binary_data px_wirerdata(struct rr *rrv) { RRCAST(px); return compose_binary_data("2dd", 1, rr->preference, name2wire_name(rr->map822), name2wire_name(rr->mapx400)); }
static struct binary_data mx_wirerdata(struct rr *rrv) { RRCAST(mx); return compose_binary_data("2d", 1, rr->preference, name2wire_name(rr->exchange)); }
static struct binary_data rt_wirerdata(struct rr *rrv) { RRCAST(rt); return compose_binary_data("2d", 1, rr->preference, name2wire_name(rr->intermediate_host)); }
static struct binary_data afsdb_wirerdata(struct rr *rrv) { RRCAST(afsdb); return compose_binary_data("2d", 1, rr->subtype, name2wire_name(rr->hostname)); }
static struct binary_data srv_wirerdata(struct rr *rrv) { RRCAST(srv); return compose_binary_data("222d", 1, rr->priority, rr->weight, rr->port, name2wire_name(rr->target)); }
static struct binary_data naptr_wirerdata(struct rr *rrv) { struct rr_naptr *rr = (struct rr_naptr *)rrv; return compose_binary_data("22bbbd", 1, rr->order, rr->preference, rr->flags, rr->services, rr->regexp, name2wire_name(rr->replacement)); }
static struct binary_data mr_wirerdata(struct rr *rrv) { RRCAST(mr); return name2wire_name(rr->newname); }