Thread: status on IPv6 implementation...

status on IPv6 implementation...

From
Lorenzo Huerta
Date:
Hi all,

  I was just wondering if the IPv6 datatype has allready been
implemented on the current version of postgres.

Thanks,
Lorenzo Huerta



_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com


Re: [GENERAL] status on IPv6 implementation...

From
Tom Ivar Helbekkmo
Date:
Lorenzo Huerta <lorhuerta@yahoo.com> writes:

>   I was just wondering if the IPv6 datatype has allready been
> implemented on the current version of postgres.

IPV4 will be in 6.4, but IPV6 won't.  I've left comments and hooks all
over the IPV4 implementation, marking where to extend it to support
IPV6, but I haven't actually done so yet.  The data type is variable
length, so that when it starts to support IPV6, existing tables will
not need to change, and can have IPV6 addresses dropped into them.

-tih
--
Popularity is the hallmark of mediocrity.  --Niles Crane, "Frasier"

Re: [GENERAL] status on IPv6 implementation...

From
Lorenzo Huerta
Date:
Does it treat the ip as text, or numeric value?

On 6 Oct 1998, Tom Ivar Helbekkmo wrote:

> Date: 06 Oct 1998 10:25:28 +0200
> From: Tom Ivar Helbekkmo <tih@nhh.no>
> To: Lorenzo Huerta <lorhuerta@yahoo.com>
> Cc: pgsql-general@postgreSQL.org, lorenzo@nmsu.edu
> Subject: Re: [GENERAL] status on IPv6 implementation...
>
> Lorenzo Huerta <lorhuerta@yahoo.com> writes:
>
> >   I was just wondering if the IPv6 datatype has allready been
> > implemented on the current version of postgres.
>
> IPV4 will be in 6.4, but IPV6 won't.  I've left comments and hooks all
> over the IPV4 implementation, marking where to extend it to support
> IPV6, but I haven't actually done so yet.  The data type is variable
> length, so that when it starts to support IPV6, existing tables will
> not need to change, and can have IPV6 addresses dropped into them.
>
> -tih
> --
> Popularity is the hallmark of mediocrity.  --Niles Crane, "Frasier"
>


Thanks,

     __________________________________________________________________
     *  Lorenzo J. Huerta                                             *
     *  Programming Assistant                                         *
     *  Computing & Networking Networking Architecture and Operations *
     *  New Mexico State University                                   *
     *  phone: (w)(505)646-2582 (h)(505) 521-8699 fax:(505) 646-8139  *
     *  e-mail: lorenzo@nmsu.edu                                      *
     *  Web Site: http://web.nmsu.edu/~ljhuerta                       *
     __________________________________________________________________


Re: [GENERAL] status on IPv6 implementation...

From
Tom Ivar Helbekkmo
Date:
Lorenzo Huerta <lorenzo@nmsu.edu> writes:

> Does it treat the ip as text, or numeric value?

Neither.  It handles IPV4 CIDRs, of which host addresses are a special
case, as just what they are.  Input and output are textual, of course.
The internal storage format looks like this:

typedef struct {
  unsigned char family;        /* AF_INET (or, soon, AF_INET6) */
  unsigned char bits;        /* CIDR prefix length */
  union {
    u_int32_t ipv4_addr;    /* network byte order */
                /* add IPV6 address type here */
  } addr;
} ipaddr_struct;

Oh, and the actual method of storage in the database is variable
length, so even when IPV6 code is added, the IPV4 storage format won't
change in size or layout.

-tih
--
Popularity is the hallmark of mediocrity.  --Niles Crane, "Frasier"