|
libexplain
1.4.D001
|
#include <libexplain/ac/assert.h>#include <libexplain/ac/errno.h>#include <libexplain/ac/netdb.h>#include <libexplain/getaddrinfo.h>#include <libexplain/output.h>Go to the source code of this file.
Functions | |
| void | explain_getaddrinfo_or_die (const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res) |
| void explain_getaddrinfo_or_die | ( | const char * | node, |
| const char * | service, | ||
| const struct addrinfo * | hints, | ||
| struct addrinfo ** | res | ||
| ) |
The explain_getaddrinfo_or_die function is used to call the getaddrinfo(3) system call. On failure an explanation will be printed to stderr, obtained from explain_errcode_getaddrinfo(3), and then the process terminates by calling exit(EXIT_FAILURE).
This function is intended to be used in a fashion similar to the following example:
explain_getaddrinfo_or_die(node, service, hints, res);
| node | The node, exactly as to be passed to the getaddrinfo(3) system call. |
| service | The service, exactly as to be passed to the getaddrinfo(3) system call. |
| hints | The hints, exactly as to be passed to the getaddrinfo(3) system call. |
| res | The res, exactly as to be passed to the getaddrinfo(3) system call. |
Definition at line 28 of file getaddrinfo_or_die.c.
1.7.6.1