Fix function calls to INET/CIDR functions. Added cidr_out.

This commit is contained in:
Bruce Momjian 1998-10-22 00:35:28 +00:00
parent f9ee08499f
commit 2ba4ee74aa
4 changed files with 23 additions and 13 deletions

View File

@ -3,7 +3,7 @@
* is for IP V4 CIDR notation, but prepared for V6: just
* add the necessary bits where the comments indicate.
*
* $Id: inet.c,v 1.9 1998/10/21 16:06:45 momjian Exp $
* $Id: inet.c,v 1.10 1998/10/22 00:35:23 momjian Exp $
* Jon Postel RIP 16 Oct 1998
*/
@ -148,6 +148,13 @@ cidr_in(char *src)
return (dst);
}
/* just a stub */
char *
cidr_out(inet *src)
{
return inet_out(src);
}
/*
* Boolean tests for magnitude. Add V4/V6 testing!
*/

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_proc.h,v 1.76 1998/10/21 21:14:20 momjian Exp $
* $Id: pg_proc.h,v 1.77 1998/10/22 00:35:25 momjian Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
@ -2077,6 +2077,8 @@ DESCR("(internal)");
/* for cidr type support */
DATA(insert OID = 1267 ( cidr_in PGUID 11 f t f 1 f 650 "0" 100 0 0 100 foo bar ));
DESCR("(internal)");
DATA(insert OID = 1416 ( cidr_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar ));
DESCR("(internal)");
/* these are used for both inet and cidr */
DATA(insert OID = 920 ( inet_eq PGUID 11 f t f 2 f 16 "869 869" 100 0 0 100 foo bar ));
@ -2113,23 +2115,23 @@ DATA(insert OID = 682 ( inet_host PGUID 11 f t f 1 f 25 "869" 100 0 0 100 fo
DESCR("host address");
/* inet versions */
DATA(insert OID = 940 ( netmask PGUID 14 f t f 1 f 25 "869" 100 0 0 100 "select inet_netmask($1)" - ));
DATA(insert OID = 946 ( netmask PGUID 14 f t f 1 f 25 "869" 100 0 0 100 "select inet_netmask($1)" - ));
DESCR("netmask of address");
DATA(insert OID = 941 ( netmasklen PGUID 14 f t f 1 f 23 "869" 100 0 0 100 "select inet_netmasklen($1)" - ));
DATA(insert OID = 947 ( netmasklen PGUID 14 f t f 1 f 23 "869" 100 0 0 100 "select inet_netmasklen($1)" - ));
DESCR("netmask length");
DATA(insert OID = 945 ( broadcast PGUID 14 f t f 1 f 25 "869" 100 0 0 100 "select inet_broadcast($1)" - ));
DATA(insert OID = 948 ( broadcast PGUID 14 f t f 1 f 25 "869" 100 0 0 100 "select inet_broadcast($1)" - ));
DESCR("broadcast address");
DATA(insert OID = 682 ( host PGUID 14 f t f 1 f 25 "869" 100 0 0 100 "select inet_host($1)" - ));
DATA(insert OID = 949 ( host PGUID 14 f t f 1 f 25 "869" 100 0 0 100 "select inet_host($1)" - ));
DESCR("host address");
/* cidr versions */
DATA(insert OID = 940 ( netmask PGUID 14 f t f 1 f 25 "650" 100 0 0 100 "select inet_netmask($1)" - ));
DATA(insert OID = 696 ( netmask PGUID 14 f t f 1 f 25 "650" 100 0 0 100 "select inet_netmask($1)" - ));
DESCR("netmask of address");
DATA(insert OID = 941 ( netmasklen PGUID 14 f t f 1 f 23 "650" 100 0 0 100 "select inet_netmasklen($1)" - ));
DATA(insert OID = 697 ( netmasklen PGUID 14 f t f 1 f 23 "650" 100 0 0 100 "select inet_netmasklen($1)" - ));
DESCR("netmask length");
DATA(insert OID = 945 ( broadcast PGUID 14 f t f 1 f 25 "650" 100 0 0 100 "select inet_broadcast($1)" - ));
DATA(insert OID = 698 ( broadcast PGUID 14 f t f 1 f 25 "650" 100 0 0 100 "select inet_broadcast($1)" - ));
DESCR("broadcast address");
DATA(insert OID = 682 ( host PGUID 14 f t f 1 f 25 "650" 100 0 0 100 "select inet_host($1)" - ));
DATA(insert OID = 699 ( host PGUID 14 f t f 1 f 25 "650" 100 0 0 100 "select inet_host($1)" - ));
DESCR("host address");

View File

@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_type.h,v 1.50 1998/10/21 16:06:48 momjian Exp $
* $Id: pg_type.h,v 1.51 1998/10/22 00:35:26 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@ -302,7 +302,7 @@ DATA(insert OID = 829 ( macaddr PGUID 6 -1 f b t \054 0 0 macaddr_in macaddr
DESCR("MAC address");
DATA(insert OID = 869 ( inet PGUID -1 -1 f b t \054 0 0 inet_in inet_out inet_in inet_out i _null_ ));
DESCR("Host address");
DATA(insert OID = 650 ( cidr PGUID -1 -1 f b t \054 0 0 cidr_in inet_out cidr_in inet_out i _null_ ));
DATA(insert OID = 650 ( cidr PGUID -1 -1 f b t \054 0 0 cidr_in cidr_out cidr_in cidr_out i _null_ ));
DESCR("Network address");
/* OIDS 900 - 999 */

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: builtins.h,v 1.63 1998/10/21 16:06:49 momjian Exp $
* $Id: builtins.h,v 1.64 1998/10/22 00:35:28 momjian Exp $
*
* NOTES
* This should normally only be included by fmgr.h.
@ -520,6 +520,7 @@ int inet_cidr_pton(int af, const void *src, void *dst, size_t size, int *used);
/* cidr.c */
inet *cidr_in(char *str);
char *cidr_out(inet *addr);
/* inet.c */
inet *inet_in(char *str);