XSocket API  2.0
XIA Socket Library
Functions
Xgetaddrinfo.c File Reference

Xgetaddrinfo(), Xfreeaddrinfo(), Xgai_strerror() - network address and service translation. More...

#include "Xsocket.h"

Functions

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)
 

Function Documentation

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
sockfdAn Xsocket of type SOCK_STREAM
dagA sockaddr to hold the returned DAG.
lenOn 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