postgresql/contrib/ip_and_mac
Bruce Momjian 2925114933 try again 1998-06-16 05:35:12 +00:00
..
Makefile try again 1998-06-16 05:35:12 +00:00
README try again 1998-06-16 05:35:12 +00:00
README.ORIG try again 1998-06-16 05:35:12 +00:00
ip.c try again 1998-06-16 05:35:12 +00:00
ip.sql try again 1998-06-16 05:35:12 +00:00
ip_orig.c try again 1998-06-16 05:35:12 +00:00
ipaddr.html try again 1998-06-16 05:35:12 +00:00
ipi.sql try again 1998-06-16 05:35:12 +00:00
mac.c pgindent run before 6.3 release, with Thomas' requested changes. 1998-02-26 04:46:47 +00:00
mac.h pgindent run before 6.3 release, with Thomas' requested changes. 1998-02-26 04:46:47 +00:00
mac.sql try again 1998-06-16 05:35:12 +00:00
t1.sql try again 1998-06-16 05:35:12 +00:00
test.DATA try again 1998-06-16 05:35:12 +00:00
test.sql try again 1998-06-16 05:35:12 +00:00
test1.sql try again 1998-06-16 05:35:12 +00:00
test2.sql try again 1998-06-16 05:35:12 +00:00

README

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