| От | Tom Ivar Helbekkmo |
|---|---|
| Тема | Re: [GENERAL] status on IPv6 implementation... |
| Дата | |
| Msg-id | 863e90zx3b.fsf@athene.nhh.no обсуждение исходный текст |
| Ответ на | Re: [GENERAL] status on IPv6 implementation... (Lorenzo Huerta <lorenzo@nmsu.edu>) |
| Список | pgsql-general |
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"
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера