Xgetaddrinfo(), Xfreeaddrinfo(), Xgai_strerror() - network address and service translation.
More...
#include "Xsocket.h"
|
const char * | Xgai_strerror (int code) |
|
int | Xgetaddrinfo (const char *name, const char *service, const struct addrinfo *hints, struct addrinfo **pai) |
| Get the full DAG of the remote socket. More...
|
|
void | Xfreeaddrinfo (struct addrinfo *ai) |
|
void Xfreeaddrinfo |
( |
struct addrinfo * |
ai | ) |
|
const char* Xgai_strerror |
( |
int |
code | ) |
|
int Xgetaddrinfo |
( |
const char * |
name, |
|
|
const char * |
service, |
|
|
const struct addrinfo * |
hints, |
|
|
struct addrinfo ** |
pai |
|
) |
| |
- Todo:
- flesh out Xgetaddrinfo() text
- Parameters
-
sockfd | An Xsocket of type SOCK_STREAM |
dag | A sockaddr to hold the returned DAG. |
len | On input contans the size of the sockaddr on output contains sizeof(sockaddr_x). |
- Returns
- 0 on success
-
-1 on failure with errno set
-
errno = EFAULT if dag is NULL
-
errno = EOPNOTSUPP if sockfd is not of type XSSOCK_STREAM
-
errno = ENOTCONN if sockfd is not in a connected state