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"