From: | Tom Ivar Helbekkmo <tih(at)nhh(dot)no> |
---|---|
To: | Lorenzo Huerta <lorenzo(at)nmsu(dot)edu> |
Cc: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] status on IPv6 implementation... |
Date: | 1998-10-07 06:48:24 |
Message-ID: | 863e90zx3b.fsf@athene.nhh.no |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Lorenzo Huerta <lorenzo(at)nmsu(dot)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"
From | Date | Subject | |
---|---|---|---|
Next Message | Andrea Antibo | 1998-10-07 09:04:58 | Re: [GENERAL] make[2]: *** [psql] Error 1 |
Previous Message | Bruce Momjian | 1998-10-07 02:46:50 | Re: [GENERAL] Regex problems |