PostgreSQL Source Code git master
|
#include "postgres.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <assert.h>
#include <ctype.h>
#include "utils/builtins.h"
#include "utils/inet.h"
Go to the source code of this file.
Macros | |
#define | NS_IN6ADDRSZ 16 |
#define | NS_INT16SZ 2 |
#define | NS_INADDRSZ 4 |
Functions | |
static int | inet_net_pton_ipv4 (const char *src, u_char *dst) |
static int | inet_cidr_pton_ipv4 (const char *src, u_char *dst, size_t size) |
static int | inet_net_pton_ipv6 (const char *src, u_char *dst) |
static int | inet_cidr_pton_ipv6 (const char *src, u_char *dst, size_t size) |
int | pg_inet_net_pton (int af, const char *src, void *dst, size_t size) |
static int | getbits (const char *src, int *bitsp) |
static int | getv4 (const char *src, u_char *dst, int *bitsp) |
#define NS_IN6ADDRSZ 16 |
Definition at line 433 of file inet_net_pton.c.
#define NS_INADDRSZ 4 |
Definition at line 435 of file inet_net_pton.c.
#define NS_INT16SZ 2 |
Definition at line 434 of file inet_net_pton.c.
|
static |
Definition at line 348 of file inet_net_pton.c.
Referenced by getv4(), and inet_cidr_pton_ipv6().
|
static |
Definition at line 381 of file inet_net_pton.c.
References digits, getbits(), and val.
Referenced by inet_cidr_pton_ipv6().
|
static |
Definition at line 96 of file inet_net_pton.c.
References assert, digits, and EMSGSIZE.
Referenced by pg_inet_net_pton().
|
static |
Definition at line 438 of file inet_net_pton.c.
References digits, EMSGSIZE, getbits(), getv4(), i, NS_IN6ADDRSZ, NS_INADDRSZ, NS_INT16SZ, and val.
Referenced by inet_net_pton_ipv6(), and pg_inet_net_pton().
|
static |
Definition at line 259 of file inet_net_pton.c.
References assert, digits, and EMSGSIZE.
Referenced by pg_inet_net_pton().
|
static |
Definition at line 428 of file inet_net_pton.c.
References inet_cidr_pton_ipv6().
Referenced by pg_inet_net_pton().
int pg_inet_net_pton | ( | int | af, |
const char * | src, | ||
void * | dst, | ||
size_t | size | ||
) |
Definition at line 61 of file inet_net_pton.c.
References EAFNOSUPPORT, inet_cidr_pton_ipv4(), inet_cidr_pton_ipv6(), inet_net_pton_ipv4(), inet_net_pton_ipv6(), PGSQL_AF_INET, and PGSQL_AF_INET6.
Referenced by network_in().