diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/pg_amop.h | 22 | ||||
-rw-r--r-- | src/include/catalog/pg_amproc.h | 4 | ||||
-rw-r--r-- | src/include/catalog/pg_opclass.h | 6 | ||||
-rw-r--r-- | src/include/catalog/pg_operator.h | 51 | ||||
-rw-r--r-- | src/include/catalog/pg_proc.h | 55 | ||||
-rw-r--r-- | src/include/catalog/pg_type.h | 11 | ||||
-rw-r--r-- | src/include/utils/builtins.h | 39 | ||||
-rw-r--r-- | src/include/utils/mac.h | 58 |
8 files changed, 223 insertions, 23 deletions
diff --git a/src/include/catalog/pg_amop.h b/src/include/catalog/pg_amop.h index 40a112e642b..140eaa3b39e 100644 --- a/src/include/catalog/pg_amop.h +++ b/src/include/catalog/pg_amop.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_amop.h,v 1.15 1998/09/01 04:34:48 momjian Exp $ + * $Id: pg_amop.h,v 1.16 1998/10/03 05:40:51 momjian Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -299,6 +299,26 @@ DATA(insert OID = 0 ( 403 1313 1335 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 1313 1334 5 btreesel btreenpage )); /* + * nbtree macaddr + */ + +DATA(insert OID = 0 ( 403 810 1222 1 btreesel btreenpage )); +DATA(insert OID = 0 ( 403 810 1223 2 btreesel btreenpage )); +DATA(insert OID = 0 ( 403 810 1220 3 btreesel btreenpage )); +DATA(insert OID = 0 ( 403 810 1225 4 btreesel btreenpage )); +DATA(insert OID = 0 ( 403 810 1224 5 btreesel btreenpage )); + +/* + * nbtree ip + */ + +DATA(insert OID = 0 ( 403 935 1203 1 btreesel btreenpage )); +DATA(insert OID = 0 ( 403 935 1204 2 btreesel btreenpage )); +DATA(insert OID = 0 ( 403 935 1201 3 btreesel btreenpage )); +DATA(insert OID = 0 ( 403 935 1206 4 btreesel btreenpage )); +DATA(insert OID = 0 ( 403 935 1205 5 btreesel btreenpage )); + +/* * hash table _ops */ diff --git a/src/include/catalog/pg_amproc.h b/src/include/catalog/pg_amproc.h index 4c12668d662..fc9c526379a 100644 --- a/src/include/catalog/pg_amproc.h +++ b/src/include/catalog/pg_amproc.h @@ -9,7 +9,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_amproc.h,v 1.10 1998/09/01 04:34:49 momjian Exp $ + * $Id: pg_amproc.h,v 1.11 1998/10/03 05:40:52 momjian Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -99,6 +99,8 @@ DATA(insert OID = 0 (403 1115 1107 1)); DATA(insert OID = 0 (403 1181 359 1)); DATA(insert OID = 0 (403 1312 1314 1)); DATA(insert OID = 0 (403 1313 1315 1)); +DATA(insert OID = 0 (403 810 836 1)); +DATA(insert OID = 0 (403 935 926 1)); /* hash */ diff --git a/src/include/catalog/pg_opclass.h b/src/include/catalog/pg_opclass.h index 3f7814a11f7..388f5986303 100644 --- a/src/include/catalog/pg_opclass.h +++ b/src/include/catalog/pg_opclass.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_opclass.h,v 1.11 1998/09/01 04:35:06 momjian Exp $ + * $Id: pg_opclass.h,v 1.12 1998/10/03 05:40:54 momjian Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -107,5 +107,9 @@ DATA(insert OID = 1312 ( datetime_ops 1184 )); DESCR(""); DATA(insert OID = 1313 ( timespan_ops 1186 )); DESCR(""); +DATA(insert OID = 810 ( macaddr_ops 829 )); +DESCR(""); +DATA(insert OID = 935 ( ipaddr_ops 869 )); +DESCR(""); #endif /* PG_OPCLASS_H */ diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h index 4b223624181..4604ccd7a94 100644 --- a/src/include/catalog/pg_operator.h +++ b/src/include/catalog/pg_operator.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_operator.h,v 1.38 1998/09/14 01:14:48 momjian Exp $ + * $Id: pg_operator.h,v 1.39 1998/10/03 05:40:55 momjian Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -466,7 +466,7 @@ DATA(insert OID = 1094 ( "<>" PGUID 0 b t f 1082 1082 16 1094 1093 0 0 da DATA(insert OID = 1095 ( "<" PGUID 0 b t f 1082 1082 16 1097 1098 0 0 date_lt intltsel intltjoinsel )); DATA(insert OID = 1096 ( "<=" PGUID 0 b t f 1082 1082 16 1098 1097 0 0 date_le intltsel intltjoinsel )); DATA(insert OID = 1097 ( ">" PGUID 0 b t f 1082 1082 16 1095 1096 0 0 date_gt intltsel intltjoinsel )); -DATA(insert OID = 1098 ( ">=" PGUID 0 b t f 1082 1082 16 1096 1065 0 0 date_ge intltsel intltjoinsel )); +DATA(insert OID = 1098 ( ">=" PGUID 0 b t f 1082 1082 16 1096 1095 0 0 date_ge intltsel intltjoinsel )); DATA(insert OID = 1099 ( "-" PGUID 0 b t f 1082 1082 23 0 0 0 0 date_mi - - )); DATA(insert OID = 1100 ( "+" PGUID 0 b t f 1082 23 1082 0 0 0 0 date_pli - - )); DATA(insert OID = 1101 ( "-" PGUID 0 b t f 1082 23 1082 0 0 0 0 date_mii - - )); @@ -477,7 +477,7 @@ DATA(insert OID = 1109 ( "<>" PGUID 0 b t f 1083 1083 16 1109 1108 0 0 time DATA(insert OID = 1110 ( "<" PGUID 0 b t f 1083 1083 16 1112 1113 0 0 time_lt intltsel intltjoinsel )); DATA(insert OID = 1111 ( "<=" PGUID 0 b t f 1083 1083 16 1113 1112 0 0 time_le intltsel intltjoinsel )); DATA(insert OID = 1112 ( ">" PGUID 0 b t f 1083 1083 16 1110 1111 0 0 time_gt intltsel intltjoinsel )); -DATA(insert OID = 1113 ( ">=" PGUID 0 b t f 1083 1083 16 1111 1065 0 0 time_ge intltsel intltjoinsel )); +DATA(insert OID = 1113 ( ">=" PGUID 0 b t f 1083 1083 16 1111 1110 0 0 time_ge intltsel intltjoinsel )); /* float48 operators */ DATA(insert OID = 1116 ( "+" PGUID 0 b t f 700 701 701 1116 0 0 0 float48pl - - )); @@ -538,10 +538,10 @@ DATA(insert OID = 1305 ( ">=" PGUID 0 b t f 1296 1296 16 1304 1302 0 0 timest /* name, owner, prec, kind, isleft, canhash, left, right, result, com, negate, lsortop, rsortop, oprcode, operrest, oprjoin */ DATA(insert OID = 1320 ( "=" PGUID 0 b t t 1184 1184 16 1320 1321 1322 1322 datetime_eq eqsel eqjoinsel )); DATA(insert OID = 1321 ( "<>" PGUID 0 b t f 1184 1184 16 1321 1320 0 0 datetime_ne neqsel neqjoinsel )); -DATA(insert OID = 1322 ( "<" PGUID 0 b t f 1184 1184 16 1325 1325 0 0 datetime_lt intltsel intltjoinsel )); -DATA(insert OID = 1323 ( "<=" PGUID 0 b t f 1184 1184 16 1324 1324 0 0 datetime_le intltsel intltjoinsel )); -DATA(insert OID = 1324 ( ">" PGUID 0 b t f 1184 1184 16 1323 1323 0 0 datetime_gt intltsel intltjoinsel )); -DATA(insert OID = 1325 ( ">=" PGUID 0 b t f 1184 1184 16 1322 1322 0 0 datetime_ge intltsel intltjoinsel )); +DATA(insert OID = 1322 ( "<" PGUID 0 b t f 1184 1184 16 1324 1325 0 0 datetime_lt intltsel intltjoinsel )); +DATA(insert OID = 1323 ( "<=" PGUID 0 b t f 1184 1184 16 1325 1324 0 0 datetime_le intltsel intltjoinsel )); +DATA(insert OID = 1324 ( ">" PGUID 0 b t f 1184 1184 16 1322 1323 0 0 datetime_gt intltsel intltjoinsel )); +DATA(insert OID = 1325 ( ">=" PGUID 0 b t f 1184 1184 16 1323 1322 0 0 datetime_ge intltsel intltjoinsel )); DATA(insert OID = 1327 ( "+" PGUID 0 b t f 1184 1186 1184 1327 0 0 0 datetime_pl_span - - )); DATA(insert OID = 1328 ( "-" PGUID 0 b t f 1184 1184 1186 0 0 0 0 datetime_mi - - )); @@ -550,10 +550,10 @@ DATA(insert OID = 1329 ( "-" PGUID 0 b t f 1184 1186 1184 0 0 0 0 datetim /* timespan operators */ DATA(insert OID = 1330 ( "=" PGUID 0 b t t 1186 1186 16 1330 1331 1332 1332 timespan_eq eqsel eqjoinsel )); DATA(insert OID = 1331 ( "<>" PGUID 0 b t f 1186 1186 16 1331 1330 0 0 timespan_ne neqsel neqjoinsel )); -DATA(insert OID = 1332 ( "<" PGUID 0 b t f 1186 1186 16 1335 1335 0 0 timespan_lt intltsel intltjoinsel )); -DATA(insert OID = 1333 ( "<=" PGUID 0 b t f 1186 1186 16 1334 1334 0 0 timespan_le intltsel intltjoinsel )); -DATA(insert OID = 1334 ( ">" PGUID 0 b t f 1186 1186 16 1333 1333 0 0 timespan_gt intltsel intltjoinsel )); -DATA(insert OID = 1335 ( ">=" PGUID 0 b t f 1186 1186 16 1332 1332 0 0 timespan_ge intltsel intltjoinsel )); +DATA(insert OID = 1332 ( "<" PGUID 0 b t f 1186 1186 16 1334 1335 0 0 timespan_lt intltsel intltjoinsel )); +DATA(insert OID = 1333 ( "<=" PGUID 0 b t f 1186 1186 16 1335 1334 0 0 timespan_le intltsel intltjoinsel )); +DATA(insert OID = 1334 ( ">" PGUID 0 b t f 1186 1186 16 1332 1333 0 0 timespan_gt intltsel intltjoinsel )); +DATA(insert OID = 1335 ( ">=" PGUID 0 b t f 1186 1186 16 1333 1332 0 0 timespan_ge intltsel intltjoinsel )); DATA(insert OID = 1336 ( "-" PGUID 0 l t f 0 1186 1186 0 0 0 0 timespan_um 0 0 )); DATA(insert OID = 1337 ( "+" PGUID 0 b t f 1186 1186 1186 1337 0 0 0 timespan_pl - - )); @@ -563,10 +563,10 @@ DATA(insert OID = 1338 ( "-" PGUID 0 b t f 1186 1186 1186 0 0 0 0 timespa DATA(insert OID = 1420 ( "@@" PGUID 0 l t f 0 718 600 0 0 0 0 circle_center - - )); DATA(insert OID = 1500 ( "=" PGUID 0 b t t 718 718 16 1500 1501 1502 1502 circle_eq eqsel eqjoinsel )); DATA(insert OID = 1501 ( "<>" PGUID 0 b t f 718 718 16 1501 1500 0 0 circle_ne neqsel neqjoinsel )); -DATA(insert OID = 1502 ( "<" PGUID 0 b t f 718 718 16 0 0 0 0 circle_lt areasel areajoinsel )); -DATA(insert OID = 1503 ( ">" PGUID 0 b t f 718 718 16 0 0 0 0 circle_gt areasel areajoinsel )); -DATA(insert OID = 1504 ( "<=" PGUID 0 b t f 718 718 16 0 0 0 0 circle_le areasel areajoinsel )); -DATA(insert OID = 1505 ( ">=" PGUID 0 b t f 718 718 16 0 0 0 0 circle_ge areasel areajoinsel )); +DATA(insert OID = 1502 ( "<" PGUID 0 b t f 718 718 16 1503 1505 0 0 circle_lt areasel areajoinsel )); +DATA(insert OID = 1503 ( ">" PGUID 0 b t f 718 718 16 1502 1504 0 0 circle_gt areasel areajoinsel )); +DATA(insert OID = 1504 ( "<=" PGUID 0 b t f 718 718 16 1505 1503 0 0 circle_le areasel areajoinsel )); +DATA(insert OID = 1505 ( ">=" PGUID 0 b t f 718 718 16 1504 1502 0 0 circle_ge areasel areajoinsel )); DATA(insert OID = 1506 ( "<<" PGUID 0 b t f 718 718 16 0 0 0 0 circle_left intltsel intltjoinsel )); DATA(insert OID = 1507 ( "&<" PGUID 0 b t f 718 718 16 0 0 0 0 circle_overleft intltsel intltjoinsel )); @@ -635,6 +635,27 @@ DATA(insert OID = 1615 ( "?|" PGUID 0 l t f 0 628 16 1615 0 0 0 line_ver DATA(insert OID = 1616 ( "=" PGUID 0 b t f 628 628 16 1616 0 0 0 line_eq intltsel - )); DATA(insert OID = 1617 ( "#" PGUID 0 b t f 628 628 600 1617 0 0 0 line_interpt - - )); +/* MAC type */ +DATA(insert OID = 1220 ( "=" PGUID 0 b t t 829 829 16 1220 1221 0 0 macaddr_eq eqsel eqjoinsel )); +DATA(insert OID = 1221 ( "<>" PGUID 0 b t f 829 829 16 1221 1220 0 0 macaddr_ne neqsel neqjoinsel )); +DATA(insert OID = 1222 ( "<" PGUID 0 b t f 829 829 16 1224 1225 0 0 macaddr_lt intltsel intltjoinsel )); +DATA(insert OID = 1223 ( "<=" PGUID 0 b t f 829 829 16 1225 1224 0 0 macaddr_le intltsel intltjoinsel )); +DATA(insert OID = 1224 ( ">" PGUID 0 b t f 829 829 16 1222 1223 0 0 macaddr_gt intltsel intltjoinsel )); +DATA(insert OID = 1225 ( ">=" PGUID 0 b t f 829 829 16 1223 1222 0 0 macaddr_ge intltsel intltjoinsel )); + +/* IP type */ +DATA(insert OID = 1201 ( "=" PGUID 0 b t t 869 869 16 1201 1202 0 0 ipaddr_eq eqsel eqjoinsel )); +DATA(insert OID = 1202 ( "<>" PGUID 0 b t f 869 869 16 1202 1201 0 0 ipaddr_ne neqsel neqjoinsel )); +DATA(insert OID = 1203 ( "<" PGUID 0 b t f 869 869 16 1205 1206 0 0 ipaddr_lt intltsel intltjoinsel )); +DATA(insert OID = 1204 ( "<=" PGUID 0 b t f 869 869 16 1206 1205 0 0 ipaddr_le intltsel intltjoinsel )); +DATA(insert OID = 1205 ( ">" PGUID 0 b t f 869 869 16 1203 1204 0 0 ipaddr_gt intltsel intltjoinsel )); +DATA(insert OID = 1206 ( ">=" PGUID 0 b t f 869 869 16 1204 1203 0 0 ipaddr_ge intltsel intltjoinsel )); +DATA(insert OID = 931 ( "<<" PGUID 0 b t f 869 869 16 933 934 0 0 ipaddr_sub intltsel intltjoinsel )); +DATA(insert OID = 932 ( "<<=" PGUID 0 b t f 869 869 16 934 933 0 0 ipaddr_subeq intltsel intltjoinsel )); +DATA(insert OID = 933 ( ">>" PGUID 0 b t f 869 869 16 931 932 0 0 ipaddr_sup intltsel intltjoinsel )); +DATA(insert OID = 934 ( ">>=" PGUID 0 b t f 869 869 16 932 931 0 0 ipaddr_supeq intltsel intltjoinsel )); + + /* * function prototypes */ diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index 1f8ca515837..76f92f0e612 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.70 1998/10/02 16:27:55 momjian Exp $ + * $Id: pg_proc.h,v 1.71 1998/10/03 05:40:56 momjian Exp $ * * NOTES * The script catalog/genbki.sh reads this file and generates .bki @@ -2045,6 +2045,59 @@ DESCR("user name by UID (with fallback)"); DATA(insert OID = 1643 ( pg_get_indexdef PGUID 11 f t f 1 f 25 "26" 100 0 0 100 foo bar )); DESCR("index description"); +/* for mac type support */ +DATA(insert OID = 436 ( macaddr_in PGUID 11 f t f 1 f 829 "0" 100 0 0 100 foo bar )); +DESCR("(internal)"); +DATA(insert OID = 437 ( macaddr_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DESCR("(internal)"); + +DATA(insert OID = 830 ( macaddr_eq PGUID 11 f t f 2 f 16 "829 829" 100 0 0 100 foo bar )); +DESCR("equal"); +DATA(insert OID = 831 ( macaddr_lt PGUID 11 f t f 2 f 16 "829 829" 100 0 0 100 foo bar )); +DESCR("less-than"); +DATA(insert OID = 832 ( macaddr_le PGUID 11 f t f 2 f 16 "829 829" 100 0 0 100 foo bar )); +DESCR("less-than-or-equal"); +DATA(insert OID = 833 ( macaddr_gt PGUID 11 f t f 2 f 16 "829 829" 100 0 0 100 foo bar )); +DESCR("greater-than"); +DATA(insert OID = 834 ( macaddr_ge PGUID 11 f t f 2 f 16 "829 829" 100 0 0 100 foo bar )); +DESCR("greater-than-or-equal"); +DATA(insert OID = 835 ( macaddr_ne PGUID 11 f t f 2 f 16 "829 829" 100 0 0 100 foo bar )); +DESCR("not equal"); +DATA(insert OID = 836 ( macaddr_cmp PGUID 11 f t f 2 f 23 "829 829" 100 0 0 100 foo bar )); +DESCR("less-equal-greater"); +DATA(insert OID = 837 ( macaddr_manuf PGUID 11 f t f 1 f 25 "829" 100 0 0 100 foo bar )); +DESCR("MAC manufacturer"); + +/* for ip type support */ +DATA(insert OID = 910 ( ipaddr_in PGUID 11 f t f 1 f 869 "0" 100 0 0 100 foo bar )); +DESCR("(internal)"); +DATA(insert OID = 911 ( ipaddr_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DESCR("(internal)"); + +DATA(insert OID = 920 ( ipaddr_eq PGUID 11 f t f 2 f 16 "869 869" 100 0 0 100 foo bar )); +DESCR("equal"); +DATA(insert OID = 921 ( ipaddr_lt PGUID 11 f t f 2 f 16 "869 869" 100 0 0 100 foo bar )); +DESCR("less-than"); +DATA(insert OID = 922 ( ipaddr_le PGUID 11 f t f 2 f 16 "869 869" 100 0 0 100 foo bar )); +DESCR("less-than-or-equal"); +DATA(insert OID = 923 ( ipaddr_gt PGUID 11 f t f 2 f 16 "869 869" 100 0 0 100 foo bar )); +DESCR("greater-than"); +DATA(insert OID = 924 ( ipaddr_ge PGUID 11 f t f 2 f 16 "869 869" 100 0 0 100 foo bar )); +DESCR("greater-than-or-equal"); +DATA(insert OID = 925 ( ipaddr_ne PGUID 11 f t f 2 f 16 "869 869" 100 0 0 100 foo bar )); +DESCR("not equal"); +DATA(insert OID = 926 ( ipaddr_cmp PGUID 11 f t f 2 f 23 "869 869" 100 0 0 100 foo bar )); +DESCR("less-equal-greater"); +DATA(insert OID = 927 ( ipaddr_sub PGUID 11 f t f 2 f 16 "869 869" 100 0 0 100 foo bar )); +DESCR("is-subnet"); +DATA(insert OID = 928 ( ipaddr_subeq PGUID 11 f t f 2 f 16 "869 869" 100 0 0 100 foo bar )); +DESCR("is-subnet-or-equal"); +DATA(insert OID = 929 ( ipaddr_sup PGUID 11 f t f 2 f 16 "869 869" 100 0 0 100 foo bar )); +DESCR("is-supernet"); +DATA(insert OID = 930 ( ipaddr_supeq PGUID 11 f t f 2 f 16 "869 869" 100 0 0 100 foo bar )); +DESCR("is-supernet-or-equal"); + + /* * prototypes for functions pg_proc.c */ diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h index 99d0de22dce..3a675c1c337 100644 --- a/src/include/catalog/pg_type.h +++ b/src/include/catalog/pg_type.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_type.h,v 1.47 1998/09/01 04:35:18 momjian Exp $ + * $Id: pg_type.h,v 1.48 1998/10/03 05:40:58 momjian Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -298,6 +298,10 @@ DESCR("money '$d,ddd.cc'"); DATA(insert OID = 791 ( _money PGUID -1 -1 f b t \054 0 790 array_in array_out array_in array_out i _null_ )); /* OIDS 800 - 899 */ +DATA(insert OID = 829 ( macaddr PGUID 6 -1 f b t \054 0 0 macaddr_in macaddr_out macaddr_in macaddr_out i _null_ )); +DESCR("MAC address"); +DATA(insert OID = 869 ( ipaddr PGUID -1 -1 f b t \054 0 0 ipaddr_in ipaddr_out ipaddr_in ipaddr_out i _null_ )); +DESCR("IP address"); /* OIDS 900 - 999 */ @@ -333,8 +337,9 @@ DATA(insert OID = 1027 ( _polygon PGUID -1 -1 f b t \054 0 604 array_in array /* Note: the size of an aclitem needs to match sizeof(AclItem) in acl.h */ DATA(insert OID = 1033 ( aclitem PGUID 8 -1 f b t \054 0 0 aclitemin aclitemout aclitemin aclitemout i _null_ )); DESCR("access control list"); -DATA(insert OID = 1034 ( _aclitem PGUID -1 -1 f b t \054 0 1033 array_in array_out array_in array_out i _null_ )); - +DATA(insert OID = 1034 ( _aclitem PGUID -1 -1 f b t \054 0 1033 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1040 ( _macaddr PGUID -1 -1 f b t \054 0 829 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1041 ( _ipaddr PGUID -1 -1 f b t \054 0 869 array_in array_out array_in array_out i _null_ )); DATA(insert OID = 1042 ( bpchar PGUID -1 -1 f b t \054 0 18 bpcharin bpcharout bpcharin bpcharout i _null_ )); DESCR("blank-padded characters, length specifed when created"); #define BPCHAROID 1042 diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index f0cfd5b988f..fd6f50e9444 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.55 1998/09/22 20:28:13 momjian Exp $ + * $Id: builtins.h,v 1.56 1998/10/03 05:40:59 momjian Exp $ * * NOTES * This should normally only be included by fmgr.h. @@ -28,6 +28,7 @@ #include <utils/nabstime.h> #include <utils/int8.h> #include <utils/cash.h> +#include <utils/mac.h> #include <utils/rel.h> /* @@ -511,4 +512,40 @@ extern text *translate(text *string, char from, char to); /* acl.c */ +/* inet_net_ntop.c */ +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); + +/* ip.c */ +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); +bool ipaddr_sub(ipaddr * a1, ipaddr * a2); +bool ipaddr_subeq(ipaddr * a1, ipaddr * a2); +bool ipaddr_sup(ipaddr * a1, ipaddr * a2); +bool ipaddr_supeq(ipaddr * a1, ipaddr * a2); +int4 ipaddr_cmp(ipaddr * a1, ipaddr * a2); +int v4bitncmp(u_int32_t a1, u_int32_t a2, int bits); + + +/* mac.c */ +macaddr *macaddr_in(char *str); +char *macaddr_out(macaddr * addr); +bool macaddr_lt(macaddr * a1, macaddr * a2); +bool macaddr_le(macaddr * a1, macaddr * a2); +bool macaddr_eq(macaddr * a1, macaddr * a2); +bool macaddr_ge(macaddr * a1, macaddr * a2); +bool macaddr_gt(macaddr * a1, macaddr * a2); +bool macaddr_ne(macaddr * a1, macaddr * a2); +int4 macaddr_cmp(macaddr * a1, macaddr * a2); +text *macaddr_manuf(macaddr * addr); + + #endif /* BUILTINS_H */ diff --git a/src/include/utils/mac.h b/src/include/utils/mac.h new file mode 100644 index 00000000000..3ecb61cb460 --- /dev/null +++ b/src/include/utils/mac.h @@ -0,0 +1,58 @@ +/*------------------------------------------------------------------------- + * + * builtins.h-- + * Declarations for operations on built-in types. + * + * + * Copyright (c) 1994, Regents of the University of California + * + * $Id: mac.h,v 1.1 1998/10/03 05:41:01 momjian Exp $ + * + *------------------------------------------------------------------------- + */ +#ifndef MAC_H +#define MAC_H + +/* + * This is the internal storage format for IP addresses: + */ + +typedef struct +{ + unsigned char family; + unsigned char bits; + union + { + u_int32_t ipv4_addr; /* network byte order */ + /* add IPV6 address type here */ + } addr; +} ipaddr_struct; + +typedef struct varlena ipaddr; + +/* + * This is the internal storage format for MAC addresses: + */ +typedef struct macaddr +{ + unsigned char a; + unsigned char b; + unsigned char c; + unsigned char d; + unsigned char e; + unsigned char f; +} macaddr; + + +typedef struct manufacturer +{ + unsigned char a; + unsigned char b; + unsigned char c; + char *name; +} manufacturer; + +extern manufacturer manufacturers[]; + +#endif /* MAC_H */ + |