break;
case TYPE_PTR:
- if (!strcmp(name, sdudp)) {
+ if (!strcmp(name, C_DNS_SD)) {
dns_reply_a(iface, to, announce_ttl);
service_announce_services(iface, to, announce_ttl);
} else {
#define MAX_NAME_LEN 8096
#define MAX_DATA_LEN 8096
-#define C_DNS_SD "_services._dns-sd._udp.local"
+#define C_DNS_SD "_services._dns-sd._udp.local"
struct dns_header {
uint16_t id;
uloop_fd_add(&iface->fd, ULOOP_READ);
if (iface->multicast) {
- dns_send_question(iface, "_services._dns-sd._udp.local", TYPE_PTR, 0);
+ dns_send_question(iface, C_DNS_SD, TYPE_PTR, 0);
announce_init(iface);
}
uloop_fd_add(&iface->fd, ULOOP_READ);
if (iface->multicast) {
- dns_send_question(iface, "_services._dns-sd._udp.local", TYPE_PTR, 0);
+ dns_send_question(iface, C_DNS_SD, TYPE_PTR, 0);
announce_init(iface);
}
static struct blob_buf b;
static VLIST_TREE(services, avl_strcmp, service_update, false, false);
-const char *sdudp = "_services._dns-sd._udp.local";
static int service_init_announce;
static const char *
if (ttl) {
dns_init_answer();
service_add_ptr(s->service, ttl);
- dns_send_answer(iface, to, sdudp);
+ dns_send_answer(iface, to, C_DNS_SD);
}
service_reply_single(iface, to, s, ttl, 0);
}
#ifndef _SERVICE_H__
#define _SERVICE_H__
-extern const char *sdudp;
extern void service_init(int announce);
extern void service_cleanup(void);
extern void service_reply(struct interface *iface, struct sockaddr *to, const char *match, int ttl);
struct blob_attr *msg)
{
struct blob_attr *tb[QUERY_MAX], *c;
- const char *question = "_services._dns-sd._udp.local";
+ const char *question = C_DNS_SD;
const char *ifname;
int type = TYPE_ANY;