-service_send_ptr_c(struct uloop_fd *u, const char *host)
-{
- unsigned char buffer[MAX_NAME_LEN];
- int len = dn_comp(host, buffer, MAX_NAME_LEN, NULL, NULL);
-
- if (len < 1)
- return;
-
- dns_add_answer(TYPE_PTR, buffer, len);
-}
-
-static void
-service_send_a(struct uloop_fd *u)
-{
- unsigned char buffer[MAX_NAME_LEN];
- char *host = service_name("local");
- int len = dn_comp(host, buffer, MAX_NAME_LEN, NULL, NULL);
- struct in_addr in;
-
- if (!inet_aton(iface_ip, &in)) {
- fprintf(stderr, "%s is not valid\n", iface_ip);
- return;
- }
-
- if (len < 1)
- return;
-
- dns_add_answer(TYPE_A, (uint8_t *) &in.s_addr, 4);
-}
-
-static void
-service_send_srv(struct uloop_fd *u, struct service *s)