Tatuya-san,

   1. The preferred form is x:x:x:x:x:x:x:x, where the 'x's are the
      hexadecimal values of the eight 16-bit pieces of the address.

Some people interpret "01234" as a 16-bit piece, and others do not.
If we can only refer to this text, I don't think we can go further.

I don't think this case was considered explicitly, but in the tradition of "be liberal in what one receives" as long as the string results in 16-bits I think it is OK for an implementation to accept it. Another reason why I think this is OK is that the document also allows for less then four hex digits. In my view this confirms that there isn't a strict requirement for a number of digits, only that the field results in 16-bits. So "0", "01", "0123", and "01234" are OK, but "12345" is not.


Meanwhile, a recent draft draft-main-ipaddr-text-rep-00.txt points out
that RFC 2373, the previous version of the address architecture RFC,
had an ABNF than invalidated "01234":

      IPv6address = hexpart [ ":" IPv4address ]
      IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT

IPv6prefix = hexpart "/" 1*2DIGIT

      hexpart = hexseq | hexseq "::" [ hexseq ] | "::" [ hexseq ]
      hexseq  = hex4 *( ":" hex4)
      hex4    = 1*4HEXDIG

And the draft itself defines a revised and precise version of the
ABNF, which also prohibits "01234" from being used as a "16-bit
piece."

I don't remember why the ABNF was removed in RFC 3513, but, regardless
of the reason, I believe the address architecture authors actually
intend at most four hex digits.

The ABNF was removed from the document because what was specified was broken and at the time we couldn't find a working replacement.


So, assuming we can agree on draft-main-ipaddr-text-rep-00.txt and the
draft will clarify RFC 3513, can we conclude here that inet_pton()
should reject more than four hex digits as a 16-bit piece?

I don't see the need as long as the result is 16-bits, but would like to see if there are other opinions.


Thanks,
Bob

--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to