gmime-host-utils

Name

gmime-host-utils -- 

Synopsis



int         g_gethostbyname_r               (const char *name,
                                             struct hostent *host,
                                             char *buf,
                                             size_t buflen,
                                             int *herr);
int         g_gethostbyaddr_r               (const char *addr,
                                             int addrlen,
                                             int af,
                                             struct hostent *hostbuf,
                                             char *buf,
                                             size_t buflen,
                                             int *herr);

Description

Details

g_gethostbyname_r ()

int         g_gethostbyname_r               (const char *name,
                                             struct hostent *host,
                                             char *buf,
                                             size_t buflen,
                                             int *herr);

A reentrant implementation of gethostbyname()

name :

the host to resolve

host :

a buffer pointing to a struct hostent to use for storage

buf :

a buffer to use for hostname storage

buflen :

the size of buf

herr :

a pointer to a variable to store an error code in

Returns :

0 on success, ERANGE if buflen is too small, "something else" otherwise (in which case *herr will be set to one of the gethostbyname() error codes).


g_gethostbyaddr_r ()

int         g_gethostbyaddr_r               (const char *addr,
                                             int addrlen,
                                             int af,
                                             struct hostent *hostbuf,
                                             char *buf,
                                             size_t buflen,
                                             int *herr);

A reentrant implementation of gethostbyaddr()

addr :

the addr to resolve

addrlen :

address length

af :

Address Family

hostbuf :

buf :

a buffer to use for hostname storage

buflen :

the size of buf

herr :

a pointer to a variable to store an error code in

Returns :

0 on success, ERANGE if buflen is too small, "something else" otherwise (in which case *herr will be set to one of the gethostbyaddr() error codes).