*/
static void run_child_dns_lookup(struct dns_ex_state *state, int fd)
{
- struct dns_reply *reply;
- struct resource_record *rr;
+ struct rk_dns_reply *reply;
+ struct rk_resource_record *rr;
uint32_t count = 0;
uint32_t srv_valid = 0;
- struct resource_record **srv_rr;
+ struct rk_resource_record **srv_rr;
uint32_t addrs_valid = 0;
- struct resource_record **addrs_rr;
+ struct rk_resource_record **addrs_rr;
char *addrs;
bool first;
uint32_t i;
/* this is the blocking call we are going to lots of trouble
to avoid in the parent */
- reply = dns_lookup(state->name.name, do_srv?"SRV":"A");
+ reply = rk_dns_lookup(state->name.name, do_srv?"SRV":"A");
if (!reply) {
goto done;
}
if (do_srv) {
- dns_srv_order(reply);
+ rk_dns_srv_order(reply);
}
/* Loop over all returned records and pick the "srv" records */
for (rr=reply->head; rr; rr=rr->next) {
/* we are only interested in the IN class */
- if (rr->class != C_IN) {
+ if (rr->class != rk_ns_c_in) {
continue;
}
if (do_srv) {
/* we are only interested in SRV records */
- if (rr->type != T_SRV) {
+ if (rr->type != rk_ns_t_srv) {
continue;
}
} else {
/* we are only interested in A records */
/* TODO: add AAAA support */
- if (rr->type != T_A) {
+ if (rr->type != rk_ns_t_a) {
continue;
}
}
srv_rr = talloc_zero_array(state,
- struct resource_record *,
+ struct rk_resource_record *,
count);
if (!srv_rr) {
goto done;
}
addrs_rr = talloc_zero_array(state,
- struct resource_record *,
+ struct rk_resource_record *,
count);
if (!addrs_rr) {
goto done;
/* Loop over all returned records and pick the records */
for (rr=reply->head;rr;rr=rr->next) {
/* we are only interested in the IN class */
- if (rr->class != C_IN) {
+ if (rr->class != rk_ns_c_in) {
continue;
}
if (do_srv) {
/* we are only interested in SRV records */
- if (rr->type != T_SRV) {
+ if (rr->type != rk_ns_t_srv) {
continue;
}
} else {
/* we are only interested in A records */
/* TODO: add AAAA support */
- if (rr->type != T_A) {
+ if (rr->type != rk_ns_t_a) {
continue;
}
for (i=0; i < srv_valid; i++) {
for (rr=reply->head;rr;rr=rr->next) {
- if (rr->class != C_IN) {
+ if (rr->class != rk_ns_c_in) {
continue;
}
/* we are only interested in SRV records */
- if (rr->type != T_A) {
+ if (rr->type != rk_ns_t_a) {
continue;
}