postgresql/contrib/ip_and_mac/README
Bruce Momjian 92da1c3a6a I investigated carefully POSTGRES data base (in idea to use it for
our internal IP routing data base, and because  I have participated
in Ingres development here in Russia in RUBIN/DEMOS project -
through it was not freeware work - and it was very interesting for
me too see such good freeware data base as PostgreSQL), and I
modified 'ipaddr' data type library in accordance to our requests
and to allow SQL do indexing over ipaddr objects.

You can read description at 'http://relcom.EU.net/ipaddr.html' and
get sources at 'http://relcom.EU.net/ip_class.tar.gz'. It contains
sources, sql scripts for incorporating new data type into postgres
(including ipaddr_ops operator class incorporation) and 20,000
records based data test for the indexing.

I am not sure if it's proper mail list for this information, and
if it's interesting for anyone except me to get full-functional
ipaddress class. I am ready to make all modifications, bug fixing
and documentation for this data class if it's nessesary for it's
contribution to the Postgres data base.

Anyway, all my work was based at original 'ip&mac data type'
contribution, written by Tom Ivar Helbekkmo.

Be free to write me any questions or requests about this work.
==============================================================

Aleksei Roudnev, Network Operations Center, Relcom, Moscow (+7 095)
194-19-95 (Network Operations Center Hot Line),(+7 095) 239-10-10,
N 13729 (pager) (+7 095) 196-72-12 (Support), (+7 095) 194-33-28
(Fax)
1998-06-16 04:34:30 +00:00

44 lines
2.0 KiB
Plaintext

This directory contain 2 new classes - macaddr to store mac addresses
written by (Bergen, Norway, 1998-01-31, Tom Ivar Helbekkmo
(tih@Hamartun.Priv.NO)), and ipaddr type and ipaddr_ops operator class,
rewritten by me (alex@relcom.EU.net, Aleksei Roudnev, Moscow, Russia,
25.05.98) and written first by Bergen.
To see the description of macaddr type, read README.ORIG file.
To see the description of ipaddr type, read ipaddr.html file.
^^^^^^^^^^^
This ipaddr type differ slightly from the original one. First, if you
input '193.124.23.0' it sets /24 prefix instead of /32 (this is in
accordance to CISCO's notification and our internal data bases and
records); if you input '0.0.0.0' it's '0.0.0.0/0' (default) but not NULL
or NOADDR value.
Then, you can store ADDRESS/PREFIX pair, even if ADDRESS is not the
subnet address (for example, you can store interface address and mask at
the single attribute). This allow us to determine, for example, which
interfaces/routers are accessible by connected network for our interface
(select * from database where '193.124.23.4' @ interface_address);
Then, it have been written a few new functions and a few operators
(addr1 @ addr - TRUE if addr1 is the part of subnet addr2);
'ipaddr_print' function allow you to convert address to any form you
want; and so on.
And then, I add ipi.sql setup script and test1.sql + test2.sql test
scripts to allow and test indexing by this new class.
This ipaddr type/opclass are used for our internal IP ROUTING and
ACCOUNTING data base, and I hope it shpuld be usefull for more people.
For those who like crazy tasks, I propose to realise 'RTREE' indexing
method to allow effectively use '@' operation for the binding statistic
records to the customers etc networks. Note 'ipaddr' type can be written
as 'start,end' coordination pair and it's possible to define all '<<,
&<, @@, etc graphical operators over this type.
25.05.1998, Aleksei Roudnev, alex@relcom.EU.net, Relcom, Moscow, Russia. /+7-095-194-1995.
==========================================================================================