Peter Saint-Andre wrote:
> Peter Saint-Andre wrote:
>> Justin Karneges wrote:
>>> On Friday 07 November 2008 08:34:07 Peter Saint-Andre wrote:
>>>> Right, so the question is not "what format is sent over the wire?" (as
>>>> we can see that's the fancy encoding to save space and indicate the
>>>> length of each key-value pair) but "what is the format that an entity
>>>> publishes to the mdns address?" (and that might be a text-based notation
>>>> with each key-value pair contained within quotes). In any case, I think
>>>> that what's currently in XEP-0174 is wrong because you don't publish one
>>>> TXT record for each key-value pair, instead you publish a single TXT
>>>> record that contains all of the key-value pairs.
>>> Correct.  A single TXT record contains all the strings.
>>>
>>>> So that means you  publish something like this (it would be all one "line"
>>>> in DNS but I can't show that in email):
>>>>
>>>> [EMAIL PROTECTED] IN TXT "txtvers=1" "1st=Juliet"
>>>> "[EMAIL PROTECTED]" "hash=sha-1" "[EMAIL PROTECTED]"
>>>> "last=Capulet" "msg=Hanging out downtown" "nick=JuliC"
>>>> "node=http://www.adiumx.com";
>>>> "phsh=a3839614e1a382bcfebbcf20464f519e81770813" "port.p2pj=5562"
>>>> "status=avail" "vc=CA!" "ver=QgayPKawpkPSDYmwT/WM94uAlu0="
>>>>
>>>> Yes, no, maybe?
>>> Yes.
>> Right. I will confirm this understanding with the DNS-SD experts and
>> then modify the XEP accordingly.
> 
> I've talked about this with some of the DNS-SD folks, and yes the binary
> format is sent over the wire, whereas the texty format with multiple
> key-value pairs in a single TXT record value is the kind of thing that
> you would specify in, say, a BIND zone file.

Therefore I propose the following text:

***

3.1 TXT Record

DNS-SD enables service definitions to include a TXT record that
specifies parameters to be used in the context of the relevant service
type. The name of the TXT record is the same as that of the SRV record
(i.e., "[EMAIL PROTECTED]"). When the TXT record is
sent over the wire, its value is a binary object that contains one or
more strings, where (1) each string is a parameter that usually takes
the form of a key-value pair and (2) the parameters are separated by a
single-length byte ("0x##") that specifies the length of the parameter
itself. For detailed information about the format of the TXT record
value, refer to the DNS-SD specification.

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).

The following truncated example illustrates the wire format.

--------------------------------------------------------------------------
| 0x09 | txtvers=1 | 0x0A | 1st=Juliet | 0x18 | [EMAIL PROTECTED] |
--------------------------------------------------------------------------

***

/psa

Reply via email to