PostgreSQL Source Code
git master
|
#include "fmgr.h"
Go to the source code of this file.
Data Structures | |
struct | inet_struct |
struct | inet |
struct | macaddr |
struct | macaddr8 |
Macros | |
#define | PGSQL_AF_INET (AF_INET + 0) |
#define | PGSQL_AF_INET6 (AF_INET + 1) |
#define | ip_family(inetptr) (((inet_struct *) VARDATA_ANY(inetptr))->family) |
#define | ip_bits(inetptr) (((inet_struct *) VARDATA_ANY(inetptr))->bits) |
#define | ip_addr(inetptr) (((inet_struct *) VARDATA_ANY(inetptr))->ipaddr) |
#define | ip_addrsize(inetptr) (ip_family(inetptr) == PGSQL_AF_INET ? 4 : 16) |
#define | ip_maxbits(inetptr) (ip_family(inetptr) == PGSQL_AF_INET ? 32 : 128) |
#define | SET_INET_VARSIZE(dst) |
#define | PG_GETARG_INET_PP(n) DatumGetInetPP(PG_GETARG_DATUM(n)) |
#define | PG_RETURN_INET_P(x) return InetPGetDatum(x) |
#define | PG_GETARG_INET_P(n) DatumGetInetP(PG_GETARG_DATUM(n)) |
#define | PG_GETARG_MACADDR_P(n) DatumGetMacaddrP(PG_GETARG_DATUM(n)) |
#define | PG_RETURN_MACADDR_P(x) return MacaddrPGetDatum(x) |
#define | PG_GETARG_MACADDR8_P(n) DatumGetMacaddr8P(PG_GETARG_DATUM(n)) |
#define | PG_RETURN_MACADDR8_P(x) return Macaddr8PGetDatum(x) |
Typedefs | |
typedef struct macaddr | macaddr |
typedef struct macaddr8 | macaddr8 |
Functions | |
static inet * | DatumGetInetPP (Datum X) |
static Datum | InetPGetDatum (const inet *X) |
static inet * | DatumGetInetP (Datum X) |
static macaddr * | DatumGetMacaddrP (Datum X) |
static Datum | MacaddrPGetDatum (const macaddr *X) |
static macaddr8 * | DatumGetMacaddr8P (Datum X) |
static Datum | Macaddr8PGetDatum (const macaddr8 *X) |
inet * | cidr_set_masklen_internal (const inet *src, int bits) |
int | bitncmp (const unsigned char *l, const unsigned char *r, int n) |
int | bitncommon (const unsigned char *l, const unsigned char *r, int n) |
#define ip_addr | ( | inetptr | ) | (((inet_struct *) VARDATA_ANY(inetptr))->ipaddr) |
#define ip_addrsize | ( | inetptr | ) | (ip_family(inetptr) == PGSQL_AF_INET ? 4 : 16) |
#define ip_bits | ( | inetptr | ) | (((inet_struct *) VARDATA_ANY(inetptr))->bits) |
#define ip_family | ( | inetptr | ) | (((inet_struct *) VARDATA_ANY(inetptr))->family) |
#define ip_maxbits | ( | inetptr | ) | (ip_family(inetptr) == PGSQL_AF_INET ? 32 : 128) |
#define PG_GETARG_INET_P | ( | n | ) | DatumGetInetP(PG_GETARG_DATUM(n)) |
#define PG_GETARG_INET_PP | ( | n | ) | DatumGetInetPP(PG_GETARG_DATUM(n)) |
#define PG_GETARG_MACADDR8_P | ( | n | ) | DatumGetMacaddr8P(PG_GETARG_DATUM(n)) |
#define PG_GETARG_MACADDR_P | ( | n | ) | DatumGetMacaddrP(PG_GETARG_DATUM(n)) |
#define PG_RETURN_INET_P | ( | x | ) | return InetPGetDatum(x) |
#define PG_RETURN_MACADDR8_P | ( | x | ) | return Macaddr8PGetDatum(x) |
#define PG_RETURN_MACADDR_P | ( | x | ) | return MacaddrPGetDatum(x) |
#define SET_INET_VARSIZE | ( | dst | ) |
int bitncmp | ( | const unsigned char * | l, |
const unsigned char * | r, | ||
int | n | ||
) |
Definition at line 1563 of file network.c.
References b, IS_HIGHBIT_SET, and x.
Referenced by inet_gist_consistent(), inet_inclusion_cmp(), inet_spg_choose(), inet_spg_consistent_bitmap(), network_cmp_internal(), network_overlap(), network_sub(), network_subeq(), network_sup(), and network_supeq().
int bitncommon | ( | const unsigned char * | l, |
const unsigned char * | r, | ||
int | n | ||
) |
Definition at line 1597 of file network.c.
Referenced by calc_inet_union_params(), calc_inet_union_params_indexed(), inet_gist_penalty(), inet_hist_match_divider(), inet_merge(), inet_spg_choose(), and inet_spg_picksplit().
Definition at line 368 of file network.c.
References Assert, ip_addr, ip_bits, ip_family, ip_maxbits, palloc0(), and SET_INET_VARSIZE.
Referenced by cidr_set_masklen(), inet_merge(), inet_spg_choose(), inet_spg_picksplit(), and inet_to_cidr().
Definition at line 123 of file inet.h.
References PG_DETOAST_DATUM_PACKED.
Referenced by convert_network_to_scalar(), inet_gist_compress(), inet_hist_value_sel(), inet_spg_choose(), inet_spg_consistent_bitmap(), inet_spg_inner_consistent(), inet_spg_leaf_consistent(), inet_spg_picksplit(), network_abbrev_convert(), and network_fast_cmp().
Definition at line 163 of file inet.h.
References DatumGetPointer().
Referenced by convert_network_to_scalar().
Definition at line 147 of file inet.h.
References DatumGetPointer().
Referenced by convert_network_to_scalar(), macaddr_abbrev_convert(), and macaddr_fast_cmp().
Definition at line 129 of file inet.h.
References PointerGetDatum().
Referenced by inet_gist_fetch(), inet_spg_choose(), inet_spg_leaf_consistent(), and inet_spg_picksplit().
Definition at line 169 of file inet.h.
References PointerGetDatum().
Referenced by gbt_macad8key_cmp(), and leftmostvalue_macaddr8().
Definition at line 153 of file inet.h.
References PointerGetDatum().
Referenced by gbt_macadkey_cmp(), and leftmostvalue_macaddr().