Re: [HACKERS] cidr

Поиск
Список
Период
Сортировка
От Paul A Vixie
Тема Re: [HACKERS] cidr
Дата
Msg-id 199807210459.VAA04300@bb.rc.vix.com
обсуждение исходный текст
Ответ на Re: [HACKERS] cidr  (darcy@druid.net (D'Arcy J.M. Cain))
Ответы Re: [HACKERS] cidr
Re: [HACKERS] cidr
Список pgsql-hackers
> I missed some of the earlier discussion.  Is there going to be a separate
> IP type or is that just x.x.x.x/32?  I like the idea of a host type as
> well.  I would love to sort my IPs and have 198.96.119.99 precede
> 198.96.119.100.

the ordering functions given in the implementation i posted here yesterday
do that, and they also show 192.5.5/24 as being "before" 192.5.5.0/32, which
is important for those of us who import routing tables into database tables.

i don't see a need for a separate type for /32's; if someone enters just the
dotted quad (198.96.119.100 for example) the "/32" will be assumed.  i'd be
willing to see the "/32" stripped off in the output function since it's a bit
redundant -- i didn't do that but it's out of habit rather than strong belief.

if folks really can't get behind "CIDR" then may i suggest "INET"?  it's not
a "NET" or an "IPADDR" or "INADDR" or "INNET" or "HOST".  it is capable of
representing either a network or a host, classlessly.  that makes it a CIDR
to those in the routing or registry business.  and before someone asks: no,
it is not IPv4-specific.  my implementation encodes the address family and
is capable of supporting IPv6 if the "internallength" wants to be 13 or if
someone knows how to make it variable-length.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] cidr
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] cidr