Subject: [SIP] IPv6 addresses in SIP

From: Pekka Pessi <[email-masked]>
Date: 20 Sep 2000 11:25:27 +0300

Hello all,

        As you might know, textual represention of IPv6 addresses include
        non-token characters. The bis-0[012] spec uses common representation
        of IPv6 addresses (IPv6reference) both within SIP-URL and elsewhere.

        I believe that the original intent of RFC 2732 was to limit its
        notation only to URLs. Using square brackets elsewhere, like in Via
        or Warning headers is problematic as, e.g., the maddr and received
        parameters may now include non-token characters "[", "]", and ":".
        This contradicts the basic parsing rules found in Appendix C, is
        incompatible with RFC2543 and HTTP 1.1, and breaks existing
        implementations.

        In order to fully support IPv6 just allowing IPv6 addresses here and
        there is not enought, but an implementation should allow IPv6
        addresses in any parameter, including future extensions.

        I think SIP has three alternatives when supporting IPv6:

     1) use IPv6 addresses where colons are replaced with hyphens:

http-IPv6address = "-" http-hexpart ["-" IPv4address]
http-hexpart = http-hexseq | http-hexseq "--" http-hexseq | "--" http-hexseq
http-hexseq  = hex4 *("-" hex4)
       
        This is somewhat compatible with rfc2543 (like, http-IPv6address is
        a "token", but not a "host"). Downside (besides how ugly it looks)
        is that an implementation needs two special routines to handle IPv6
        addresses.

     2) when a IPv6 address is included as a parameter, it is quoted:

http-host    = hostname | IPv4address | DQUOTE "[" IPv6address "]" DQUOTE
via-maddr    = "maddr=" http-host
via-received = "received=" http-host

        Problem here is that the Via and Warning (not to mention Host from
        HTTP 1.1, or Call-ID from RFC 2543) that previously used "host"
        still need extra attention.

     3) token is re-defined like this:

token       = "[" IPv6address "]" | real-token
real-token  =  1*< any CHAR  except CTL's  or separators>
separators  =  "(" | ")" | "<" | ">" | "@" |
               "," | ";" | ":" | "\" | <"> |
               "/" | "[" | "]" | "?" | "=" |
               "{" | "}" | SP | HT

        This, of course, may break some old implementations. YMMV.

                                        Pekka Pessi

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip

---

From: [email-masked]
Date: Thu, 21 Sep 2000 09:37:35 +0530

Pekka Pessi <[email-masked]> on 09/20/2000 01:55:27 PM

To:   [email-masked]
cc:    (bcc: Ashok I Roy/HSSBLR)

Subject:  [SIP] IPv6 addresses in SIP

>This, of course, may break some old implementations. YMMV.

the issue raised here is valid....however breaking the existing definition
of token doesn't seem to be a very good idea as they would affect a number
of other headers where this definition is not really required. Token
definitiion is  a rather generic one and used widely across all headers.
Instead it might be more prudent to change the definition of generic param
to  something like
                    generic param =   token  [ (= token | quoted string |
ipv6addr) ]

this definition might have problems in certain headers where an ipv6
address or any address is not acceptable.....howevre  this  approach might
just be easier to imnplement and may be more desirable  than the suggested
approach. We can leave it to the application to decide the validity of an
ipv6 address being present in the generic param after it is parsed by the
parser or a simple lcheck might just suffice.

regards,
ashok
-------------
ashok roy @ hughes software systems
--------------

---

From: [email-masked]
Date: Thu, 21 Sep 2000 13:46:32 +0300

Hi,

It is true that the IPv6 extensions to host and parameters are not
compatible with HTTP 1.1 but 
there are also other incompatibilies between SIP syntax and HTTP syntax. 
Therefore, this new incompatibility is not valid reason for changing the SIP
syntax.

The bis-01 syntax works fine as it is.

It should be enough to modify the implementation of parameter parsing in
exactly one place in a parser, 
e.g change the syntax from:

  generic-parameter-for-all-headers = token "=" token

to

  generic-parameter-for-all-headers = token "=" (token | host)

Then, implementing support for IPv6 addresses elsewhere in the syntax should
be done similarly by just modifying
the host syntax according to the bis-01 draft.

--
Petri