Subject: ares_parse_txt_reply's output is not usable for DNS-SD

ares_parse_txt_reply's output is not usable for DNS-SD

From: Patrick Valsecchi <pvalsecc_at_cisco.com>
Date: Mon, 15 Apr 2013 10:29:29 +0200

Hi,

I'm using c-ares for doing DNS-SD. For that, I need to interpret TXT
records formatted as specified in the DNS-SD spec [1]. Unfortunately,
the ares_parse_txt_reply function just concatenates the sub-strings of
the TXT record I get into a single string, loosing the information of
the various key/value pairs contained in the TXT record.

To fix that, I see two solutions:

1) provide a second function that parses the TXT records that doesn't
parse the length+value sub-strings and lets the caller do this part of
the parsing.

2) change ares_parse_txt_reply to return another ares_txt_reply node for
each sub-string.

I'd be happy to provide a patch for either solution.

While I'm writing to this mailing list, I've seen some discussions in
the archives about doing an implementation for mDNS. What is the status
on that?

Thanks for this nice library and have a nice day.

[1] http://tools.ietf.org/html/draft-cheshire-dnsext-dns-sd-11#section-6.1
Received on 2013-04-15