PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "utils/inet.h"
Go to the source code of this file.
Macros | |
#define | NS_IN6ADDRSZ 16 |
#define | NS_INT16SZ 2 |
#define | SPRINTF(x) ((size_t)sprintf x) |
Functions | |
static char * | inet_net_ntop_ipv4 (const u_char *src, int bits, char *dst, size_t size) |
static char * | inet_net_ntop_ipv6 (const u_char *src, int bits, char *dst, size_t size) |
char * | pg_inet_net_ntop (int af, const void *src, int bits, char *dst, size_t size) |
static int | decoct (const u_char *src, int bytes, char *dst, size_t size) |
#define NS_IN6ADDRSZ 16 |
Definition at line 47 of file inet_net_ntop.c.
#define NS_INT16SZ 2 |
Definition at line 48 of file inet_net_ntop.c.
Definition at line 53 of file inet_net_ntop.c.
|
static |
Definition at line 155 of file inet_net_ntop.c.
References b, size, and SPRINTF.
Referenced by inet_net_ntop_ipv6().
|
static |
Definition at line 114 of file inet_net_ntop.c.
References b, EMSGSIZE, len, size, and SPRINTF.
Referenced by pg_inet_net_ntop().
|
static |
Definition at line 178 of file inet_net_ntop.c.
References cur, decoct(), EMSGSIZE, i, len, NS_IN6ADDRSZ, NS_INT16SZ, size, and SPRINTF.
Referenced by pg_inet_net_ntop().
char* pg_inet_net_ntop | ( | int | af, |
const void * | src, | ||
int | bits, | ||
char * | dst, | ||
size_t | size | ||
) |
Definition at line 77 of file inet_net_ntop.c.
References EAFNOSUPPORT, inet_net_ntop_ipv4(), inet_net_ntop_ipv6(), PGSQL_AF_INET, PGSQL_AF_INET6, and size.
Referenced by getHostaddr(), inet_abbrev(), network_host(), network_out(), network_show(), and pq_verify_peer_name_matches_certificate_ip().