PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "common/hashfn.h"
#include "libpq/pqformat.h"
#include "nodes/nodes.h"
#include "utils/fmgrprotos.h"
#include "utils/inet.h"
Go to the source code of this file.
Macros | |
#define | hibits(addr) ((unsigned long)(((addr)->a<<24) | ((addr)->b<<16) | ((addr)->c<<8) | ((addr)->d))) |
#define | lobits(addr) ((unsigned long)(((addr)->e<<24) | ((addr)->f<<16) | ((addr)->g<<8) | ((addr)->h))) |
Functions | |
static unsigned char | hex2_to_uchar (const unsigned char *ptr, bool *badhex) |
Datum | macaddr8_in (PG_FUNCTION_ARGS) |
Datum | macaddr8_out (PG_FUNCTION_ARGS) |
Datum | macaddr8_recv (PG_FUNCTION_ARGS) |
Datum | macaddr8_send (PG_FUNCTION_ARGS) |
static int32 | macaddr8_cmp_internal (macaddr8 *a1, macaddr8 *a2) |
Datum | macaddr8_cmp (PG_FUNCTION_ARGS) |
Datum | macaddr8_lt (PG_FUNCTION_ARGS) |
Datum | macaddr8_le (PG_FUNCTION_ARGS) |
Datum | macaddr8_eq (PG_FUNCTION_ARGS) |
Datum | macaddr8_ge (PG_FUNCTION_ARGS) |
Datum | macaddr8_gt (PG_FUNCTION_ARGS) |
Datum | macaddr8_ne (PG_FUNCTION_ARGS) |
Datum | hashmacaddr8 (PG_FUNCTION_ARGS) |
Datum | hashmacaddr8extended (PG_FUNCTION_ARGS) |
Datum | macaddr8_not (PG_FUNCTION_ARGS) |
Datum | macaddr8_and (PG_FUNCTION_ARGS) |
Datum | macaddr8_or (PG_FUNCTION_ARGS) |
Datum | macaddr8_trunc (PG_FUNCTION_ARGS) |
Datum | macaddr8_set7bit (PG_FUNCTION_ARGS) |
Datum | macaddrtomacaddr8 (PG_FUNCTION_ARGS) |
Datum | macaddr8tomacaddr (PG_FUNCTION_ARGS) |
Variables | |
static const signed char | hexlookup [128] |
#define lobits | ( | addr | ) | ((unsigned long)(((addr)->e<<24) | ((addr)->f<<16) | ((addr)->g<<8) | ((addr)->h))) |
Datum hashmacaddr8 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 395 of file mac8.c.
References hash_any(), sort-test::key, and PG_GETARG_MACADDR8_P.
Datum hashmacaddr8extended | ( | PG_FUNCTION_ARGS | ) |
Definition at line 403 of file mac8.c.
References hash_any_extended(), sort-test::key, PG_GETARG_INT64, and PG_GETARG_MACADDR8_P.
|
inlinestatic |
Datum macaddr8_and | ( | PG_FUNCTION_ARGS | ) |
Definition at line 434 of file mac8.c.
References macaddr8::a, macaddr8::b, macaddr8::c, macaddr8::d, macaddr8::e, macaddr8::f, macaddr8::g, macaddr8::h, palloc0(), PG_GETARG_MACADDR8_P, and PG_RETURN_MACADDR8_P.
Datum macaddr8_cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 325 of file mac8.c.
References a1, a2, macaddr8_cmp_internal(), PG_GETARG_MACADDR8_P, and PG_RETURN_INT32.
Referenced by gbt_macad8key_cmp().
Definition at line 310 of file mac8.c.
References a1, a2, hibits, and lobits.
Referenced by macaddr8_cmp(), macaddr8_eq(), macaddr8_ge(), macaddr8_gt(), macaddr8_le(), macaddr8_lt(), and macaddr8_ne().
Datum macaddr8_eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 356 of file mac8.c.
References a1, a2, macaddr8_cmp_internal(), PG_GETARG_MACADDR8_P, and PG_RETURN_BOOL.
Referenced by gbt_macad8eq().
Datum macaddr8_ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 365 of file mac8.c.
References a1, a2, macaddr8_cmp_internal(), PG_GETARG_MACADDR8_P, and PG_RETURN_BOOL.
Referenced by gbt_macad8ge().
Datum macaddr8_gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 374 of file mac8.c.
References a1, a2, macaddr8_cmp_internal(), PG_GETARG_MACADDR8_P, and PG_RETURN_BOOL.
Referenced by gbt_macad8gt().
Datum macaddr8_in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 97 of file mac8.c.
References a, macaddr8::a, b, macaddr8::b, macaddr8::c, macaddr8::d, macaddr8::e, ereturn, errcode(), errmsg(), macaddr8::f, macaddr8::g, macaddr8::h, hex2_to_uchar(), palloc0(), PG_GETARG_CSTRING, PG_RETURN_MACADDR8_P, and str.
Datum macaddr8_le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 347 of file mac8.c.
References a1, a2, macaddr8_cmp_internal(), PG_GETARG_MACADDR8_P, and PG_RETURN_BOOL.
Referenced by gbt_macad8le().
Datum macaddr8_lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 338 of file mac8.c.
References a1, a2, macaddr8_cmp_internal(), PG_GETARG_MACADDR8_P, and PG_RETURN_BOOL.
Referenced by gbt_macad8lt().
Datum macaddr8_ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 383 of file mac8.c.
References a1, a2, macaddr8_cmp_internal(), PG_GETARG_MACADDR8_P, and PG_RETURN_BOOL.
Datum macaddr8_not | ( | PG_FUNCTION_ARGS | ) |
Definition at line 415 of file mac8.c.
References macaddr8::a, macaddr8::b, macaddr8::c, macaddr8::d, macaddr8::e, macaddr8::f, macaddr8::g, macaddr8::h, palloc0(), PG_GETARG_MACADDR8_P, and PG_RETURN_MACADDR8_P.
Datum macaddr8_or | ( | PG_FUNCTION_ARGS | ) |
Definition at line 454 of file mac8.c.
References macaddr8::a, macaddr8::b, macaddr8::c, macaddr8::d, macaddr8::e, macaddr8::f, macaddr8::g, macaddr8::h, palloc0(), PG_GETARG_MACADDR8_P, and PG_RETURN_MACADDR8_P.
Datum macaddr8_out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 234 of file mac8.c.
References macaddr8::a, macaddr8::b, macaddr8::c, macaddr8::d, macaddr8::e, macaddr8::f, macaddr8::g, macaddr8::h, palloc(), PG_GETARG_MACADDR8_P, PG_RETURN_CSTRING, and snprintf.
Datum macaddr8_recv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 254 of file mac8.c.
References macaddr8::a, macaddr8::b, buf, macaddr8::c, macaddr8::d, macaddr8::e, macaddr8::f, macaddr8::g, macaddr8::h, palloc0(), PG_GETARG_POINTER, PG_RETURN_MACADDR8_P, and pq_getmsgbyte().
Datum macaddr8_send | ( | PG_FUNCTION_ARGS | ) |
Definition at line 287 of file mac8.c.
References macaddr8::a, macaddr8::b, buf, macaddr8::c, macaddr8::d, macaddr8::e, macaddr8::f, macaddr8::g, macaddr8::h, PG_GETARG_MACADDR8_P, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), and pq_sendbyte().
Datum macaddr8_set7bit | ( | PG_FUNCTION_ARGS | ) |
Definition at line 500 of file mac8.c.
References macaddr8::a, macaddr8::b, macaddr8::c, macaddr8::d, macaddr8::e, macaddr8::f, macaddr8::g, macaddr8::h, palloc0(), PG_GETARG_MACADDR8_P, and PG_RETURN_MACADDR8_P.
Datum macaddr8_trunc | ( | PG_FUNCTION_ARGS | ) |
Definition at line 477 of file mac8.c.
References macaddr8::a, macaddr8::b, macaddr8::c, macaddr8::d, macaddr8::e, macaddr8::f, macaddr8::g, macaddr8::h, palloc0(), PG_GETARG_MACADDR8_P, and PG_RETURN_MACADDR8_P.
Datum macaddr8tomacaddr | ( | PG_FUNCTION_ARGS | ) |
Definition at line 545 of file mac8.c.
References macaddr::a, macaddr8::a, macaddr::b, macaddr8::b, macaddr::c, macaddr8::c, macaddr::d, macaddr8::d, macaddr::e, macaddr8::e, ereport, errcode(), errhint(), errmsg(), ERROR, macaddr::f, macaddr8::f, macaddr8::g, macaddr8::h, palloc0(), PG_GETARG_MACADDR8_P, and PG_RETURN_MACADDR_P.
Datum macaddrtomacaddr8 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 524 of file mac8.c.
References macaddr::a, macaddr8::a, macaddr::b, macaddr8::b, macaddr::c, macaddr8::c, macaddr::d, macaddr8::d, macaddr::e, macaddr8::e, macaddr::f, macaddr8::f, macaddr8::g, macaddr8::h, palloc0(), PG_GETARG_MACADDR_P, and PG_RETURN_MACADDR8_P.
|
static |
Definition at line 41 of file mac8.c.
Referenced by hex2_to_uchar().