Re: INET/CIDR types
От | Larry Rosenman |
---|---|
Тема | Re: INET/CIDR types |
Дата | |
Msg-id | 200007242300.e6ON0lO03554@lerami.lerctr.org обсуждение исходный текст |
Ответ на | Re: INET/CIDR types (Sevo Stille <sevo@ip23.net>) |
Список | 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@ip23.net -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
В списке pgsql-hackers по дате отправления: