Пример #1
0
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));
}
Пример #2
0
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();
}
Пример #3
0
Файл: soa.c Проект: jelu/validns
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);
}
Пример #4
0
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));
}
Пример #5
0
Файл: mx.c Проект: umq/validns
static struct binary_data mx_wirerdata(struct rr *rrv)
{
	RRCAST(mx);

    return compose_binary_data("2d", 1,
		rr->preference, name2wire_name(rr->exchange));
}
Пример #6
0
Файл: rt.c Проект: jelu/validns
static struct binary_data rt_wirerdata(struct rr *rrv)
{
    RRCAST(rt);

    return compose_binary_data("2d", 1,
        rr->preference, name2wire_name(rr->intermediate_host));
}
Пример #7
0
static struct binary_data afsdb_wirerdata(struct rr *rrv)
{
    RRCAST(afsdb);

    return compose_binary_data("2d", 1,
        rr->subtype, name2wire_name(rr->hostname));
}
Пример #8
0
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));
}
Пример #9
0
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));
}
Пример #10
0
static struct binary_data mr_wirerdata(struct rr *rrv)
{
	RRCAST(mr);
	return name2wire_name(rr->newname);
}