Replacement getaddrinfo functions.
More...
#include <ctype.h>
#include <pthread.h>
#include <sys/param.h>
Go to the source code of this file.
|
static struct addrinfo * | alloc_ai (uint16_t port, u_long addr, int socktype, int proto) |
|
static int | copy_hostent (struct hostent *from, struct hostent *to, char *buffer, int buflen, int *error) |
|
void | freeaddrinfo (struct addrinfo *ai) |
|
char const * | gai_strerror (int ecode) |
|
int | getaddrinfo (char const *hostname, char const *servname, struct addrinfo const *hints, struct addrinfo **res) |
|
static struct hostent * | gethostbyaddr_r (char const *addr, int len, int type, struct hostent *result, char *buffer, int buflen, int *error) |
|
static struct hostent * | gethostbyname_r (char const *hostname, struct hostent *result, char *buffer, int buflen, int *error) |
|
int | getnameinfo (struct sockaddr const *sa, socklen_t salen, char *host, size_t hostlen, char *serv, size_t servlen, unsigned int flags) |
|
Replacement getaddrinfo functions.
These functions are defined and used only if the configure cannot detect the standard getaddrinfo(), freeaddrinfo(), gai_strerror() and getnameinfo(). This avoids sprinkling of ifdefs.
FIXME: getaddrinfo() & getnameinfo() should return all IPv4 addresses provided by DNS lookup.
- Copyright
- 2016 The FreeRADIUS server project
Definition in file getaddrinfo.c.
◆ BUFFER_OVERFLOW
◆ LOCAL_GETHOSTBYADDRR
#define LOCAL_GETHOSTBYADDRR 1 |
◆ LOCAL_GETHOSTBYNAMERSTYLE
#define LOCAL_GETHOSTBYNAMERSTYLE 1 |
◆ alloc_ai()
static struct addrinfo* alloc_ai |
( |
uint16_t |
port, |
|
|
u_long |
addr, |
|
|
int |
socktype, |
|
|
int |
proto |
|
) |
| |
|
static |
◆ copy_hostent()
static int copy_hostent |
( |
struct hostent * |
from, |
|
|
struct hostent * |
to, |
|
|
char * |
buffer, |
|
|
int |
buflen, |
|
|
int * |
error |
|
) |
| |
|
static |
◆ freeaddrinfo()
void freeaddrinfo |
( |
struct addrinfo * |
ai | ) |
|
◆ gai_strerror()
char const* gai_strerror |
( |
int |
ecode | ) |
|
◆ getaddrinfo()
int getaddrinfo |
( |
char const * |
hostname, |
|
|
char const * |
servname, |
|
|
struct addrinfo const * |
hints, |
|
|
struct addrinfo ** |
res |
|
) |
| |
◆ gethostbyaddr_r()
static struct hostent* gethostbyaddr_r |
( |
char const * |
addr, |
|
|
int |
len, |
|
|
int |
type, |
|
|
struct hostent * |
result, |
|
|
char * |
buffer, |
|
|
int |
buflen, |
|
|
int * |
error |
|
) |
| |
|
static |
◆ gethostbyname_r()
static struct hostent* gethostbyname_r |
( |
char const * |
hostname, |
|
|
struct hostent * |
result, |
|
|
char * |
buffer, |
|
|
int |
buflen, |
|
|
int * |
error |
|
) |
| |
|
static |
◆ getnameinfo()
int getnameinfo |
( |
struct sockaddr const * |
sa, |
|
|
socklen_t |
salen, |
|
|
char * |
host, |
|
|
size_t |
hostlen, |
|
|
char * |
serv, |
|
|
size_t |
servlen, |
|
|
unsigned int |
flags |
|
) |
| |
◆ fr_hostbyaddr
◆ fr_hostbyaddr_mutex
◆ fr_hostbyname
◆ fr_hostbyname_mutex