dns_add_answer(TYPE_PTR, buffer, len);
}
-static void
-service_send_a(struct interface *iface)
-{
- unsigned char buffer[MAX_NAME_LEN];
- char *host = service_name("local");
- int len = dn_comp(host, buffer, MAX_NAME_LEN, NULL, NULL);
-
- if (len < 1)
- return;
-
- dns_add_answer(TYPE_A, (uint8_t *) &iface->v4_addr.s_addr, 4);
-}
-
static void
service_add_srv(struct service *s)
{
return;
dns_init_answer();
- service_send_a(iface);
+ dns_add_answer(TYPE_A, (uint8_t *) &iface->v4_addr.s_addr, 4);
dns_send_answer(iface, service_name("local"));
}
if (match)
return;
- dns_init_answer();
- service_send_a(iface);
- dns_send_answer(iface, service_name("local"));
+ service_reply_a(iface, TYPE_A);
}
void