2009-04-07 13:31:46 -04:00
|
|
|
|
2010-09-18 10:29:06 -04:00
|
|
|
#ifndef __MDNS_H__
|
|
|
|
#define __MDNS_H__
|
2009-04-07 13:31:46 -04:00
|
|
|
|
2010-09-18 11:16:29 -04:00
|
|
|
#include "misc.h"
|
2010-01-15 13:40:17 -05:00
|
|
|
|
2011-03-06 06:37:58 -05:00
|
|
|
#define MDNS_WANT_V4 (1 << 0)
|
|
|
|
#define MDNS_WANT_V4LL (1 << 1)
|
|
|
|
#define MDNS_WANT_V6 (1 << 2)
|
|
|
|
#define MDNS_WANT_V6LL (1 << 3)
|
|
|
|
|
|
|
|
#define MDNS_WANT_DEFAULT (MDNS_WANT_V4 | MDNS_WANT_V6 | MDNS_WANT_V6LL)
|
|
|
|
|
2010-09-18 11:16:29 -04:00
|
|
|
typedef 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);
|
2010-01-15 13:40:17 -05:00
|
|
|
|
2009-04-07 13:31:46 -04:00
|
|
|
/* mDNS interface functions */
|
|
|
|
/* Call only from the main thread */
|
|
|
|
int
|
|
|
|
mdns_init(void);
|
|
|
|
|
|
|
|
void
|
|
|
|
mdns_deinit(void);
|
|
|
|
|
|
|
|
int
|
2009-04-08 10:35:59 -04:00
|
|
|
mdns_register(char *name, char *type, int port, char **txt);
|
2009-04-07 13:31:46 -04:00
|
|
|
|
2010-01-15 13:40:17 -05:00
|
|
|
int
|
2011-03-06 06:37:58 -05:00
|
|
|
mdns_browse(char *type, int flags, mdns_browse_cb cb);
|
2010-01-15 13:40:17 -05:00
|
|
|
|
2010-09-18 10:29:06 -04:00
|
|
|
#endif /* !__MDNS_H__ */
|