Simple mDNS + DNS-SD impl

Main TODOs:
1. the spec requires the impl to resend the reply once and
   to send gratuitous updates

2. advertise our clubby services as DNS-SD sub-services.

---

Tested with:

1. https://play.google.com/store/apps/details?id=com.grokkt.android.bonjour&hl=en
2. https://play.google.com/store/apps/details?id=com.druk.bonjour.browser&hl=en
3. osx `dns-sd`

Works well enough; it doesn't have some glitches due the fact that we
don't retransmit yet and we don't send gratuitous updates.

PUBLISHED_FROM=38d7a50beb274d4aeeda5b0b58e44dfa0789da84
This commit is contained in:
Marko Mikulicic authored and Cesanta Bot committed 2016-09-28 08:51:47 +00:00
1 parent d63fb70c69
commit 286fa90ee9
6 files changed
+33 -7

No files matched your search

+1 -1
View File
@@ -8455,7 +8455,7 @@ int mg_dns_copy_questions(struct mbuf *io, struct mg_dns_message *msg) {
return mbuf_append(io, begin, end - begin);
}
static int mg_dns_encode_name(struct mbuf *io, const char *name, size_t len) {
int mg_dns_encode_name(struct mbuf *io, const char *name, size_t len) {
const char *s;
unsigned char n;
size_t pos = io->len;