From: Bruce Momjian
Date: Tue, 16 Jun 1998 05:35:12 +0000 (+0000)
Subject: try again
X-Git-Tag: REL6_4_2~892
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=29251149337d2d311cfb6d4895fbd460c5980dd4;p=postgresql
try again
---
diff --git a/contrib/ip_and_mac/Makefile b/contrib/ip_and_mac/Makefile
index 1af7233874..0071eb6123 100644
--- a/contrib/ip_and_mac/Makefile
+++ b/contrib/ip_and_mac/Makefile
@@ -1,7 +1,7 @@
#
# PostgreSQL types for IP and MAC addresses
#
-# $Id: Makefile,v 1.4 1998/06/16 04:34:29 momjian Exp $
+# $Id: Makefile,v 1.5 1998/06/16 05:35:10 momjian Exp $
all: ip.so mac.so
@@ -18,7 +18,7 @@ mac.o: mac.c mac.h
cc -g -O -fPIC -I/usr/local/pgsql/include -c mac.c
install: ip.so mac.so
- install -c ip.so mac.so /usr/local/pgsql/modules
+ install -c ip.so mac.so /usr/local/pgsql/contrib/ip_and_macs
clean:
rm -f *.o *.so *.b
diff --git a/contrib/ip_and_mac/README b/contrib/ip_and_mac/README
index 15b763a4d3..c946f20b9e 100644
--- a/contrib/ip_and_mac/README
+++ b/contrib/ip_and_mac/README
@@ -5,8 +5,8 @@ written by (Bergen, Norway, 1998-01-31, Tom Ivar Helbekkmo
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.
+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
diff --git a/contrib/ip_and_mac/README.ORIG b/contrib/ip_and_mac/README.ORIG
index b43da8eab1..d0e4f436a6 100644
--- a/contrib/ip_and_mac/README.ORIG
+++ b/contrib/ip_and_mac/README.ORIG
@@ -1,7 +1,7 @@
PostgreSQL type extensions for IP and MAC addresses.
---------------------------------------------------
-$Id: README.ORIG,v 1.1 1998/06/16 04:34:29 momjian Exp $
+$Id: README.ORIG,v 1.2 1998/06/16 05:35:10 momjian Exp $
I needed to record IP and MAC level ethernet addresses in a data
base, and I really didn't want to store them as plain strings, with
diff --git a/contrib/ip_and_mac/ip.c b/contrib/ip_and_mac/ip.c
index e9aaba3b8e..0b56375488 100644
--- a/contrib/ip_and_mac/ip.c
+++ b/contrib/ip_and_mac/ip.c
@@ -1,7 +1,7 @@
/*
* PostgreSQL type definitions for IP addresses.
*
- * $Id: ip.c,v 1.4 1998/06/16 04:34:29 momjian Exp $
+ * $Id: ip.c,v 1.5 1998/06/16 05:35:10 momjian Exp $
*/
#include
diff --git a/contrib/ip_and_mac/ip.sql b/contrib/ip_and_mac/ip.sql
index 082e42fff5..2d402bd8f0 100644
--- a/contrib/ip_and_mac/ip.sql
+++ b/contrib/ip_and_mac/ip.sql
@@ -1,14 +1,14 @@
--
-- PostgreSQL code for IP addresses.
--
--- $Id: ip.sql,v 1.4 1998/06/16 04:34:30 momjian Exp $
+-- $Id: ip.sql,v 1.5 1998/06/16 05:35:10 momjian Exp $
-- Invoced from 1998/02/14 17:58:04 scrappy
--
-- New - INPUT/OUTPUT, functions, indexing by btree, test.
-- PART # 1 - ip.sql - load new type, functions and operators.
-- Then you should execute ipi.sql - add ipaddr_ops class to allow indexing.
-load '/usr/local/pgsql/modules/ip.so';
+load '/usr/local/pgsql/contrib/ip_and_macs/ip.so';
--
-- Input and output functions and the type itself:
@@ -20,14 +20,14 @@ load '/usr/local/pgsql/modules/ip.so';
create function ipaddr_in(opaque)
returns opaque
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
create function ipaddr_out(opaque)
returns opaque
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
create type ipaddr (
@@ -46,7 +46,7 @@ create type ipaddr (
drop function ipaddr_print;
create function ipaddr_print(ipaddr, text)
returns text
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
);
@@ -58,32 +58,32 @@ create function ipaddr_print(ipaddr, text)
create function ipaddr_lt(ipaddr, ipaddr)
returns bool
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
create function ipaddr_le(ipaddr, ipaddr)
returns bool
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
create function ipaddr_eq(ipaddr, ipaddr)
returns bool
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
create function ipaddr_ge(ipaddr, ipaddr)
returns bool
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
create function ipaddr_gt(ipaddr, ipaddr)
returns bool
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
create function ipaddr_ne(ipaddr, ipaddr)
returns bool
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
--
@@ -92,7 +92,7 @@ create function ipaddr_ne(ipaddr, ipaddr)
--
create function ipaddr_in_net(ipaddr, ipaddr)
returns bool
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
--
@@ -104,7 +104,7 @@ create function ipaddr_in_net(ipaddr, ipaddr)
create function ipaddr_net(ipaddr)
returns ipaddr
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
--
@@ -114,7 +114,7 @@ create function ipaddr_in_net(ipaddr, ipaddr)
create function ipaddr_is_net(ipaddr)
returns boolean
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
--
@@ -123,7 +123,7 @@ create function ipaddr_in_net(ipaddr, ipaddr)
create function ipaddr_len(ipaddr)
returns int4
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
--
@@ -132,7 +132,7 @@ create function ipaddr_in_net(ipaddr, ipaddr)
create function ipaddr_pref(ipaddr)
returns int4
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
--
@@ -142,7 +142,7 @@ create function ipaddr_in_net(ipaddr, ipaddr)
create function ipaddr_integer(ipaddr)
returns int4
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
--
@@ -152,7 +152,7 @@ create function ipaddr_in_net(ipaddr, ipaddr)
create function ipaddr_compose(int4,int4)
returns ipaddr
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
--
@@ -161,7 +161,7 @@ create function ipaddr_in_net(ipaddr, ipaddr)
create function ipaddr_mask(ipaddr)
returns ipaddr
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
--
@@ -170,7 +170,7 @@ create function ipaddr_in_net(ipaddr, ipaddr)
create function ipaddr_bcast(ipaddr)
returns ipaddr
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
--
@@ -180,7 +180,7 @@ create function ipaddr_in_net(ipaddr, ipaddr)
create function ipaddr_cmp(ipaddr,ipaddr)
returns int4
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
--
@@ -189,12 +189,12 @@ create function ipaddr_in_net(ipaddr, ipaddr)
create function ipaddr_plus(ipaddr,int4)
returns ipaddr
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
create function ipaddr_minus(ipaddr,int4)
returns ipaddr
- as '/usr/local/pgsql/modules/ip.so'
+ as '/usr/local/pgsql/contrib/ip_and_macs/ip.so'
language 'c';
--
diff --git a/contrib/ip_and_mac/ip.sql.in b/contrib/ip_and_mac/ip.sql.in
deleted file mode 100644
index 1b21507cee..0000000000
--- a/contrib/ip_and_mac/ip.sql.in
+++ /dev/null
@@ -1,131 +0,0 @@
---
--- PostgreSQL code for IP addresses.
---
--- $Id: ip.sql.in,v 1.1 1998/04/22 04:20:30 scrappy Exp $
---
-
-load '_OBJWD_/ip_DLSUFFIX_';
-
---
--- Input and output functions and the type itself:
---
-
-create function ipaddr_in(opaque)
- returns opaque
- as '_OBJWD_/ip_DLSUFFIX_'
- language 'c';
-
-create function ipaddr_out(opaque)
- returns opaque
- as '_OBJWD_/ip_DLSUFFIX_'
- language 'c';
-
-create type ipaddr (
- internallength = 6,
- externallength = variable,
- input = ipaddr_in,
- output = ipaddr_out
-);
-
---
--- The various boolean tests:
---
-
-create function ipaddr_lt(ipaddr, ipaddr)
- returns bool
- as '_OBJWD_/ip_DLSUFFIX_'
- language 'c';
-
-create function ipaddr_le(ipaddr, ipaddr)
- returns bool
- as '_OBJWD_/ip_DLSUFFIX_'
- language 'c';
-
-create function ipaddr_eq(ipaddr, ipaddr)
- returns bool
- as '_OBJWD_/ip_DLSUFFIX_'
- language 'c';
-
-create function ipaddr_ge(ipaddr, ipaddr)
- returns bool
- as '_OBJWD_/ip_DLSUFFIX_'
- language 'c';
-
-create function ipaddr_gt(ipaddr, ipaddr)
- returns bool
- as '_OBJWD_/ip_DLSUFFIX_'
- language 'c';
-
-create function ipaddr_ne(ipaddr, ipaddr)
- returns bool
- as '_OBJWD_/ip_DLSUFFIX_'
- language 'c';
-
-create function ipaddr_in_net(ipaddr, ipaddr)
- returns bool
- as '_OBJWD_/ip_DLSUFFIX_'
- language 'c';
-
-create function ipaddr_mask(ipaddr)
- returns ipaddr
- as '_OBJWD_/ip_DLSUFFIX_'
- language 'c';
-
-create function ipaddr_bcast(ipaddr)
- returns ipaddr
- as '_OBJWD_/ip_DLSUFFIX_'
- language 'c';
-
---
--- Now the operators. Note how some of the parameters to some
--- of the 'create operator' commands are commented out. This
--- is because they reference as yet undefined operators, and
--- will be implicitly defined when those are, further down.
---
-
-create operator < (
- leftarg = ipaddr,
- rightarg = ipaddr,
--- negator = >=,
- procedure = ipaddr_lt
-);
-
-create operator <= (
- leftarg = ipaddr,
- rightarg = ipaddr,
--- negator = >,
- procedure = ipaddr_le
-);
-
-create operator = (
- leftarg = ipaddr,
- rightarg = ipaddr,
- commutator = =,
--- negator = <>,
- procedure = ipaddr_eq
-);
-
-create operator >= (
- leftarg = ipaddr,
- rightarg = ipaddr,
- negator = <,
- procedure = ipaddr_ge
-);
-
-create operator > (
- leftarg = ipaddr,
- rightarg = ipaddr,
- negator = <=,
- procedure = ipaddr_gt
-);
-
-create operator <> (
- leftarg = ipaddr,
- rightarg = ipaddr,
- negator = =,
- procedure = ipaddr_ne
-);
-
---
--- eof
---
diff --git a/contrib/ip_and_mac/ip_orig.c b/contrib/ip_and_mac/ip_orig.c
new file mode 100644
index 0000000000..316e824407
--- /dev/null
+++ b/contrib/ip_and_mac/ip_orig.c
@@ -0,0 +1,257 @@
+/*
+ * PostgreSQL type definitions for IP addresses.
+ *
+ * $Id: ip_orig.c,v 1.1 1998/06/16 05:35:11 momjian Exp $
+ */
+
+#include
+
+#include
+#include
+
+/*
+ * This is the internal storage format for IP addresses:
+ */
+
+typedef struct ipaddr
+{
+ uint32 address;
+ int16 width;
+} ipaddr;
+
+/*
+ * Various forward declarations:
+ */
+
+ipaddr *ipaddr_in(char *str);
+char *ipaddr_out(ipaddr * addr);
+
+bool ipaddr_lt(ipaddr * a1, ipaddr * a2);
+bool ipaddr_le(ipaddr * a1, ipaddr * a2);
+bool ipaddr_eq(ipaddr * a1, ipaddr * a2);
+bool ipaddr_ge(ipaddr * a1, ipaddr * a2);
+bool ipaddr_gt(ipaddr * a1, ipaddr * a2);
+
+bool ipaddr_ne(ipaddr * a1, ipaddr * a2);
+
+int4 ipaddr_cmp(ipaddr * a1, ipaddr * a2);
+
+bool ipaddr_in_net(ipaddr * a1, ipaddr * a2);
+ipaddr *ipaddr_mask(ipaddr * a);
+ipaddr *ipaddr_bcast(ipaddr * a);
+
+/*
+ * Build a mask of a given width:
+ */
+
+unsigned long
+build_mask(unsigned char bits)
+{
+ unsigned long mask = 0;
+ int i;
+
+ for (i = 0; i < bits; i++)
+ mask = (mask >> 1) | 0x80000000;
+ return mask;
+}
+
+/*
+ * IP address reader. Note how the count returned by sscanf()
+ * is used to determine whether the mask size was specified.
+ */
+
+ipaddr *
+ipaddr_in(char *str)
+{
+ int a,
+ b,
+ c,
+ d,
+ w;
+ ipaddr *result;
+ int count;
+
+ if (strlen(str) > 0)
+ {
+
+ count = sscanf(str, "%d.%d.%d.%d/%d", &a, &b, &c, &d, &w);
+
+ if (count < 4)
+ {
+ elog(ERROR, "ipaddr_in: error in parsing \"%s\"", str);
+ return (NULL);
+ }
+
+ if (count == 4)
+ w = 32;
+
+ if ((a < 0) || (a > 255) || (b < 0) || (b > 255) ||
+ (c < 0) || (c > 255) || (d < 0) || (d > 255) ||
+ (w < 0) || (w > 32))
+ {
+ elog(ERROR, "ipaddr_in: illegal address \"%s\"", str);
+ return (NULL);
+ }
+ }
+ else
+ {
+ a = b = c = d = w = 0; /* special case for missing address */
+ }
+
+ result = (ipaddr *) palloc(sizeof(ipaddr));
+
+ result->address = (uint32) ((a << 24) | (b << 16) | (c << 8) | d);
+ result->address &= build_mask(w);
+ result->width = w;
+
+ return (result);
+}
+
+/*
+ * IP address output function. Note mask size specification
+ * generated only for subnets, not for plain host addresses.
+ */
+
+char *
+ipaddr_out(ipaddr * addr)
+{
+ char *result;
+
+ if (addr == NULL)
+ return (NULL);
+
+ result = (char *) palloc(32);
+
+ if (addr->address > 0)
+ {
+ if (addr->width == 32)
+ sprintf(result, "%d.%d.%d.%d",
+ (addr->address >> 24) & 0xff,
+ (addr->address >> 16) & 0xff,
+ (addr->address >> 8) & 0xff,
+ addr->address & 0xff);
+ else
+ sprintf(result, "%d.%d.%d.%d/%d",
+ (addr->address >> 24) & 0xff,
+ (addr->address >> 16) & 0xff,
+ (addr->address >> 8) & 0xff,
+ addr->address & 0xff,
+ addr->width);
+ }
+ else
+ {
+ result[0] = 0; /* special case for missing address */
+ }
+ return (result);
+}
+
+/*
+ * Boolean tests for magnitude.
+ */
+
+bool
+ipaddr_lt(ipaddr * a1, ipaddr * a2)
+{
+ return (a1->address < a2->address);
+};
+
+bool
+ipaddr_le(ipaddr * a1, ipaddr * a2)
+{
+ return (a1->address <= a2->address);
+};
+
+bool
+ipaddr_eq(ipaddr * a1, ipaddr * a2)
+{
+ return (a1->address == a2->address);
+};
+
+bool
+ipaddr_ge(ipaddr * a1, ipaddr * a2)
+{
+ return (a1->address >= a2->address);
+};
+
+bool
+ipaddr_gt(ipaddr * a1, ipaddr * a2)
+{
+ return (a1->address > a2->address);
+};
+
+bool
+ipaddr_ne(ipaddr * a1, ipaddr * a2)
+{
+ return (a1->address != a2->address);
+};
+
+/*
+ * Comparison function for sorting:
+ */
+
+int4
+ipaddr_cmp(ipaddr * a1, ipaddr * a2)
+{
+ if (a1->address < a2->address)
+ return -1;
+ else if (a1->address > a2->address)
+ return 1;
+ else
+ return 0;
+}
+
+/*
+ * Test whether an address is within a given subnet:
+ */
+
+bool
+ipaddr_in_net(ipaddr * a1, ipaddr * a2)
+{
+ uint32 maskbits;
+
+ if (a1->width < a2->width)
+ return FALSE;
+ if ((a1->width == 32) && (a2->width == 32))
+ return ipaddr_eq(a1, a2);
+ maskbits = build_mask(a2->width);
+ if ((a1->address & maskbits) == (a2->address & maskbits))
+ return TRUE;
+ return FALSE;
+}
+
+/*
+ * Pick out just the mask of a network:
+ */
+
+ipaddr *
+ipaddr_mask(ipaddr * a)
+{
+ ipaddr *result;
+
+ result = (ipaddr *) palloc(sizeof(ipaddr));
+ result->address = build_mask(a->width);
+ result->width = 32;
+
+ return result;
+}
+
+/*
+ * Return the broadcast address of a network:
+ */
+
+ipaddr *
+ipaddr_bcast(ipaddr * a)
+{
+ ipaddr *result;
+
+ result = (ipaddr *) palloc(sizeof(ipaddr));
+ result->address = a->address;
+ result->address |= (build_mask(32 - a->width) >> a->width);
+ result->width = 32;
+
+ return result;
+}
+
+/*
+ * eof
+ */
diff --git a/contrib/ip_and_mac/ipaddr.html b/contrib/ip_and_mac/ipaddr.html
new file mode 100644
index 0000000000..8b7d3eb164
--- /dev/null
+++ b/contrib/ip_and_mac/ipaddr.html
@@ -0,0 +1,488 @@
+
+
+
+
+
+
+
+
+New object class for the IP ADDRESSES manipulations.
+
+1. Description:
+
+
+
+2. How to install:
+
+
+Use script ip.sql to add new type, new functions and operators
+to the data base.
+
+Use script ipi.sql to add new type and new operator class ipaddr_ops
+to the index system and allow indexing by this new type (with search by
+'>', '>=', '<', '<=', '='
+boolean operators).
+
+Use scripts 'test1.sql' and 'test2.sql' (edit second script
+first) to check if indexing work properly.
+
+
+3. Input / output formsts.
+
+New type stores IP address and IP prefix in the single data attribute.
+To input data, you should use the form
+
+
+
+for the address DDD.DDD.DDD.DDD and prefix PP (prefix
+is len from 0 (for 0.0.0.0) to 32 (for 255.255.255.255)). You can miss
+/PP n two cases:
+
+
+- You enter host address (this means /32 prefix) and this is not the
+address of the natural class A, B or C network.
+
+- You enter natural class A, B, C network with the /8, /16 and /24 prefix.
+
+
+For example, 193.124.23.0 should be read as '193.124.23.0/24'
+network, and '193.124.23.1' should be read as /32 host address.
+To enter interface address 193.124.23.6/24, you should use exact
+form '193.124.23.6/24'.
+
+The address '0.0.0.0' means '0.0.0.0/0', this is default in terms
+of routers.
+
+ipaddr type data are printed just in the same form (to allow
+input/output compatibility) - 193.124.23.0/24 should be printed
+as '193.124.23.0' and '193.124.23.1/32' should be printed
+as '193.124.23.1'.
+
+There is special function to convert ipaddr data into string by the
+format:
+
+
+char ipaddr_print(ipaddr,format)
+
+
+format consist of plain text and %C special characters:
+
+
+%A - address in form ddd.ddd.ddd.ddd,
+%M - network mask in form ddd.ddd.ddd.ddd,
+%B - negated mask ('0.0.0.7' for '/29' prefix, for example),
+%P - prefix (withouth '/' delimiter).
+
+
+4. Operators.
+
+
+
+Left argument
+A1 |
+
+Op |
+
+Right argument
+A2 |
+
+Result
+R |
+
+Description |
+
+
+
+ipaddr |
+
+< |
+
+ipaddr |
+
+boolean |
+
+Compare addresses, if they are equal, compare prefixes, |
+
+
+
+ipaddr |
+
+<= |
+
+ipaddr |
+
+boolean |
+
+Compare addresses, if they are equal, compare prefixes, |
+
+
+
+ipaddr |
+
+= |
+
+ipaddr |
+
+boolean |
+
+Compare addresses, if they are equal, compare prefixes, |
+
+
+
+ipaddr |
+
+>= |
+
+ipaddr |
+
+boolean |
+
+Compare addresses, if they are equal, compare prefixes, |
+
+
+
+ipaddr |
+
+> |
+
+ipaddr |
+
+boolean |
+
+Compare addresses, if they are equal, compare prefixes, |
+
+
+
+ipaddr |
+
+<> |
+
+ipaddr |
+
+boolean |
+
+Compare addresses, if they are equal, compare prefixes, |
+
+
+
+ipaddr |
+
+@ |
+
+ipaddr |
+
+boolean |
+
+True if A1 is the part of network (subnetwork) A2 or if A1 = A2 |
+
+
+
+ipaddr |
+
++ |
+
+int4 |
+
+ipaddr |
+
+Increase address A1 on A2 value (A2 is integer). |
+
+
+
+ipaddr |
+
+- |
+
+int4 |
+
+ipaddr |
+
+Decrease address A1 on A2. |
+
+
+
+5. Functions.
+
+There is a lot of functions defined for new ipaddr data type. Some of
+them are duplicated by operators described above, some are not.
+
+
+
+Function(arguments) |
+
+Function type |
+
+Description |
+
+Operator |
+
+
+
+ipaddr_print(ipaddr, text) |
+
+text |
+
+Converts ipaddr to the text string by format from the second argument.
+Format can contain %A - address, %M - mask, %B - reversed mask, %P - prefix,
+and any other characters. |
+
+ |
+
+
+
+ipaddr_lt(ipaddr, ipaddr) |
+
+boolean |
+
+Compare by '<' |
+
+< |
+
+
+
+ipaddr_le(ipaddr,ipaddr) |
+
+boolean |
+
+Compare by '<=' |
+
+<= |
+
+
+
+ipaddr_eq(ipaddr, ipaddr) |
+
+boolean |
+
+Compare by '=' |
+
+= |
+
+
+
+ipaddr_ne(ipaddr, ipaddr) |
+
+boolean |
+
+Compare by '<>' |
+
+<> |
+
+
+
+ipaddr_ge(ipaddr, ipaddr) |
+
+boolean |
+
+Compare by '>=' |
+
+>= |
+
+
+
+ipaddr_gt(ipaddr, ipaddr) |
+
+boolean |
+
+Compare by '>' |
+
+> |
+
+
+
+ipaddr_in_net(ipaddr, ipaddr) |
+
+boolean |
+
+True if fisrt argument is the host or subnetwork of the second
+argument (first address is equal or included into the second one) |
+
+@ |
+
+
+
+ipaddr_net(ipaddr) |
+
+ipaddr |
+
+Return the network (with the 0 in host bits) for the argument; for
+example ipaddr_net('193.124.23.1/24') = '193.124.23.0'; |
+
+ |
+
+
+
+ipaddr_bcast(ipaddr) |
+
+ipaddr |
+
+Return broadcast address (with the /32 prefix) for the network described
+by argument. |
+
+ |
+
+
+
+ipaddr_is_net(ipaddr) |
+
+boolean |
+
+True if ipaddr is network address; false if its' the
+host in the network. For the /32 addresses, returns false. |
+
+ |
+
+
+
+ipaddr_mask(ipaddr) |
+
+ipaddr |
+
+Return netmask (with /32 prefix) for the network. |
+
+ |
+
+
+
+ipaddr_prefix(ipaddr) |
+
+int4 |
+
+Return the prefix size (from 0 to 32). |
+
+ |
+
+
+
+ipaddr_len(ipaddr) |
+
+int4 |
+
+Return the number of addresses in the particular network (for example,
+256 for /24 prefix). |
+
+ |
+
+
+
+ipaddr_integer(ipaddr) |
+
+int4 |
+
+Return IP address (withouth the prefix) as integer. |
+
+ |
+
+
+
+ipaddr_compose(int4,int4) |
+
+ipaddr |
+
+Compose ipaddr object from ip address (first argument) and prefix lenght
+(second argument). ipaddr_compose(ipaddr_integer(a),ipaddr_prefix(a)) =
+a. |
+
+ |
+
+
+
+ipaddr_plus(ipaddr, int4) |
+
+ipaddr |
+
+Operator PLUS (addres increased, prefix does not changed) |
+
++ |
+
+
+
+ipaddr_minus(ipaddr, int4) |
+
+ipaddr |
+
+Operator MINUS (address decreased, prefix does not changed). |
+
+- |
+
+
+
+ipaddr_cmp(ipaddr, ipaddr) |
+
+int4 |
+
+Compare it's arguments and return -1, 0 or +1. |
+
+ |
+
+
+
+5. Usage.
+
+New type opens many interesting futures for the ip routing or ip accounting
+networks. For example, you can search all interfaces connected to the same
+phisical network by comparing ipaddr_net(interface_address) /if you store
+address as address/prefix pair in the single attribute, and so on.
+
+Unfortunately, I had not time (and was not too familiar with RTree ideas
+used in Postgres) to check if it's possible to use RTree indexing for the
+fast routing lookups by data base. It's important task because usial usage
+of this future is _determine the nearest network the particular address
+contain to, and link the accounting record to this network_. And so on.
+
+Write any questions or wishes to me by e-mail. This is BETA version
+of this package for now, because we are building our IP routing data base
+just now and did not tested all this fucntions under heavy conditions;
+through I hope this functions are too simple for the hidden bugs, and they
+was tested carefully at the simple tests.
+
+6. Installation.
+
+
+- Translate shared library ip.so:
+make
+
+- Install shared library to the proper place (/usr/local/pgsql/contrib/ip_and_macs)
+make install
+(in case if your system is not FreeBSD, it can be nessesary modify 'Makefile'
+before).
+
+- Public to the accessible place scripts ip.sql (installation of data
+type), ipi.sql (describing of this data type for the proper indexing),
+test1.sql, test2.sql, test.DATA (test and data). Modify test1.sql in accordance
+to real location of the data files.
+
+- To add new data type into your data base, exec scripts in this data
+base:
+psql DATA_BASE
+\i ip.sql -- change this to the real location
+\i ipi.sql -- change this to the real location
+
+- To test this data type, exec test1.sql and test2.sql SQL scripts.
+
+
+7. Download.
+
+You can download this data type from http://relcom.EU.net/ip_class.tar.gz
+
+
+
+
+
+
+
+Aleksei Roudnev, The Network Operation Centre, Relcom Network; Moscow,
+Russia.
+
+
+
+
+
+
+
diff --git a/contrib/ip_and_mac/ipi.sql b/contrib/ip_and_mac/ipi.sql
new file mode 100644
index 0000000000..66dc1e3d93
--- /dev/null
+++ b/contrib/ip_and_mac/ipi.sql
@@ -0,0 +1,64 @@
+begin;
+select pgam.oid from pg_am pgam
+where amname = 'btree';
+--
+-- Temporary oper table
+--
+-- drop table tmp_op;
+create table tmp_op ( oprname name, opi int2);
+--
+-- Fill in this table
+--
+insert into tmp_op values('<','1');
+insert into tmp_op values('<=','2');
+insert into tmp_op values('=','3');
+insert into tmp_op values('>=','4');
+insert into tmp_op values('>','5');
+select * from tmp_op;
+--
+-- Add record to the pg_opclass
+--
+DELETE FROM pg_opclass WHERE opcname = 'ipaddr_ops';
+INSERT INTO pg_opclass (opcname,opcdeftype)
+select 'ipaddr_ops',oid from pg_type where typname = 'ipaddr';
+--
+-- And determine oid
+--
+SELECT opc.oid,opc.opcname
+ FROM pg_opclass opc
+ WHERE opc.opcname = 'ipaddr_ops';
+--
+SELECT o.oid AS opoid, o.oprname
+INTO TABLE ipaddr_tmp
+FROM pg_operator o, pg_type t
+WHERE o.oprleft = t.oid and o.oprright = t.oid and t.typname = 'ipaddr';
+SELECT * FROM ipaddr_tmp;
+--
+INSERT INTO pg_amop (amopid, amopclaid, amopopr, amopstrategy, amopselect, amopnpages)
+SELECT am.oid,opcl.oid,c.opoid,t.opi,'btreesel'::regproc, 'btreenpage'::regproc
+FROM pg_am am, pg_opclass opcl, ipaddr_tmp c, tmp_op t
+WHERE t.oprname = c.oprname
+ and amname = 'btree'
+ and opcname = 'ipaddr_ops';
+--
+SELECT prc.oid, prc.proname FROM pg_proc prc
+WHERE prc.proname = 'ipaddr_cmp';
+--
+INSERT INTO pg_amproc (amid, amopclaid, amproc, amprocnum)
+SELECT pgam.oid, opc.oid,prc.oid,'1'::int2
+FROM pg_am pgam,
+ pg_opclass opc,
+ pg_proc prc
+WHERE prc.proname = 'ipaddr_cmp'
+ and pgam.amname = 'btree'
+ and opc.opcname = 'ipaddr_ops';
+
+drop table tmp_op;
+DROP TABLE ipaddr_tmp;
+COMMIT;
+
+-- *****************************************************************
+-- * Now you should test this by running test1.sql and test2.sql *
+-- * In test2, be sure the 'explain' operator show you *
+-- * search by index in the last line of output *
+-- *****************************************************************
diff --git a/contrib/ip_and_mac/mac.sql.in b/contrib/ip_and_mac/mac.sql
similarity index 77%
rename from contrib/ip_and_mac/mac.sql.in
rename to contrib/ip_and_mac/mac.sql
index 3abbc37154..e0f4d72079 100644
--- a/contrib/ip_and_mac/mac.sql.in
+++ b/contrib/ip_and_mac/mac.sql
@@ -1,10 +1,10 @@
--
-- PostgreSQL code for MAC addresses.
--
--- $Id: mac.sql.in,v 1.1 1998/04/22 04:20:36 scrappy Exp $
+-- $Id: mac.sql,v 1.4 1998/06/16 05:35:11 momjian Exp $
--
-load '_OBJWD_/mac_DLSUFFIX_';
+load '/usr/local/pgsql/contrib/ip_and_macs/mac.so';
--
-- Input and output functions and the type itself:
@@ -12,12 +12,12 @@ load '_OBJWD_/mac_DLSUFFIX_';
create function macaddr_in(opaque)
returns opaque
- as '_OBJWD_/mac_DLSUFFIX_'
+ as '/usr/local/pgsql/contrib/ip_and_macs/mac.so'
language 'c';
create function macaddr_out(opaque)
returns opaque
- as '_OBJWD_/mac_DLSUFFIX_'
+ as '/usr/local/pgsql/contrib/ip_and_macs/mac.so'
language 'c';
create type macaddr (
@@ -33,32 +33,32 @@ create type macaddr (
create function macaddr_lt(macaddr, macaddr)
returns bool
- as '_OBJWD_/mac_DLSUFFIX_'
+ as '/usr/local/pgsql/contrib/ip_and_macs/mac.so'
language 'c';
create function macaddr_le(macaddr, macaddr)
returns bool
- as '_OBJWD_/mac_DLSUFFIX_'
+ as '/usr/local/pgsql/contrib/ip_and_macs/mac.so'
language 'c';
create function macaddr_eq(macaddr, macaddr)
returns bool
- as '_OBJWD_/mac_DLSUFFIX_'
+ as '/usr/local/pgsql/contrib/ip_and_macs/mac.so'
language 'c';
create function macaddr_ge(macaddr, macaddr)
returns bool
- as '_OBJWD_/mac_DLSUFFIX_'
+ as '/usr/local/pgsql/contrib/ip_and_macs/mac.so'
language 'c';
create function macaddr_gt(macaddr, macaddr)
returns bool
- as '_OBJWD_/mac_DLSUFFIX_'
+ as '/usr/local/pgsql/contrib/ip_and_macs/mac.so'
language 'c';
create function macaddr_ne(macaddr, macaddr)
returns bool
- as '_OBJWD_/mac_DLSUFFIX_'
+ as '/usr/local/pgsql/contrib/ip_and_macs/mac.so'
language 'c';
--
@@ -117,7 +117,7 @@ create operator <> (
create function macaddr_manuf(macaddr)
returns text
- as '_OBJWD_/mac_DLSUFFIX_'
+ as '/usr/local/pgsql/contrib/ip_and_macs/mac.so'
language 'c';
--
diff --git a/contrib/ip_and_mac/t1.sql b/contrib/ip_and_mac/t1.sql
new file mode 100644
index 0000000000..0ded14f3d3
--- /dev/null
+++ b/contrib/ip_and_mac/t1.sql
@@ -0,0 +1,5 @@
+insert into xx values('193.124.23.2','host2');
+insert into xx values('193.124.23.3','host3');
+insert into xx values('193.124.22.1','host4');
+insert into xx values('193.124.22.2','host5');
+insert into xx values('193.124.22.3','host6');
diff --git a/contrib/ip_and_mac/test.DATA b/contrib/ip_and_mac/test.DATA
new file mode 100644
index 0000000000..1bce53bd62
--- /dev/null
+++ b/contrib/ip_and_mac/test.DATA
@@ -0,0 +1,999 @@
+193.125.80.35 193.232.202.80 2 880
+193.125.80.35 194.87.0.22 2 574
+194.87.42.38 195.16.106.31 262 10696
+204.62.245.169 193.125.24.10 14 833
+193.125.80.35 195.24.128.65 3 180
+193.125.80.35 195.54.2.1 2 630
+193.125.80.35 195.54.192.33 7 448
+194.87.42.38 195.16.106.22 14 736
+193.125.80.35 195.210.140.7 3 1068
+194.87.41.131 195.46.160.46 10 681
+194.87.37.2 194.135.213.244 66 9088
+194.87.36.193 195.9.53.1 8 464
+194.87.36.193 194.135.2.7 8 464
+194.87.36.1 195.24.224.1 2 716
+194.87.34.44 195.16.96.2 2 164
+194.87.31.230 195.46.160.92 10 757
+194.87.24.93 195.46.160.46 9 664
+194.87.24.93 195.16.104.35 8 598
+194.87.23.28 195.210.155.149 22 1249
+194.87.22.107 195.46.160.34 76 3630
+194.87.18.152 195.90.162.2 15 666
+194.87.18.152 195.90.128.107 1 66
+193.125.80.35 62.76.114.44 2 880
+194.87.16.174 195.46.160.120 17 2276
+204.62.245.168 194.226.45.36 8 444
+194.87.16.78 195.16.104.35 8 720
+194.87.16.61 195.16.96.22 29 1248
+194.87.16.39 194.220.215.66 324 25148
+194.87.16.10 195.128.133.65 57 4301
+194.87.16.10 194.135.176.121 237 18379
+193.125.80.38 194.84.69.5 21 1929
+193.125.80.38 212.46.1.30 40 3758
+204.62.245.168 144.206.160.32 8 450
+193.125.80.44 195.151.199.4 45 2520
+194.87.15.158 195.46.160.46 2 112
+193.125.80.60 193.232.127.78 2 880
+193.125.80.60 193.232.202.80 2 864
+194.87.15.138 195.16.110.7 2 112
+193.125.80.60 195.96.65.2 2 864
+194.87.15.138 193.124.110.130 2 112
+194.87.15.1 195.90.130.133 3 84
+193.125.80.144 212.46.4.3 311 21140
+193.125.80.163 194.84.132.222 261 110114
+193.125.80.163 194.87.12.50 582 38097
+193.125.80.163 194.87.13.2 34 2499
+194.87.14.221 195.46.165.215 5 382
+193.125.81.139 195.34.34.70 107 7799
+193.125.81.140 194.67.115.130 5 220
+204.62.245.167 195.222.130.72 9 475
+204.62.245.167 193.125.242.225 2 88
+194.87.14.221 195.46.163.47 117 99564
+193.125.81.146 194.87.5.3 12 672
+193.125.81.146 194.87.12.50 4 224
+193.125.81.146 194.87.13.2 5 280
+194.87.14.221 195.46.162.91 137 21211
+193.125.81.146 195.161.0.34 2 112
+193.125.81.146 195.218.135.39 2 112
+194.87.14.221 195.12.32.8 131 132002
+194.87.14.221 193.124.252.73 530 214220
+193.125.81.148 194.67.146.145 201 8040
+193.125.81.148 194.87.5.3 49 3140
+193.125.81.148 194.87.12.50 230 12526
+193.125.81.148 194.87.13.2 31 2042
+194.87.14.216 195.210.154.154 68 32028
+193.125.81.148 194.190.218.2 8 611
+193.125.81.148 195.161.0.34 17 1473
+193.125.81.148 195.218.135.39 245 16647
+193.125.81.152 193.193.192.2 215 14797
+193.125.81.152 194.87.13.2 12 748
+193.125.81.152 195.24.128.65 27 1896
+193.125.81.152 195.54.192.118 53 3209
+194.87.14.216 195.210.154.152 83 81270
+193.125.84.12 195.46.160.45 47 2373
+193.125.84.154 195.90.128.107 1 62
+193.125.84.154 195.90.140.2 1 62
+194.87.14.203 195.210.130.62 6 821
+194.87.14.152 195.46.160.69 12 2172
+193.125.86.4 195.19.32.1 176 89133
+194.87.14.73 195.90.162.2 41 42955
+194.87.14.53 195.46.162.75 149 138236
+194.87.14.51 195.210.190.19 19 10290
+194.87.14.6 195.46.163.31 22 24836
+193.125.90.34 194.87.161.7 2 208
+193.125.90.34 194.87.161.229 13 8867
+193.125.90.34 195.54.17.33 644 81839
+194.87.14.5 193.124.97.131 53 12784
+193.125.90.130 194.58.95.62 82 7119
+194.87.13.26 212.248.36.8 14 7757
+194.87.13.26 195.98.162.111 80 39391
+194.87.13.26 195.98.161.25 70 76902
+194.87.13.26 195.46.165.196 30 14838
+194.87.13.26 195.46.161.219 47 39327
+193.125.95.121 193.124.1.131 248 101051
+194.87.13.26 194.85.149.13 28 24599
+194.87.13.21 195.98.162.9 32 16101
+194.87.13.21 195.90.136.148 84 93861
+193.125.95.121 194.186.254.26 79 5470
+194.87.13.21 195.46.162.244 10 400
+194.87.13.21 195.12.32.182 96 53171
+194.87.13.20 212.248.36.8 14 6798
+194.87.13.20 212.20.8.250 358 438254
+194.87.13.20 195.222.130.242 4 550
+194.87.13.20 195.222.130.77 8 6753
+193.125.95.124 192.124.176.69 4 538
+193.125.95.124 193.124.5.54 2 126
+194.87.13.20 195.210.143.145 4 168
+193.125.95.124 193.124.110.129 21 2181
+193.125.95.124 193.124.148.81 2 310
+194.87.13.20 195.210.136.25 4 626
+193.125.95.124 194.67.2.97 3 382
+193.125.95.124 194.84.222.2 3 382
+194.87.13.20 195.208.94.133 115 122276
+194.87.13.20 195.182.129.11 15 17177
+194.87.13.20 195.170.195.70 14 14313
+204.62.245.167 193.124.97.135 9 472
+194.87.13.20 195.144.198.159 90 40576
+194.87.13.20 195.144.192.198 79 91293
+193.125.95.124 195.222.130.67 9 745
+194.87.13.20 195.128.144.246 14 12816
+194.87.13.20 195.128.140.71 17 15901
+194.87.13.20 195.128.140.3 44 47802
+194.87.13.20 195.128.132.20 25 27119
+194.87.13.20 195.128.128.98 28 15369
+194.87.13.20 195.98.162.188 2 3000
+193.125.98.254 194.190.170.19 26 1456
+193.125.98.254 195.72.225.204 73 4088
+204.62.245.166 195.9.80.194 2 88
+204.62.245.161 193.124.182.40 2 138
+204.62.132.32 193.124.97.131 3 618
+193.125.103.137 195.46.163.141 7 372
+194.87.13.20 195.98.162.170 4 628
+193.125.121.1 193.124.22.22 2 136
+193.125.121.121 194.85.157.200 790 31921
+193.125.125.253 193.124.22.65 80 5411
+193.125.127.42 193.124.22.65 18 1368
+193.125.127.42 194.190.170.19 1227 63804
+194.87.13.20 195.98.162.155 73 70166
+194.87.13.20 195.98.162.9 323 163018
+194.87.13.20 195.98.161.32 10 9756
+194.87.13.20 195.98.161.25 4 1208
+194.87.13.20 195.90.180.25 3 568
+194.87.13.20 195.90.162.2 4 738
+194.87.13.20 195.54.8.139 42 53309
+194.87.13.20 195.54.5.129 27 13705
+194.87.13.20 195.46.164.25 11 12641
+194.87.13.20 195.46.164.16 62 74088
+194.87.13.20 195.46.163.158 35 37649
+194.87.13.20 195.46.163.89 52 57716
+194.87.13.20 195.46.163.15 11 12641
+193.125.132.129 193.124.215.71 26 4734
+193.125.132.129 193.124.222.161 5 220
+194.87.13.20 195.46.162.196 13 12813
+194.87.13.20 195.46.162.173 30 36193
+194.87.13.20 195.46.161.242 69 82486
+194.87.13.20 195.46.161.210 15 13392
+194.87.13.20 195.46.161.209 43 39183
+193.125.132.129 194.190.211.25 2 80
+194.87.13.20 195.46.161.111 85 93111
+194.87.13.20 195.46.161.100 41 8909
+194.87.13.20 195.16.102.4 5 3716
+194.87.13.20 195.16.101.109 17 20273
+194.87.13.20 195.16.101.101 93 112303
+194.87.13.20 195.16.98.99 152 171268
+194.87.13.20 195.9.103.3 11 12641
+194.87.13.20 194.220.53.195 303 100520
+194.87.13.20 194.190.56.83 8 1096
+194.87.13.20 194.85.149.18 43 48875
+194.87.13.20 194.85.137.152 30 34921
+194.87.13.20 194.58.169.23 5 590
+194.87.13.20 194.58.92.67 10 1044
+194.87.13.20 194.58.72.102 34 31635
+194.87.13.20 194.58.47.81 4 172
+194.87.13.20 193.124.241.239 53 51597
+193.125.142.40 195.54.3.15 7 500
+193.125.142.40 195.90.183.40 1 40
+193.125.143.130 195.90.128.103 13 11141
+193.125.143.135 195.46.160.46 45 2957
+204.62.129.195 195.19.1.132 10 4438
+193.125.148.150 193.124.22.65 12 912
+194.87.13.20 193.124.121.65 4 2216
+194.87.13.20 193.124.114.33 8 1084
+194.87.13.16 195.98.162.134 259 254892
+194.87.13.16 195.46.165.162 292 145058
+194.87.13.16 195.46.162.200 51 42010
+194.87.13.16 195.46.160.69 97 45411
+194.87.13.16 193.124.97.35 74 81434
+194.87.13.15 212.20.1.95 11 10485
+194.87.13.15 195.210.136.135 16 15786
+194.87.13.15 195.210.131.39 6 3168
+193.125.152.1 147.45.130.1 2 326
+194.87.13.15 195.98.162.153 136 143332
+194.87.13.15 195.98.162.9 308 168069
+194.87.13.15 195.46.165.185 1183 633028
+194.87.13.15 195.46.165.166 2 104
+194.87.13.15 195.46.164.44 70 53112
+194.87.13.15 195.46.163.156 159 113967
+194.87.13.15 195.46.162.241 64 20483
+194.87.13.15 195.46.162.30 120 95284
+194.87.13.15 195.16.101.67 115 82325
+194.87.13.15 195.9.90.85 7 600
+194.87.13.15 194.135.176.88 92 7543
+193.125.152.1 193.124.5.54 382 18328
+193.125.152.1 193.124.22.22 271 246786
+193.125.152.1 193.124.22.65 58 3504
+193.125.152.1 193.124.22.68 12 1443
+193.125.152.1 193.124.22.69 535 50134
+193.125.152.1 193.124.22.70 10 1187
+193.125.152.1 193.124.22.71 430 57506
+193.125.152.1 193.124.22.72 57 7236
+193.125.152.1 193.124.22.73 12 1443
+193.125.152.1 193.124.22.74 9 1059
+193.125.152.1 193.124.22.75 237 33658
+193.125.152.1 193.124.22.77 266 37279
+193.125.152.1 193.124.22.81 2265 522913
+193.125.152.1 193.124.22.83 739 88013
+193.125.152.1 193.124.36.45 1639 813217
+193.125.152.1 193.124.57.65 219 74665
+194.87.13.15 194.135.2.7 75 27476
+194.87.13.15 193.124.252.73 254 110171
+193.125.152.1 193.124.182.41 4 160
+193.125.152.1 193.124.241.3 15 2284
+193.125.152.1 193.124.241.14 1 244
+193.125.152.1 193.124.241.18 3 636
+193.125.152.1 193.124.241.29 19 3767
+193.125.152.1 193.124.241.40 13 3140
+193.125.152.1 193.124.241.53 32 7802
+193.125.152.1 193.124.241.58 2 420
+193.125.152.1 193.124.241.75 1 244
+193.125.152.1 193.124.241.84 4 670
+193.125.152.1 193.124.241.123 16 3574
+193.125.152.1 193.124.241.154 2 524
+193.125.152.1 193.124.241.158 44 10519
+193.125.152.1 193.124.241.229 1 200
+193.125.152.1 193.124.241.239 22 4490
+193.125.152.1 193.124.241.249 6 1748
+193.125.152.1 193.125.65.235 321 13793
+193.125.152.1 193.125.80.35 2 476
+194.87.13.15 193.124.241.39 512 271010
+194.87.13.15 193.124.32.49 1119 1170153
+194.87.13.14 195.210.136.135 188 193578
+193.125.152.1 193.232.0.205 24 1555
+193.125.152.1 193.232.21.26 17 1138
+193.125.152.1 193.232.21.31 24 2206
+193.125.152.1 193.232.69.159 8 1176
+193.125.152.1 193.232.88.17 19 1387
+193.125.152.1 193.232.119.131 783 31804
+193.125.152.1 193.232.202.12 2 818
+193.125.152.1 193.233.86.14 11 660
+193.125.152.1 193.233.86.33 11 660
+193.125.152.1 193.233.208.3 3 738
+194.87.13.12 212.248.36.8 5 1763
+194.87.13.12 212.20.8.250 49 37420
+194.87.13.12 195.210.182.31 50 3544
+194.87.13.12 195.210.179.4 37 33062
+193.125.152.1 194.58.169.17 357 155601
+193.125.152.1 194.58.201.193 6 774
+193.125.152.1 194.58.230.92 8 1576
+193.125.152.1 194.58.230.110 1 60
+193.125.152.1 194.67.2.97 10 2760
+193.125.152.1 194.67.90.1 8 448
+194.87.13.12 195.210.154.48 37 13937
+194.87.13.12 195.210.130.50 20 2117
+193.125.152.1 194.84.23.125 16 1168
+193.125.152.1 194.84.41.68 298 127287
+193.125.152.1 194.84.42.17 16 1325
+193.125.152.1 194.84.96.2 44 10261
+193.125.152.1 194.84.204.222 1 112
+193.125.152.1 194.84.242.126 10 2178
+193.125.152.1 194.85.80.238 18 1178
+193.125.152.1 194.85.128.10 25 1375
+193.125.152.1 194.85.137.89 8 440
+194.87.13.12 195.208.94.133 33 20968
+193.125.152.1 194.85.224.33 28 1708
+193.125.152.1 194.85.224.34 26 1586
+193.125.152.1 194.87.0.20 12 873
+193.125.152.1 194.87.5.3 8 448
+193.125.152.1 194.87.5.21 2 518
+193.125.152.1 194.87.13.2 4 224
+193.125.152.1 194.87.44.1 1 146
+193.125.152.1 194.87.210.41 2 402
+194.87.13.12 195.182.129.11 23 15865
+194.87.13.12 195.170.195.70 63 44135
+194.87.13.12 195.144.192.198 31 6314
+193.125.152.1 194.117.64.34 20 1271
+193.125.152.1 194.135.34.19 13 2470
+193.125.152.1 194.135.34.85 12 2254
+193.125.152.1 194.135.34.136 6 866
+193.125.152.1 194.135.34.150 2 488
+193.125.152.1 194.135.34.159 1 467
+193.125.152.1 194.135.34.212 11 2560
+193.125.152.1 194.135.34.229 2 337
+193.125.152.1 194.135.34.233 4 680
+193.125.152.1 194.135.102.10 2 414
+193.125.152.1 194.135.178.74 7 1162
+193.125.152.1 194.154.93.80 2 284
+194.87.13.12 195.128.140.3 14 872
+193.125.152.1 194.190.218.2 2 518
+194.87.13.12 195.128.130.2 4 352
+194.87.13.12 195.98.162.155 75 60095
+194.87.13.12 195.98.162.78 98 64468
+193.125.152.1 194.220.36.1 37 2850
+193.125.152.1 194.220.146.79 2 522
+194.87.13.12 195.98.162.9 62 13543
+194.87.13.12 195.98.161.59 7 476
+194.87.13.12 195.98.161.32 12 865
+204.62.128.51 195.19.1.132 43 38029
+204.62.128.48 193.124.97.153 9 3356
+204.59.144.222 194.85.149.1 2 266
+193.125.152.1 195.5.128.130 2 512
+194.87.13.12 195.98.161.25 8 3438
+193.125.152.1 195.16.104.35 5 280
+193.125.152.1 195.34.19.108 2 312
+193.125.152.1 195.34.32.11 2 476
+193.125.152.1 195.34.41.33 9 504
+194.87.13.12 195.90.136.148 32 3564
+194.87.13.12 195.90.136.143 10 890
+193.125.152.1 195.46.160.2 8 448
+193.125.152.1 195.46.160.34 2 630
+193.125.152.1 195.54.193.9 18 1405
+193.125.152.1 195.91.133.77 4 1212
+193.125.152.1 195.98.55.1 18 1405
+193.125.152.1 195.133.94.129 23 1485
+193.125.152.1 195.138.67.91 8 544
+193.125.152.1 195.138.80.33 19 1245
+193.125.152.1 195.138.80.34 20 1308
+193.125.152.1 195.146.64.131 4 472
+193.125.152.1 195.161.8.6 19 1445
+193.125.152.1 195.161.8.159 42 3569
+194.87.13.12 195.54.8.139 74 6178
+193.125.152.1 195.208.141.38 2 512
+193.125.152.1 195.209.37.18 2 670
+193.125.152.1 195.209.39.133 8 1698
+194.87.13.12 195.46.165.250 2 80
+193.125.152.1 195.218.133.114 24 1905
+194.87.13.12 195.46.165.196 9 3478
+193.125.152.1 195.230.64.66 101 4508
+193.125.152.1 195.239.88.50 37 1480
+193.125.152.1 195.239.193.64 2 476
+193.125.152.1 195.239.210.2 2 500
+194.87.13.12 195.46.164.25 69 4776
+194.87.13.12 195.46.164.17 28 16790
+194.87.13.12 195.46.163.158 30 6337
+194.87.13.12 195.46.163.89 56 28328
+194.87.13.12 195.46.163.15 8 336
+194.87.13.12 195.46.162.213 4 160
+194.87.13.12 195.46.162.206 41 25676
+194.87.13.12 195.46.162.196 54 38487
+194.87.13.12 195.46.162.173 63 40346
+194.87.13.12 195.46.162.55 7 657
+194.87.13.12 195.46.162.31 5 200
+194.87.13.12 195.46.161.242 67 20130
+194.87.13.12 195.46.161.219 5 1831
+194.87.13.12 195.46.161.210 12 13389
+194.87.13.12 195.46.161.209 64 26136
+194.87.13.12 195.46.161.111 47 3947
+194.87.13.12 195.16.101.109 31 2924
+194.87.13.12 195.16.101.101 42 3051
+194.87.13.12 195.16.98.99 13 903
+194.87.13.12 195.9.103.3 74 5122
+194.87.13.12 194.220.215.111 75 5304
+194.87.13.12 194.220.215.110 22 2367
+194.87.13.12 194.220.215.66 6 539
+194.87.13.12 194.190.82.40 14 1558
+194.87.13.12 193.125.19.101 23 2074
+194.87.13.12 193.124.241.239 10 4274
+194.87.13.12 193.124.114.33 42 13726
+193.125.152.1 62.76.114.44 9 2780
+194.87.13.8 212.20.8.250 110 87859
+194.87.13.8 195.222.130.242 4 527
+194.87.13.8 195.210.182.31 9 1222
+194.87.13.8 195.210.179.4 14 15689
+194.87.13.8 195.210.154.48 13 1602
+194.87.13.8 195.210.136.135 163 171207
+194.87.13.8 195.210.130.50 8 6213
+194.87.13.8 195.210.128.65 6 408
+194.87.13.8 195.208.94.133 63 43061
+194.87.13.8 195.208.76.33 5 355
+194.87.13.8 195.208.67.19 400 446069
+194.87.13.8 195.208.64.146 50 39549
+194.87.13.8 195.208.64.144 12 12685
+194.87.13.8 195.182.129.11 16 18647
+194.87.13.8 195.170.195.70 14 2119
+194.87.13.8 195.146.70.100 49 27151
+194.87.13.8 195.144.198.159 12 1336
+194.87.13.8 195.144.192.198 16 2213
+194.87.13.8 195.128.140.71 15 6105
+194.87.13.8 195.128.140.3 8 821
+194.87.13.8 195.98.162.170 5 699
+194.87.13.8 195.98.162.155 43 43382
+194.87.13.8 195.98.162.153 12 8634
+194.87.13.8 195.98.162.78 57 25228
+194.87.13.8 195.98.162.9 94 33009
+194.87.13.8 195.98.161.57 4 6000
+194.87.13.8 195.98.161.41 52 57725
+194.87.13.8 195.98.161.32 6 433
+194.87.13.8 195.96.174.178 17 20989
+194.87.13.8 195.96.163.66 13 8510
+194.87.13.8 195.90.188.105 169 68987
+194.87.13.8 195.90.188.98 13 13679
+194.87.13.8 195.90.185.38 100 23568
+194.87.13.8 195.90.162.2 26 9575
+194.87.13.8 195.90.136.148 25 3160
+194.87.13.8 195.90.136.143 4 2024
+194.87.13.8 195.90.132.57 4 1398
+194.87.13.8 195.54.8.139 33 10681
+194.87.13.8 195.54.5.129 4 735
+194.87.13.8 195.46.165.250 5 697
+194.87.13.8 195.46.165.215 23 10108
+194.87.13.8 195.46.164.25 25 2325
+194.87.13.8 195.46.164.17 16 11423
+194.87.13.8 195.46.164.16 9 6253
+194.87.13.8 195.46.163.171 50 24920
+194.87.13.8 195.46.163.158 19 6681
+194.87.13.8 195.46.163.156 18 19033
+194.87.13.8 195.46.163.123 11 10683
+194.87.13.8 195.46.163.89 69 36648
+194.87.13.8 195.46.163.15 4 353
+194.87.13.8 195.46.163.7 173 112297
+194.87.13.8 195.46.162.206 12 2050
+194.87.13.8 195.46.162.196 30 35369
+194.87.13.8 195.46.162.184 80 104089
+194.87.13.8 195.46.162.173 18 16346
+194.87.13.8 195.46.162.91 306 246711
+194.87.13.8 195.46.162.55 5 393
+194.87.13.8 195.46.162.31 9 557
+194.87.13.8 195.46.162.13 10 1014
+194.87.13.8 195.46.161.242 44 35502
+194.87.13.8 195.46.161.210 15 18274
+194.87.13.8 195.46.161.209 24 15531
+194.87.13.8 195.46.161.186 31 27219
+194.87.13.8 195.46.161.170 9 1482
+194.87.13.8 195.46.161.133 21 24725
+194.87.13.8 195.46.161.123 11 10683
+194.87.13.8 195.46.161.111 26 2791
+194.87.13.8 195.46.161.83 25 10320
+194.87.13.8 195.46.161.71 124 123406
+194.87.13.8 195.46.160.69 11 10785
+194.87.13.8 195.16.101.109 5 393
+193.125.152.3 158.250.39.28 2 126
+193.125.152.3 158.250.100.24 2 734
+193.125.152.3 159.93.17.7 4 234
+194.87.13.8 195.16.101.101 57 53033
+194.87.13.8 195.16.98.99 100 68835
+194.87.13.8 195.16.98.37 24 4428
+194.87.13.8 195.12.35.2 18 17726
+194.87.13.8 195.9.103.3 76 32081
+194.87.13.8 195.9.96.7 22 14498
+194.87.13.8 194.220.215.111 16 2352
+194.87.13.8 194.220.215.110 13 1554
+194.87.13.8 194.220.215.66 5 759
+194.87.13.8 194.220.53.195 7 797
+194.87.13.8 194.135.178.214 70 27886
+194.87.13.8 194.135.111.18 260 289019
+194.87.13.8 194.85.149.18 6 475
+194.87.13.8 194.58.72.102 5 703
+194.87.13.8 193.124.241.239 13 6926
+194.87.13.8 193.124.241.39 31 18403
+194.87.13.8 193.124.121.118 17 1675
+194.87.13.8 193.124.114.33 43 19148
+194.87.13.6 195.98.162.153 2 120
+194.87.13.2 212.20.8.250 16 3749
+194.87.13.2 212.20.8.246 5 1259
+194.87.13.2 212.20.1.95 33 7367
+194.87.13.2 195.238.68.234 9 2454
+194.87.13.2 195.222.138.108 7 1203
+194.87.13.2 195.222.130.242 21 5860
+194.87.13.2 195.210.190.19 19 4260
+194.87.13.2 195.210.189.1 5 1119
+194.87.13.2 195.210.182.31 35 26895
+194.87.13.2 195.210.176.170 4 1079
+194.87.13.2 195.210.174.6 5 1119
+194.87.13.2 195.210.164.25 5 1119
+194.87.13.2 195.210.154.164 9 2484
+194.87.13.2 195.210.154.152 8 1376
+193.125.152.3 192.188.189.3 2 136
+194.87.13.2 195.210.154.48 43 28721
+194.87.13.2 195.210.150.2 31 6855
+194.87.13.2 195.210.148.242 17 2910
+194.87.13.2 195.210.143.145 7 2110
+194.87.13.2 195.210.136.145 20 3862
+194.87.13.2 195.210.136.135 9 1423
+194.87.13.2 195.210.136.131 7 1353
+194.87.13.2 195.210.130.50 16 14690
+194.87.13.2 195.208.94.133 33 9913
+194.87.13.2 195.208.93.154 9 1411
+194.87.13.2 195.208.72.139 4 1079
+194.87.13.2 195.208.72.47 8 2154
+194.87.13.2 195.208.67.19 4 1079
+194.87.13.2 195.208.67.10 8 1376
+194.87.13.2 195.208.64.152 4 1079
+194.87.13.2 195.208.64.144 6 2066
+193.125.152.3 193.124.5.37 11 1336
+193.125.152.3 193.124.5.50 2 266
+193.125.152.3 193.124.5.54 4 692
+193.125.152.3 193.124.22.22 11 2138
+193.125.152.3 193.124.22.65 141 15806
+193.125.152.3 193.124.32.129 5 1116
+193.125.152.3 193.124.57.100 3 197
+193.125.152.3 193.124.76.86 1 278
+194.87.13.2 195.208.64.129 6 1167
+193.125.152.3 193.124.110.130 2 766
+193.125.152.3 193.124.134.19 4 548
+194.87.13.2 195.182.129.8 9 3525
+193.125.152.3 193.124.148.73 9 1408
+193.125.152.3 193.124.171.67 2 354
+193.125.152.3 193.124.182.40 2 144
+193.125.152.3 193.124.241.39 2 356
+193.125.152.3 193.124.241.83 4 866
+194.87.13.2 195.182.128.2 39 9020
+193.125.152.3 193.124.250.22 79 12968
+193.125.152.3 193.125.80.35 2 300
+194.87.13.2 195.170.195.70 55 42078
+194.87.13.2 195.146.71.226 5 1119
+194.87.13.2 195.146.71.178 53 11410
+194.87.13.2 195.146.70.100 6 2070
+194.87.13.2 195.146.70.97 7 1199
+194.87.13.2 195.144.198.159 44 14597
+194.87.13.2 195.144.192.198 17 4040
+194.87.13.2 195.128.144.142 7 2110
+194.87.13.2 195.128.144.133 6 2342
+194.87.13.2 195.128.140.71 19 16072
+194.87.13.2 195.128.140.3 22 5159
+194.87.13.2 195.128.139.110 13 2642
+194.87.13.2 195.128.139.94 18 6772
+193.125.152.3 193.193.193.100 2 132
+193.125.152.3 193.193.193.107 4 1148
+193.125.152.3 193.193.226.226 3 489
+194.87.13.2 195.128.138.136 6 1309
+194.87.13.2 195.128.136.186 20 4622
+193.125.152.3 193.232.8.20 5 323
+193.125.152.3 193.232.68.1 2 120
+193.125.152.3 193.232.88.17 44 4923
+193.125.152.3 193.232.88.125 2 388
+193.125.152.3 193.232.112.1 2 134
+193.125.152.3 193.232.127.78 20 4237
+193.125.152.3 193.232.212.12 9 1177
+193.125.152.3 193.232.232.66 4 1210
+193.125.152.3 193.233.48.9 7 447
+193.125.152.3 193.233.48.65 2 130
+193.125.152.3 193.233.56.200 2 294
+193.125.152.3 193.233.78.1 2 276
+193.125.152.3 193.233.86.14 4 240
+193.125.152.3 193.233.86.33 4 240
+193.125.152.3 193.233.192.19 2 118
+193.125.152.3 193.233.208.3 4 238
+193.125.152.3 193.233.224.1 4 800
+194.87.13.2 195.128.136.71 6 1159
+194.87.13.2 195.128.134.99 5 1264
+194.87.13.2 195.128.132.70 23 6787
+194.87.13.2 195.128.129.155 4 1079
+194.87.13.2 195.128.128.98 30 17304
+193.125.152.3 194.44.157.250 2 134
+194.87.13.2 195.128.128.70 5 2372
+194.87.13.2 195.128.128.66 8 2422
+193.125.152.3 194.58.101.95 12 2368
+193.125.152.3 194.58.124.24 2 320
+194.87.13.2 195.128.128.3 5 1187
+193.125.152.3 194.58.230.249 7 1050
+194.87.13.2 195.112.226.35 23 956
+193.125.152.3 194.67.1.154 9 1436
+193.125.152.3 194.67.2.97 11 1861
+193.125.152.3 194.67.2.98 12 973
+193.125.152.3 194.67.66.176 2 122
+193.125.152.3 194.67.82.228 2 552
+193.125.152.3 194.67.110.2 4 688
+193.125.152.3 194.67.114.81 3 198
+193.125.152.3 194.67.114.193 5 330
+193.125.152.3 194.67.115.35 5 330
+193.125.152.3 194.67.115.38 2 412
+193.125.152.3 194.67.128.130 2 330
+194.87.13.2 195.98.162.189 11 2282
+194.87.13.2 195.98.162.182 10 3433
+194.87.13.2 195.98.162.170 56 55418
+194.87.13.2 195.98.162.165 12 2318
+193.125.152.3 194.84.2.73 2 298
+193.125.152.3 194.84.17.34 17 2183
+193.125.152.3 194.84.21.18 6 1320
+193.125.152.3 194.84.23.125 21 1523
+193.125.152.3 194.84.31.233 11 5316
+193.125.152.3 194.84.32.67 2 138
+193.125.152.3 194.84.39.28 7 981
+193.125.152.3 194.84.48.11 2 130
+193.125.152.3 194.84.54.130 2 358
+193.125.152.3 194.84.86.6 1 58
+193.125.152.3 194.84.96.57 6 387
+193.125.152.3 194.84.122.1 20 1460
+193.125.152.3 194.84.132.2 8 2208
+193.125.152.3 194.84.167.1 2 146
+193.125.152.3 194.84.168.49 4 670
+193.125.152.3 194.84.204.131 2 146
+193.125.152.3 194.84.204.222 2 476
+193.125.152.3 194.84.206.3 5 305
+193.125.152.3 194.84.206.193 18 1098
+193.125.152.3 194.84.223.2 2 148
+193.125.152.3 194.84.243.71 2 300
+194.87.13.2 195.98.162.164 9 1287
+194.87.13.2 195.98.162.160 29 8361
+194.87.13.2 195.98.162.155 8 2174
+194.87.13.2 195.98.162.151 15 3499
+194.87.13.2 195.98.162.147 6 1300
+193.125.152.3 194.85.128.10 28 1552
+193.125.152.3 194.85.137.89 76 4180
+194.87.13.2 195.98.162.141 22 5639
+194.87.13.2 195.98.162.135 35 10480
+194.87.13.2 195.98.162.131 31 25682
+194.87.13.2 195.98.162.118 5 1262
+194.87.13.2 195.98.162.114 6 1159
+193.125.152.3 194.85.200.204 6 816
+193.125.152.3 194.85.224.33 68 4150
+193.125.152.3 194.85.224.34 64 3904
+193.125.152.3 194.87.0.8 4 294
+193.125.152.3 194.87.0.22 50 8498
+193.125.152.3 194.87.0.242 24 4272
+193.125.152.3 194.87.37.2 2 308
+193.125.152.3 194.87.43.111 2 114
+193.125.152.3 194.87.110.35 2 114
+193.125.152.3 194.87.157.34 2 318
+193.125.152.3 194.87.161.7 2 430
+193.125.152.3 194.87.162.120 2 308
+193.125.152.3 194.87.186.1 4 692
+193.125.152.3 194.87.210.41 2 112
+193.125.152.3 194.87.224.99 5 875
+193.125.152.3 194.87.233.66 2 238
+193.125.152.3 194.87.239.39 2 358
+194.87.13.2 195.98.162.111 5 1119
+194.87.13.2 195.98.162.102 7 1341
+194.87.13.2 195.98.162.97 5 2030
+194.87.13.2 195.98.162.94 13 2362
+194.87.13.2 195.98.162.78 134 104964
+194.87.13.2 195.98.162.77 6 1163
+194.87.13.2 195.98.162.73 15 5512
+194.87.13.2 195.98.162.72 26 5763
+194.87.13.2 195.98.162.66 4 1225
+194.87.13.2 195.98.162.9 231 74902
+194.87.13.2 195.98.161.71 13 3581
+193.125.152.3 194.135.2.131 16 3134
+193.125.152.3 194.135.34.42 3 733
+193.125.152.3 194.135.34.85 11 2042
+193.125.152.3 194.135.34.136 6 866
+194.87.13.2 195.98.161.67 10 2513
+193.125.152.3 194.135.102.10 8 1490
+193.125.152.3 194.135.161.11 13 1287
+193.125.152.3 194.154.82.67 2 304
+193.125.152.3 194.154.82.122 2 102
+194.87.13.2 195.98.161.59 20 4472
+193.125.152.3 194.186.38.34 2 298
+193.125.152.3 194.186.113.254 5 644
+193.125.152.3 194.186.170.253 2 476
+193.125.152.3 194.186.208.51 4 550
+193.125.152.3 194.186.212.137 2 336
+193.125.152.3 194.186.254.23 2 360
+194.87.13.2 195.98.161.57 28 6345
+193.125.152.3 194.190.105.2 2 232
+193.125.152.3 194.190.163.127 6 702
+193.125.152.3 194.190.195.66 4 268
+193.125.152.3 194.190.199.1 2 430
+193.125.152.3 194.190.215.113 10 1471
+193.125.152.3 194.190.216.124 2 448
+193.125.152.3 194.190.218.2 4 598
+194.87.13.2 195.98.161.46 8 1387
+194.87.13.2 195.98.161.40 11 3193
+194.87.13.2 195.98.161.33 13 3387
+194.87.13.2 195.98.160.174 5 1119
+194.87.13.2 195.98.160.148 11 1907
+194.87.13.2 195.98.160.146 8 428
+194.87.13.2 195.96.163.66 37 22436
+194.87.13.2 195.90.188.112 8 2150
+194.87.13.2 195.90.188.111 5 1237
+193.125.152.3 194.220.146.79 2 322
+194.87.13.2 195.90.188.105 27 7280
+193.125.152.3 194.226.167.195 14 1947
+194.87.13.2 195.90.188.101 1 1089
+194.87.13.2 195.90.186.228 7 1332
+194.87.13.2 195.90.185.38 20 3294
+194.87.13.2 195.90.183.122 12 3627
+194.87.13.2 195.90.180.25 22 18568
+204.58.155.18 144.206.2.1 3 173
+204.57.67.249 194.58.72.120 4 160
+204.57.67.150 195.146.67.100 5 200
+204.57.67.150 194.58.72.120 4 160
+204.57.67.146 195.146.67.100 5 200
+204.57.67.146 194.58.72.120 4 160
+194.87.13.2 195.90.180.12 4 1300
+194.87.13.2 195.90.162.2 53 15773
+193.125.152.3 195.5.128.130 4 814
+193.125.152.3 195.5.141.6 11 1500
+193.125.152.3 195.5.151.21 5 615
+194.87.13.2 195.90.158.23 3 1035
+194.87.13.2 195.90.152.133 3 124
+193.125.152.3 195.7.179.36 4 744
+194.87.13.2 195.90.146.80 4 1075
+194.87.13.2 195.90.145.35 6 2070
+193.125.152.3 195.9.90.65 66 14486
+193.125.152.3 195.9.90.70 3 615
+193.125.152.3 195.9.94.33 2 140
+193.125.152.3 195.12.66.1 4 250
+193.125.152.3 195.16.96.2 3 482
+193.125.152.3 195.16.101.2 2 126
+193.125.152.3 195.16.114.47 3 192
+194.87.13.2 195.90.145.1 3 1180
+193.125.152.3 195.19.160.1 6 1066
+193.125.152.3 195.19.188.66 4 248
+194.87.13.2 195.90.142.27 7 2280
+194.87.13.2 195.90.137.230 4 1075
+194.87.13.2 195.90.136.148 4 1276
+194.87.13.2 195.90.136.143 4 1260
+194.87.13.2 195.90.136.135 6 2066
+193.125.152.3 195.26.160.48 3 434
+193.125.152.3 195.34.0.1 4 618
+193.125.152.3 195.34.17.13 4 843
+193.125.152.3 195.34.32.11 2 352
+193.125.152.3 195.34.41.33 3 495
+193.125.152.3 195.46.160.4 7 1412
+193.125.152.3 195.46.163.120 42 9840
+193.125.152.3 195.54.2.1 9 1433
+193.125.152.3 195.54.192.33 20 2704
+193.125.152.3 195.54.193.30 2 230
+194.87.13.2 195.90.136.82 10 2230
+194.87.13.2 195.90.134.250 7 2387
+193.125.152.3 195.90.128.103 2 455
+193.125.152.3 195.90.128.107 3 197
+193.125.152.3 195.90.136.1 2 286
+193.125.152.3 195.90.158.139 6 318
+193.125.152.3 195.90.184.66 15 2690
+193.125.152.3 195.91.133.54 28 5845
+193.125.152.3 195.96.65.2 23 5249
+193.125.152.3 195.98.64.65 2 494
+193.125.152.3 195.98.162.10 2 520
+193.125.152.3 195.98.163.16 2 144
+194.87.13.2 195.90.132.67 7 1199
+194.87.13.2 195.90.132.57 9 2318
+193.125.152.3 195.128.128.1 18 1801
+193.125.152.3 195.133.0.8 6 420
+193.125.152.3 195.133.103.1 2 274
+194.87.13.2 195.90.132.10 7 2256
+193.125.152.3 195.146.64.42 5 736
+193.125.152.3 195.146.72.34 4 232
+194.87.13.2 195.90.132.3 9 2190
+194.87.13.2 195.90.128.103 27 7388
+193.125.152.3 195.151.16.12 2 288
+193.125.152.3 195.151.16.13 2 436
+193.125.152.3 195.151.35.66 9 1339
+193.125.152.3 195.151.108.130 2 280
+193.125.152.3 195.151.163.75 3 552
+193.125.152.3 195.161.0.135 6 543
+193.125.152.3 195.161.20.33 3 552
+193.125.152.3 195.161.21.2 3 186
+193.125.152.3 195.161.21.130 5 291
+193.125.152.3 195.178.199.130 2 104
+193.125.152.3 195.208.49.11 2 282
+193.125.152.3 195.208.72.3 3 363
+193.125.152.3 195.208.93.132 3 416
+194.87.13.2 195.72.224.74 16 3667
+194.87.13.2 195.54.8.139 28 17598
+193.125.152.3 195.208.248.36 2 512
+193.125.152.3 195.208.252.2 2 346
+193.125.152.3 195.208.252.180 2 118
+193.125.152.3 195.209.0.6 4 236
+193.125.152.3 195.209.63.161 2 446
+193.125.152.3 195.210.128.6 2 264
+194.87.13.2 195.54.6.67 5 1266
+194.87.13.2 195.54.5.129 60 27325
+193.125.152.3 195.218.218.37 4 264
+193.125.152.3 195.222.130.67 3 186
+193.125.152.3 195.239.46.189 2 706
+193.125.152.3 195.239.193.64 2 374
+193.125.152.3 195.239.210.2 1 51
+194.87.13.2 195.54.2.8 6 1438
+194.87.13.2 195.46.165.248 16 6178
+194.87.13.2 195.46.165.239 10 4284
+194.87.13.2 195.46.165.227 8 2254
+194.87.13.2 195.46.165.226 11 6825
+194.87.13.2 195.46.165.204 6 2070
+194.87.13.2 195.46.165.200 70 42657
+194.87.13.2 195.46.165.196 10 4963
+194.87.13.2 195.46.165.194 7 2110
+194.87.13.2 195.46.165.193 10 5874
+194.87.13.2 195.46.165.191 7 2400
+194.87.13.2 195.46.165.172 14 11492
+194.87.13.2 195.46.165.162 19 11262
+194.87.13.2 195.46.165.158 7 2382
+194.87.13.2 195.46.165.151 8 2254
+194.87.13.2 195.46.165.145 161 74887
+194.87.13.2 195.46.165.135 26 11996
+194.87.13.2 195.46.165.133 14 5629
+194.87.13.2 195.46.164.27 11 2278
+194.87.13.2 195.46.164.25 64 67188
+194.87.13.2 195.46.164.17 35 26017
+194.87.13.2 195.46.164.16 6 1300
+194.87.13.2 195.46.164.8 14 5798
+194.87.13.2 195.46.164.6 5 1254
+194.87.13.2 195.46.164.2 4 1079
+194.87.13.2 195.46.163.180 5 1187
+194.87.13.2 195.46.163.178 25 2053
+194.87.13.2 195.46.163.174 5 1119
+194.87.13.2 195.46.163.160 8 1365
+194.87.13.2 195.46.163.159 5 1119
+194.87.13.2 195.46.163.158 28 17225
+194.87.13.2 195.46.163.156 16 3397
+194.87.13.2 195.46.163.147 6 1163
+194.87.13.2 195.46.163.136 5 1119
+194.87.13.2 195.46.163.133 10 2370
+194.87.13.2 195.46.163.132 6 1284
+194.87.13.2 195.46.163.123 15 3503
+194.87.13.2 195.46.163.120 14 3613
+194.87.13.2 195.46.163.105 6 1294
+194.87.13.2 195.46.163.94 5 1119
+194.87.13.2 195.46.163.89 132 107364
+194.87.13.2 195.46.163.76 13 2646
+194.87.13.2 195.46.163.65 20 4627
+194.87.13.2 195.46.163.60 8 1239
+194.87.13.2 195.46.163.47 7 2110
+194.87.13.2 195.46.163.38 17 3593
+194.87.13.2 195.46.163.31 9 2378
+194.87.13.2 195.46.163.30 14 2506
+194.87.13.2 195.46.163.13 18 3681
+194.87.13.2 195.46.163.7 21 3885
+194.87.13.2 195.46.162.243 19 4865
+194.87.13.2 195.46.162.226 8 2440
+194.87.13.2 195.46.162.221 21 2981
+194.87.13.2 195.46.162.218 5 1265
+194.87.13.2 195.46.162.213 5 1257
+194.87.13.2 195.46.162.206 59 43287
+194.87.13.2 195.46.162.203 5 1119
+194.87.13.2 195.46.162.196 18 14883
+194.87.13.2 195.46.162.193 5 1119
+194.87.13.2 195.46.162.184 13 1455
+194.87.13.2 195.46.162.180 5 1119
+194.87.13.2 195.46.162.179 9 3109
+194.87.13.2 195.46.162.177 4 1079
+194.87.13.2 195.46.162.173 8 2499
+194.87.13.2 195.46.162.172 6 1159
+194.87.13.2 195.46.162.169 8 2420
+194.87.13.2 195.46.162.165 4 1079
+194.87.13.2 195.46.162.120 5 1119
+194.87.13.2 195.46.162.119 5 1262
+194.87.13.2 195.46.162.104 4 1079
+194.87.13.2 195.46.162.100 6 1290
+194.87.13.2 195.46.162.72 5 1119
+194.87.13.2 195.46.162.70 10 2373
+194.87.13.2 195.46.162.60 14 3601
+194.87.13.2 195.46.162.55 27 28360
+194.87.13.2 195.46.162.53 7 1203
+194.87.13.2 195.46.162.47 21 3887
+194.87.13.2 195.46.162.42 12 2624
+194.87.13.2 195.46.162.40 11 2420
+194.87.13.2 195.46.162.34 11 2411
+194.87.13.2 195.46.162.30 7 1207
+194.87.13.2 195.46.162.28 18 3603
+194.87.13.2 195.46.162.13 42 51477
+194.87.13.2 195.46.162.8 5 1119
+194.87.13.2 195.46.162.6 9 2452
+194.87.13.2 195.46.162.1 14 2562
+194.87.13.2 195.46.161.252 5 1119
+194.87.13.2 195.46.161.251 21 4943
+194.87.13.2 195.46.161.236 5 1260
+193.125.152.3 212.192.34.200 2 298
+193.125.152.3 212.248.39.3 3 174
+194.87.13.2 195.46.161.233 5 1262
+194.87.13.2 195.46.161.224 11 1508
+194.87.13.2 195.46.161.217 22 5891
+194.87.13.2 195.46.161.209 11 2619
+194.87.13.2 195.46.161.207 20 2351
+193.125.152.3 62.76.0.1 12 888
+193.125.152.3 62.76.114.44 4 861
+194.87.13.2 195.46.161.205 5 1119
+194.87.13.2 195.46.161.201 5 1262
+194.87.13.2 195.46.161.199 13 4623
+194.87.13.2 195.46.161.186 90 82991
+193.125.152.4 193.124.1.131 20 1742
+193.125.152.4 193.124.22.81 402 73761
+193.125.152.4 193.124.36.34 37 8132
+193.125.152.4 193.124.188.65 101 48405
+193.125.152.4 193.125.44.76 6 240
+193.125.152.4 193.125.80.35 37 3336
+193.125.152.4 193.233.208.3 4 240
+193.125.152.4 194.58.38.18 36 3384
+194.87.13.2 195.46.161.184 5 1119
+193.125.152.4 194.58.124.17 39 3399
+193.125.152.4 194.58.212.34 25 3742
+193.125.152.4 194.67.80.42 25 1795
+193.125.152.4 194.84.44.35 18 1638
+193.125.152.4 194.87.0.20 82 19845
+193.125.152.4 194.87.160.195 17 1150
+193.125.152.4 194.87.206.137 19 1690
+193.125.152.4 194.87.211.1 103 8898
+194.87.13.2 195.46.161.177 6 2360
+194.87.13.2 195.46.161.172 5 1259
+193.125.152.4 194.154.92.129 31 5655
+193.125.152.4 194.186.221.251 19 1238
+193.125.152.4 194.186.254.26 62 31955
+193.125.152.4 194.190.194.33 16 1534
+194.87.13.2 195.46.161.171 16 3685
+204.57.67.27 194.58.72.120 4 160
+193.125.152.4 195.9.16.2 23 1913
+193.125.152.4 195.12.66.81 16 1534
+194.87.13.2 195.46.161.170 32 7476
+193.125.152.4 195.54.2.7 17 1586
+193.125.152.4 195.58.1.145 35 7789
+193.125.152.4 195.90.136.21 94 11466
+193.125.152.4 195.222.130.67 17 1577
+193.125.152.4 195.239.88.50 21 1220
+194.87.13.2 195.46.161.164 7 2364
+194.87.13.2 195.46.161.156 12 2478
+194.87.13.2 195.46.161.155 6 1296
+194.87.13.2 195.46.161.154 11 2282
+194.87.13.2 195.46.161.153 5 1256
+194.87.13.2 195.46.161.146 6 252
+194.87.13.2 195.46.161.113 11 3596
+194.87.13.2 195.46.161.111 16 3598
+193.125.152.5 193.124.22.65 18 1368
+194.87.13.2 195.46.161.109 4 1079
+194.87.13.2 195.46.161.85 10 1383
+194.87.13.2 195.46.161.84 21 4799
+194.87.13.2 195.46.161.83 121 57225
+194.87.13.2 195.46.161.75 3 124
+193.125.152.6 193.124.22.22 2 88
+193.125.152.6 193.124.22.65 15 930
+193.125.152.6 193.232.119.131 2 80
+194.87.13.2 195.46.160.69 147 34960
+193.125.152.6 194.226.235.33 6 254
+194.87.13.2 195.38.160.38 10 1591
+194.87.13.2 195.16.108.139 10 9589
+193.125.152.6 195.91.161.2 4 176
+193.125.152.6 195.128.140.2 19 5145
+193.125.152.6 195.161.24.66 23 1283
+194.87.13.2 195.16.108.135 8 3272
+194.87.13.2 195.16.102.4 8 2154
+194.87.13.2 195.16.101.101 4 1280
+194.87.13.2 195.16.101.67 72 52581
+193.125.152.6 212.46.3.250 4 176
+193.125.152.8 193.124.22.65 4 224
+194.87.13.2 195.16.98.235 22 3020
+193.125.152.8 193.124.224.35 14 2571
+194.87.13.2 195.16.98.230 7 1330
+194.87.13.2 195.16.98.209 10 3463
+194.87.13.2 195.16.98.204 27 5394
+194.87.13.2 195.16.98.194 13 3269
+194.87.13.2 195.16.98.193 14 4507
+194.87.13.2 195.16.98.99 7 1400
+194.87.13.2 195.16.98.37 44 49756
+194.87.13.2 195.16.98.13 14 3317
+193.125.152.10 158.250.26.145 18 1368
+194.87.13.2 195.16.96.9 11 2554
+194.87.13.2 195.12.32.170 8 3451
+193.125.152.10 193.124.22.65 18 1368
+193.125.152.10 193.233.11.84 4 304
+193.125.152.10 194.67.64.33 18 1368
+193.125.152.10 194.67.65.17 18 1368
+193.125.152.10 194.67.65.18 18 1368
+193.125.152.10 194.67.65.130 18 1368
+193.125.152.10 194.67.106.209 20 1520
+193.125.152.10 194.84.127.22 12 912
+194.87.13.2 195.12.32.165 27 4363
+194.87.13.2 195.12.32.52 5 2138
+194.87.13.2 195.12.32.7 4 1219
+193.125.152.10 194.190.105.2 2 152
+193.125.152.10 194.190.105.4 1 76
+193.125.152.10 194.190.105.7 2 152
+193.125.152.10 195.5.128.42 18 1368
+193.125.152.10 195.5.138.6 18 1368
+193.125.152.10 195.5.138.44 16 1216
+193.125.152.10 195.26.160.48 15 1140
+193.125.152.10 195.26.160.50 18 1368
+193.125.152.10 195.54.192.1 2 152
+193.125.152.10 195.54.192.43 2 152
+193.125.152.10 195.133.94.129 4 336
+193.125.152.10 195.151.111.45 13 988
+194.87.13.2 195.9.176.153 18 5299
+194.87.13.2 195.9.103.3 184 183787
+194.87.13.2 195.9.96.7 96 66779
+193.125.152.12 193.124.22.65 2 152
+193.125.152.15 193.124.22.65 18 1368
+193.125.152.16 193.124.22.65 15 1140
+193.125.152.17 193.124.22.22 12 906
+193.125.152.17 193.124.22.65 12 912
+193.125.152.18 193.124.22.65 2 152
+204.57.67.9 195.146.67.100 5 200
+194.87.13.2 195.9.94.33 11 2544
+193.125.152.19 193.124.22.65 13 988
+194.87.13.2 195.9.90.85 139 61939
+194.87.13.2 195.9.67.45 18 3485
+193.125.152.23 193.124.22.65 4 246
+194.87.13.2 195.9.47.230 7 2488
+193.125.152.23 194.87.0.28 3783 538698
+193.125.152.23 194.186.254.26 6986 644105
+194.87.13.2 194.220.215.111 73 61702
+193.125.152.24 192.124.174.67 5717 2168144
+194.87.13.2 194.220.215.110 56 45039
+193.125.152.24 193.124.97.131 504 27627
+194.87.13.2 194.220.215.66 59 35775
+194.87.13.2 194.220.169.1 32 14343
+193.125.152.24 193.125.95.121 1040 572488
+194.87.13.2 194.220.140.106 6 1159
+194.87.13.2 194.190.105.4 40 8033
+194.87.13.2 194.190.82.40 34 24976
+193.125.152.24 194.58.72.102 2072 1038564
+193.125.152.24 194.58.110.33 649 310072
+194.87.13.2 194.190.56.83 11 1499
diff --git a/contrib/ip_and_mac/test.sql b/contrib/ip_and_mac/test.sql
index 296e1ebe94..d1a99aca41 100644
--- a/contrib/ip_and_mac/test.sql
+++ b/contrib/ip_and_mac/test.sql
@@ -1,8 +1,8 @@
--
-- A quick test of the IP address code
--
--- $Id: test.sql,v 1.1 1998/02/14 17:58:09 scrappy Exp $
---
+-- $Id: test.sql,v 1.2 1998/06/16 05:35:12 momjian Exp $
+-- This is original test (it was written before my changes in this class). alex.
-- temporary table:
create table addresses (address ipaddr);
diff --git a/contrib/ip_and_mac/test1.sql b/contrib/ip_and_mac/test1.sql
new file mode 100644
index 0000000000..372a0843eb
--- /dev/null
+++ b/contrib/ip_and_mac/test1.sql
@@ -0,0 +1,11 @@
+drop table stat_t;
+create table stat_t(i1 ipaddr, i2 ipaddr, p int4, b int4);
+create index stat_i1 on stat_t using btree (i1 ipaddr_ops);
+create index stat_i2 on stat_t using btree (i2 ipaddr_ops);
+copy stat_t from '/v/noc/src/ip_class/test.DATA' using delimiters ' ';
+--
+-- Please, check if your test data are not in /v/noc/src/ip_class/test.DATA file,
+-- edit test1.sql file and repeatr it.
+--
+-- If everything is OK, you should run test2.sql now
+--
diff --git a/contrib/ip_and_mac/test2.sql b/contrib/ip_and_mac/test2.sql
new file mode 100644
index 0000000000..3207aa2c22
--- /dev/null
+++ b/contrib/ip_and_mac/test2.sql
@@ -0,0 +1,26 @@
+vacuum verbose analyze stat_t (i1,i2);
+--
+--
+select i2,sum(b) as b
+into tmp
+from stat_t
+where i1 >= '144.206.0.0' and i1 <= '144.206.255.255'
+group by i2;
+insert into tmp
+select '0.0.0.0' as i2,sum(b) as k
+from tmp
+where b < 10 * 1024;
+delete from tmp
+where b < 10 * 1024 and i2 <> '0.0.0.0';
+select i2,b / 1024 as k from tmp
+order by k desc;
+select ipaddr_print(i2,'%A/%P'),b from tmp where i2 = '0.0.0.0';
+drop table tmp;
+explain select i2,sum(b) as b
+into tmp
+from stat_t
+where i1 >= '144.206.0.0' and i1 <= '144.206.255.255'
+group by i2;
+-- ********************************************************
+-- * Now remove test table by 'drop table stat_t' command *
+-- ********************************************************