1explain_getaddrinfo_or_die(3L)ibrary Functions Manuaelxplain_getaddrinfo_or_die(3)
2
3
4
6 explain_getaddrinfo_or_die - network address translation and report
7 errors
8
10 #include <libexplain/getaddrinfo.h>
11 void explain_getaddrinfo_or_die(const char *node, const char *service,
12 const struct addrinfo *hints, struct addrinfo **res);
13
15 The explain_getaddrinfo_or_die function is used to call the getad‐
16 drinfo(3) system call. On failure, an explanation will be printed to
17 stderr, obtained from explain_getaddrinfo(3), and then the process ter‐
18 minates by calling exit(EXIT_FAILURE).
19
20 This function is intended to be used in a fashion similar to the fol‐
21 lowing example:
22 explain_getaddrinfo_or_die(node, service, hints, res);
23
24 node The node, exactly as to be passed to the getaddrinfo(3) system
25 call.
26
27 service The service, exactly as to be passed to the getaddrinfo(3) sys‐
28 tem call.
29
30 hints The hints, exactly as to be passed to the getaddrinfo(3) system
31 call.
32
33 res The res, exactly as to be passed to the getaddrinfo(3) system
34 call.
35
36 Returns:
37 This function only returns on success. On failure, prints an
38 explanation and exits.
39
41 getaddrinfo(3)
42 network address and service translation
43
44 explain_getaddrinfo(3)
45 explain getaddrinfo(3) errors
46
47 exit(2) terminate the calling process
48
50 libexplain version 1.4
51 Copyright (C) 2008 Peter Miller
52
53
54
55 explain_getaddrinfo_or_die(3)