Re: INET/CIDR types

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: sevo(at)ip23(dot)net
Cc: Larry Rosenman <ler(at)lerctr(dot)org>, pgsql-hackers(at)hub(dot)org, Don Baccus <dhogaza(at)pacifier(dot)com>
Subject: Re: INET/CIDR types
Date: 2000-07-24 23:00:46
Message-ID: 200007242300.e6ON0lO03554@lerami.lerctr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Larry Rosenman wrote:
> >
> > What RFC says you can't print all 4 octets of a CIDR Netnumber?
>
> Implicitly in 1518, for example:
> ---------8<----------------------8<----------------------8<------------
> For the purposes of this paper, an IP prefix is an IP address and
> some indication of the leftmost contiguous significant bits within
> this address.
> ---------8<----------------------8<----------------------8<------------
This doesn't prohibit listing all 4 octets, which is my argument...
>
> As I already explained, the use of variable-length masks implies that
> they have to be explicitly stated. This was not neccessary in classed
> networks, as the MSB's encoded the class (mask).
I know this...
>
> > Why does network(cidr) return the whole cidr output just like
> > select cidr?
>
> Because a cast to network is a cast to CIDR - casting to the same type
> obviously won't change a thing.
>
> > I'm just trying to figure out the logic here.
>
> As a matter of fact, it is the side effect of the current
> implementations shortcomings - we have common code for INET and CIDR,
> otherwise, network would not have to be a valid operator for CIDR.

I just want something equivalent to host(inet) that
prints all 4 octets of a CIDR type with no mask.

Is that hard?
>
> > Here is what my Cisco Router that speaks BGP says:
> > big-bro#term ip netmask-format bit-count
> > big-bro#sh ip bg 206.66.0.0/20
> > BGP routing table entry for 206.66.0.0/20, version 150832
> > Paths: (5 available, best #4)
> > Advertised to non peer-group peers:
> > 157.130.140.109 166.63.135.33 206.66.12.3 206.66.12.4 206.66.12.7
> > 206.66.12.
> > ...
> > I am just asking for the same type output.
>
> Huh? The only *network* I see in there IS in /bits notation.
Yes, but with all 4 octets, which is all I'm looking for....

>
> Sevo
>
> --
> Sevo Stille
> sevo(at)ip23(dot)net

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alfred Perlstein 2000-07-24 23:16:34 COPY extended?
Previous Message Don Baccus 2000-07-24 23:00:16 RE: INET/CIDR types