[Standards] [Fwd: [Council] meeting minutes, 2008-11-05]

Peter Saint-Andre stpeter at stpeter.im
Fri Nov 7 16:34:07 UTC 2008

Justin Karneges wrote:
> On Thursday 06 November 2008 20:52:32 Peter Saint-Andre wrote:
>> It does seem that the single byte length indicators are included on the
>> wire. 
> Yep.  The confusion is really just around that text-based notation.  It's easy 
> to get tricked into thinking that the rightmost field represents the raw 
> bytes of the record, but it isn't anything of the sort.
> For example, an A record's value is written as an IPv4 address in string 
> format, but it is encoded on the wire as a 4-byte integer.  SRV has four 
> fields, three of which are numbers (packed as 2-byte integers) and one that's 
> a hostname (also not encoded in straight string format, but rather the in DNS 
> label format).  TXT is a series of strings, which, not surprisingly, also 
> ends up encoded in some special way.

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. So that means you
publish something like this (it would be all one "line" in DNS but I
can't show that in email):

juliet at pronto._presence._tcp.local. IN TXT "txtvers=1" "1st=Juliet"
"email=juliet at capulet.lit" "hash=sha-1" "jid=juliet at capulet.lit"
"last=Capulet" "msg=Hanging out downtown" "nick=JuliC"
"phsh=a3839614e1a382bcfebbcf20464f519e81770813" "port.p2pj=5562"
"status=avail" "vc=CA!" "ver=QgayPKawpkPSDYmwT/WM94uAlu0="

Yes, no, maybe?


Peter Saint-Andre

More information about the Standards mailing list