diff options
| author | Bruce Momjian | 1998-10-12 04:07:53 +0000 |
|---|---|---|
| committer | Bruce Momjian | 1998-10-12 04:07:53 +0000 |
| commit | eb3e640ea2fa06d089b21a73b49673e87e84ce75 (patch) | |
| tree | 9da2f5f92c1777964bff93d748810776ddde1832 /src/include | |
| parent | 03ab5f01740a7c2c3fe570d5253aa9bd039d0c70 (diff) | |
New INET functions from D'Arcy J.M. Cain
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/pg_proc.h | 15 | ||||
| -rw-r--r-- | src/include/utils/builtins.h | 12 | ||||
| -rw-r--r-- | src/include/utils/cash.h | 2 |
3 files changed, 26 insertions, 3 deletions
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index 969470a253c..f454342be93 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_proc.h,v 1.72 1998/10/08 00:19:40 momjian Exp $ + * $Id: pg_proc.h,v 1.73 1998/10/12 04:07:48 momjian Exp $ * * NOTES * The script catalog/genbki.sh reads this file and generates .bki @@ -2097,6 +2097,19 @@ DESCR("is-supernet"); DATA(insert OID = 930 ( inet_supeq PGUID 11 f t f 2 f 16 "869 869" 100 0 0 100 foo bar )); DESCR("is-supernet-or-equal"); +DATA(insert OID = 940 ( inet_netmask PGUID 11 f t f 1 f 25 "869" 100 0 0 100 foo bar )); +DESCR("netmask of inet address"); +DATA(insert OID = 941 ( inet_masklen PGUID 11 f t f 1 f 23 "869" 100 0 0 100 foo bar )); +DESCR("netmask length"); +DATA(insert OID = 942 ( inet_host PGUID 11 f t f 1 f 25 "869" 100 0 0 100 foo bar )); +DESCR("host adress"); +DATA(insert OID = 943 ( inet_network_without_bits PGUID 11 f t f 1 f 25 "869" 100 0 0 100 foo bar )); +DESCR("netmask without bits"); +DATA(insert OID = 944 ( inet_network_with_bits PGUID 11 f t f 1 f 25 "869" 100 0 0 100 foo bar )); +DESCR("netmask with bits"); +DATA(insert OID = 945 ( inet_broadcast PGUID 11 f t f 1 f 25 "869" 100 0 0 100 foo bar )); +DESCR("broadcast address"); + /* * prototypes for functions pg_proc.c diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index f3c57d4deb5..49b849de09c 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: builtins.h,v 1.60 1998/10/08 18:30:49 momjian Exp $ + * $Id: builtins.h,v 1.61 1998/10/12 04:07:51 momjian Exp $ * * NOTES * This should normally only be included by fmgr.h. @@ -515,6 +515,9 @@ char *inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size); /* inet_net_pton.c */ int inet_net_pton(int af, const char *src, void *dst, size_t size); +char *inet_cidr_ntop(int af, const void *src, size_t len, int bits, char *dst, size_t size); +int inet_cidr_pton(int af, const void *src, void *dst, size_t size, int *used); + /* inet.c */ inet *inet_in(char *str); char *inet_out(inet * addr); @@ -530,6 +533,13 @@ bool inet_sup(inet * a1, inet * a2); bool inet_supeq(inet * a1, inet * a2); int4 inet_cmp(inet * a1, inet * a2); +text *inet_netmask(inet * addr); +int4 inet_masklen(inet * addr); +text *inet_host(inet * addr); +text *inet_network_without_bits(inet * addr); +text *inet_network_with_bits(inet * addr); +text *inet_broadcast(inet * addr); + /* mac.c */ macaddr *macaddr_in(char *str); diff --git a/src/include/utils/cash.h b/src/include/utils/cash.h index b5e45fc8daf..0530266f7ec 100644 --- a/src/include/utils/cash.h +++ b/src/include/utils/cash.h @@ -44,6 +44,6 @@ extern Cash *int2_mul_cash(int2 s, Cash *c); extern Cash *cashlarger(Cash *c1, Cash *c2); extern Cash *cashsmaller(Cash *c1, Cash *c2); -extern const char *cash_words_out(Cash *value); +extern text *cash_words_out(Cash *value); #endif /* CASH_H */ |
