>>>>> On Sun, 3 Apr 2005 19:40:36 -0800, 
>>>>> Bill Fenner <fenner@research.att.com> said:

>> I guess I don't understand the latter sentence...
>> 
>> - what is "this format"? (perhaps it's "fe80::1(some delimiter)de0"
>> for URI)

> It's [v6.fe800:1(some delimiter)de0].

Ah, I see.  Then I've been misunderstanding the point from the
beginning, sorry about that.

Let me confirm my understanding once again...

(assuming "some delimiter" is "_" for simplicity)

- for IPv6 addresses without scope zones, we'll type
  http://[2001:db8::1234]/
  as specified in RFC3986.

- for IPv6 addresses with scope zones, we'd type
  http://[v6.fe80::1234_de0]/

  ("v6." is attached deliberately to indicate it's an IPv6 "scoped"
   address with zone, not an ordinary IPv6 address.  RFC3986 prohibits
   the use of "v6." (or any other "vX.") before an IPv6 literal
   address, but it doesn't matter since "fe80::1234_de0" is not a
   standard IPv6 literal address.)

And, going back to the concrete example I showed:

1. assume we type "http://[v6.fe80::1_de0]/"; in "the URL bar" of the
   browser.
2. then the browser parser parses the entire URL and extracts
   "v6.fe80::1_de0" and (the trailing) "/" by recognizing "[" and "]"
   as delimiters.
3. the parser then recognizes it is a representation of an IPv6 scoped
   address with a zone ID from the "v6." part, and extracts
   "fe80::1_de0".
4. the parser replaces "_" in "fe80::1_de0" with "%", and passes the
   result (fe80::1%de0) to getaddrinfo(), getting a sockaddr_in6
   structure (whose sin6_addr member is "fe80::1" and sin6_scope_id
   member is the link ID corresponding to interface "de0").  The
   browser uses the sockaddr_in6 structure with connect(2) to connect
   to the remote web server.
5. the parser also extracts "fe80::1" from "fe80::1_de0" in parallel
   with step 4, and sets "Host:" to it when sending an HTML request to
   the server.

The rationale behind the proposal is that the extra work for the
application in step 3 should justify the other extra work in step 5
(and step 4).

Is my understanding now correct?

                                        JINMEI, Tatuya
                                        Communication Platform Lab.
                                        Corporate R&D Center, Toshiba Corp.
                                        [EMAIL PROTECTED]

--------------------------------------------------------------------
IETF IPv6 working group mailing list
ipv6@ietf.org
Administrative Requests: https://www1.ietf.org/mailman/listinfo/ipv6
--------------------------------------------------------------------

Reply via email to