Re: [HACKERS] cidr

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: vixie(at)vix(dot)com (Paul A Vixie)
Cc: pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] cidr
Date: 1998-07-21 05:13:34
Message-ID: 199807210513.BAA22343@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

The only problem is that if we assume /32, how do we auto-netmask class
A/B/C addresses? I guess we don't. If they want a netmask, they are
going to have to specify it in cidr format.

I will be honest. I always found the network/host IP address
distinction to be very unclearly outlined in old/non-cidr address
displays, and this causes major confusion for me when trying to figure
out how things are configured.

> 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.

I like INET too. It is up to you.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-07-21 05:21:43 [Fwd: SGVLLUG Oracle and Informix on Linux]
Previous Message Paul A Vixie 1998-07-21 05:10:14 Re: [HACKERS] cidr