Subject: Re: [netmod] ipv4-prefix / ipv6-prefix normalization

From: Martin Bjorklund <[email-masked]>
Date: Thu, 05 Feb 2009 22:22:54 +0100 (CET)

Juergen Schoenwaelder <[email-masked]> wrote:
> Description: The two representations 192.0.2.0/24 and 192.0.2.8/24
> mean the same thing.
> 
> Discussion: Proposal:
> 
>     * Require that all bits that are not part of the prefix are set to
>       zero (192.0.2.8/24 becomes an invalid representation of an IPv4
>       prefix)
>     * For IPv6, the shortened form will be the canonical format, other
>       representations are allowed
>     * Results in a 1:1 mapping between lexical representation and the
>       value space for IPv4 but not for IPv6

I support this.  Maybe you can refer to the normalized form of the
ipv4-address and ipv6-address types.

/martin

---

From: David Kessens <[email-masked]>
Date: Thu, 5 Feb 2009 14:54:08 -0800

> >       representations are allowed

Note that http://tools.ietf.org/html/rfc4291 says in section "2.2.
Text Representation of Addresses":

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

The abbreviated form is available for convenience. Basically, do
we really want to do something else than the "preferred" format which
is unambiguous and clear although a bit long ?

David Kessens
---

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Fri, 6 Feb 2009 08:52:20 +0100

>From a format point of view, this is a defendable position. However,
since most inet_ntop() implementations seem to suppress 0s, this
simply not the representation generated by many devices (and this is
probably most notable when we consider ::1). On the other hand, since
0 supression rules do not seem the same everywhere, a portable
implementation can't rely on inet_ntop() anyway.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1, 28759 Bremen, Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>