ubus: assume that the service iface can be NULL
[project/mdnsd.git] / service.h
index 7dd0ff148153ca231a66b686a82e803aae7b4e71..9dea1f62b9026e6f2197f2e6ee050c94cb729aea 100644 (file)
--- a/service.h
+++ b/service.h
 #ifndef _SERVICE_H__
 #define _SERVICE_H__
 
-extern char *hostname;
-extern char *service_name(const char *domain);
-extern void service_init(void);
+struct hostname {
+       struct vlist_node node;
+
+       const char *hostname;
+};
+extern struct vlist_tree hostnames;
+
+extern void service_init(int announce);
 extern void service_cleanup(void);
-extern void service_announce(struct uloop_fd *u);
-extern void service_announce_services(struct uloop_fd *u, const char *service);
-extern void service_reply(struct uloop_fd *u, const char *match);
-extern void service_reply_a(struct uloop_fd *u, int type);
+extern void service_reply(struct interface *iface, struct sockaddr *to, const char *instance, const char *service_domain, int ttl);
+extern void service_announce_services(struct interface *iface, struct sockaddr *to, int ttl);
 
 #endif