1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 16:55:07 -05:00

1.3rc3: further clarified TXT record value

git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2506 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2008-11-14 21:59:12 +00:00
parent 6ec11cb8ac
commit 0491de5f76

View File

@ -27,8 +27,8 @@
<registry/>
&stpeter;
<revision>
<version>1.3rc2</version>
<date>in progress, last updated 2008-10-23</date>
<version>1.3rc3</version>
<date>in progress, last updated 2008-11-14</date>
<initials>psa</initials>
<remark><p>Corrected TXT record format in conformance with draft-cheshire-dnsext-dns-sd; clarified a number of issues related to DNS-SD and Multicast DNS; as an optimization, recommended sending of disco#info data in stream features; removed reference to Encrypted Sessions specification from the security considerations.</p></remark>
</revision>
@ -177,7 +177,7 @@ _presence._tcp.local. PTR juliet@pronto._presence._tcp.local.
<li>The SRV record (see &rfc2782;) maps the presence service instance "juliet@pronto" to the machine "pronto.local." on port 5562.</li>
<li>The PTR ("pointer") record (see &rfc2317; and &rfc1886;) says that there is a service of type "presence" on the local subnet (".local.") called "juliet@pronto" and that the service communicates over TCP.</li>
</ul>
<p>Your chat client also wants to advertise some information about you (subject to your control so that you don't divulge private information). Therefore it invokes the mDNS daemon to also publish a single DNS TXT record (see &rfc1464;) that encapsulates some strings of information, where the record name is the same as the SRV record and the record value follows the format defined in the DNS-SD specification (note: the line breaks are provided only for the sake of readability).</p>
<p>Your chat client also wants to advertise some information about you (subject to your control so that you don't divulge private information). Therefore it invokes the mDNS daemon to also publish a single DNS TXT record (see &rfc1464;) that encapsulates some strings of information, where the record name is the same as the SRV record and the record value follows the format defined in the DNS-SD specification, as further described in the <link url='#txt'>TXT Record</link> section of this document.</p>
<code><![CDATA[
juliet@pronto._presence._tcp.local. IN TXT "
0x09txtvers=1
@ -340,11 +340,12 @@ juliet@pronto._presence._tcp.local. IN TXT "
<p>If the machine name asserted by a client is already taken by another machine on the network, the client MUST assert a different machine name, which SHOULD be formed by adding the character "-" and digit "1" to the end of the machine name string (e.g., "pronto-1"), adding the character "-" and digit "2" if the resulting machine name is already taken (e.g., "pronto-2"), and similarly incrementing the digit until a unique machine name is constructed.</p>
<p>If the username asserted by a client is already taken by another application on the machine, the client MUST assert a different username, which SHOULD be formed by adding the character "-" and digit "1" to the end of the username string (e.g., "juliet-1"), adding the character "-" and digit "2" if the resulting username is already taken (e.g., "juliet-2"), and similarly incrementing the digit until a unique username is constructed.</p>
<section2 topic='TXT Record' anchor='txt'>
<p>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., "user@machine._presence._tcp.local."). The value of the TXT record 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.</p>
<p>For detailed information about the format of the TXT record value, refer to the DNS-SD specification. The following truncated example illustrates the format.</p>
<p>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., "user@machine._presence._tcp.local."). 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.</p>
<p class='box'>Note: The format used for <em>publishing</em> 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).</p>
<p>The following truncated example illustrates the wire format.</p>
<code><![CDATA[
--------------------------------------------------------------------------
| 0x09 | txtvers=1 | 0x0A | 1st=Juliet | 0x1E | email=juliet@capulet.lit |
| 0x09 | txtvers=1 | 0x0A | 1st=Juliet | 0x18 | email=juliet@capulet.lit |
--------------------------------------------------------------------------
]]></code>
<p>In the context of serverless messaging, the following rules apply:</p>