mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-01 05:52:32 +07:00
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:
committed by
Cesanta Bot
parent
d63fb70c69
commit
286fa90ee9
@@ -8,6 +8,7 @@ items:
|
||||
- { name: mg_dns_insert_header.md }
|
||||
- { name: mg_dns_copy_questions.md }
|
||||
- { name: mg_dns_encode_record.md }
|
||||
- { name: mg_dns_encode_name.md }
|
||||
- { name: mg_parse_dns.md }
|
||||
- { name: mg_dns_uncompress_name.md }
|
||||
- { name: mg_set_protocol_dns.md }
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: "mg_dns_encode_name()"
|
||||
decl_name: "mg_dns_encode_name"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
int mg_dns_encode_name(struct mbuf *io, const char *name, size_t len);
|
||||
---
|
||||
|
||||
Encodes a DNS name.
|
||||
|
||||
@@ -15,11 +15,11 @@ are taken from the parameters, encoded in the appropriate format depending on
|
||||
record type and stored in the IO buffer. The encoded values might contain
|
||||
offsets within the IO buffer. It's thus important that the IO buffer doesn't
|
||||
get trimmed while a sequence of records are encoded while preparing a DNS
|
||||
*reply.
|
||||
reply.
|
||||
|
||||
This function doesn't update the `name` and `rdata` pointers in the `rr`
|
||||
*struct
|
||||
because they might be invalidated as soon as the IO buffer grows again.
|
||||
struct because they might be invalidated as soon as the IO buffer grows
|
||||
again.
|
||||
|
||||
Returns the number of bytes appened or -1 in case of error.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user