<remark><p>Initial published version.</p></remark>
</revision>
<revision>
<version>0.0.2</version>
<date>2009-03-10</date>
<initials>psa</initials>
<remark><p>Removed client inclusion of its IP address; added IPv6 example.</p></remark>
</revision>
<revision>
<version>0.0.1</version>
<date>2009-03-10</date>
<initials>psa</initials>
<remark><p>First draft.</p></remark>
</revision>
</header>
<section1topic='Introduction'anchor='intro'>
<p>There are times when a client might want or need to discover what its external Internet Protocol (IP) address is, e.g. when gathering transport candidates for &xep0065; or &xep0176;. One way to do so is for the client to ask the XMPP server to which it has connected. This simple specification defines such a method. The information provided by the server cannot necessarily be relied upon because there might be intermediate entities between the client and the server, but if the IP address returned by the server is different from the client's notion of its IP address then at the very least the client has received a hint that it might be behind a network address translator (NAT) and therefore cannot usefully provide its private IP address as a candidate for use in multimedia negotiations.</p>
</section1>
<section1topic='Protocol'anchor='proto'>
<p>First the client sends an IQ-get request to its server.</p>
<examplecaption="Client requests its IP address from the server"><![CDATA[
<iqfrom='romeo@montague.lit/orchard'
id='ik2s7159'
type='get'>
<ipxmlns='urn:xmpp:sic:0'/>
</iq>
]]></example>
<p>The server then returns an IQ-result containing an <ip/> element whose XML character data specifies the client's IP address according to the server.</p>
<examplecaption="Server returns IP address"><![CDATA[
<p>If an entity supports this protocol, it MUST report that by including a service discovery feature of "urn:xmpp:sic:0" in response to disco#info requests &NSNOTE;.</p>
<examplecaption="Service discovery information request"><![CDATA[
<p>&xmppcore; specifies that client IP addresses shall not be made public. If a client requests its own IP address, that policy is not violated. However, a server MUST NOT return the IP address of another client (e.g., if a connected client sends a SIC request to the bare JID of another user); instead, it MUST return a &forbidden; error.</p>
<p>This specification defines the following XML namespace:</p>
<ul>
<li>urn:xmpp:sic:0</li>
</ul>
<p>Upon advancement of this specification from a status of Experimental to a status of Draft, the ®ISTRAR; shall add the foregoing namespace to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>