1 2#ifndef __MDNS_H__ 3#define __MDNS_H__ 4 5#include "misc.h" 6 7#define MDNS_WANT_V4 (1 << 0) 8#define MDNS_WANT_V4LL (1 << 1) 9#define MDNS_WANT_V6 (1 << 2) 10#define MDNS_WANT_V6LL (1 << 3) 11 12#define MDNS_WANT_DEFAULT (MDNS_WANT_V4 | MDNS_WANT_V6 | MDNS_WANT_V6LL) 13 14typedef void (* mdns_browse_cb)(const char *name, const char *type, const char *domain, const char *hostname, int family, const char *address, int port, struct keyval *txt); 15 16/* mDNS interface functions */ 17/* Call only from the main thread */ 18int 19mdns_init(void); 20 21void 22mdns_deinit(void); 23 24int 25mdns_register(char *name, char *type, int port, char **txt); 26 27int 28mdns_browse(char *type, int flags, mdns_browse_cb cb); 29 30#endif /* !__MDNS_H__ */ 31