Removed client inclusion of its IP address; added IPv6 example.
0.0.12009-03-10psa
First draft.
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 SOCKS5 Bytestreams (XEP-0065)XEP-0065: SOCKS5 Bytestreams <https://xmpp.org/extensions/xep-0065.html>. or Jingle ICE-UDP Transport Method (XEP-0176)XEP-0176: Jingle ICE-UDP Transport Method <https://xmpp.org/extensions/xep-0176.html>.. 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.
First the client sends an IQ-get request to its server.
]]>
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.
192.168.4.1
]]>
The IP address could be IPv4 or IPv6.
2001:db8::9:1
]]>
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 (see Protocol Namespaces regarding issuance of one or more permanent namespaces).
]]>
]]>
RFC 3920RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/rfc3920>. 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.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA)The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>..
This specification defines the following XML namespace:
urn:xmpp:sic:0
Upon advancement of this specification from a status of Experimental to a status of Draft, the XMPP RegistrarThe XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <https://xmpp.org/registrar/>. shall add the foregoing namespace to the registry located at <https://xmpp.org/registrar/namespaces.html>, as described in Section 4 of XMPP Registrar Function (XEP-0053)XEP-0053: XMPP Registrar Function <https://xmpp.org/extensions/xep-0053.html>..
If the protocol defined in this specification undergoes a revision that is not fully backwards-compatible with an older version, the XMPP Registrar shall increment the protocol version number found at the end of the XML namespaces defined herein, as described in Section 4 of XEP-0053.
]]>
Thanks to Thiago Camargo and Diana Cionoiu for their prodding to define this extension.