On Monday 17 November 2008 16:33:42 Peter Saint-Andre wrote: > Note: The format used for publishing the TXT record value to the mDNS > daemon depends on the mDNS daemon in use, and might not follow the > binary format described here (e.g., it might consist of a series of > quoted strings, one for each parameter).
Humm, there is something goofy about this text. At the high level, a TXT record holds a list of strings; it's a container for a string list. It should be enough for XEP-174 to simply say, "the TXT record must contain the following strings..." and be done with it. It shouldn't need to detail out the actual binary representation of the TXT record. To put it in perspective, XEP-174 also states what should go into an SRV record (host, port, priority, weight), but it doesn't discuss the binary format of SRV. If anyone cares about how TXT or SRV records get formatted, they can read other specs to find out. I think what makes the text confusing is the part about interfacing with an mDNS daemon. Certainly "it might consist of a series of quoted strings" is too hopeful, as nothing uses that text-based notation except BIND zone files. It is true that different mDNS programming interfaces may each have different ways to specify the TXT content, but the same goes for specifying the SRV content. I assure you that, to an mDNS programming interface, SRV is never specified with zone file notation nor binary format. Instead, it's stuff like "char *hostname" and "int port". I guess what I'm trying to say is that you shouldn't explain the binary representation of any of the record types. Instead, stick to high level explanations, which readers can then apply in concept to their relevant programming interfaces. That text-based zone file notation you're already using should suffice as a high level explanation. Nobody's actually going to use that zone file notation in their programming, but they should be able to read it and figure out what you mean. -Justin
