summaryrefslogtreecommitdiffstats
path: root/templates/man3/getaddrinfo_a.3.pot
diff options
context:
space:
mode:
Diffstat (limited to 'templates/man3/getaddrinfo_a.3.pot')
-rw-r--r--templates/man3/getaddrinfo_a.3.pot1706
1 files changed, 1706 insertions, 0 deletions
diff --git a/templates/man3/getaddrinfo_a.3.pot b/templates/man3/getaddrinfo_a.3.pot
new file mode 100644
index 00000000..bb6e836e
--- /dev/null
+++ b/templates/man3/getaddrinfo_a.3.pot
@@ -0,0 +1,1706 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2024-03-01 16:56+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: TH
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "getaddrinfo_a"
+msgstr ""
+
+#. type: TH
+#: archlinux fedora-40 fedora-rawhide mageia-cauldron
+#, no-wrap
+msgid "2023-10-31"
+msgstr ""
+
+#. type: TH
+#: archlinux fedora-40 fedora-rawhide mageia-cauldron
+#, no-wrap
+msgid "Linux man-pages 6.06"
+msgstr ""
+
+#. type: SH
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "NAME"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"getaddrinfo_a, gai_suspend, gai_error, gai_cancel - asynchronous network "
+"address and service translation"
+msgstr ""
+
+#. type: SH
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "LIBRARY"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid "Asynchronous name lookup library (I<libanl>, I<-lanl>)"
+msgstr ""
+
+#. type: SH
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "SYNOPSIS"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid ""
+"B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
+"B<#include E<lt>netdb.hE<gt>>\n"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid ""
+"B<int getaddrinfo_a(int >I<mode>B<, struct gaicb *>I<list>B<[restrict],>\n"
+"B< int >I<nitems>B<, struct sigevent *restrict >I<sevp>B<);>\n"
+"B<int gai_suspend(const struct gaicb *const >I<list>B<[], int >I<nitems>B<,>\n"
+"B< const struct timespec *>I<timeout>B<);>\n"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid ""
+"B<int gai_error(struct gaicb *>I<req>B<);>\n"
+"B<int gai_cancel(struct gaicb *>I<req>B<);>\n"
+msgstr ""
+
+#. type: SH
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"The B<getaddrinfo_a>() function performs the same task as "
+"B<getaddrinfo>(3), but allows multiple name look-ups to be performed "
+"asynchronously, with optional notification on completion of look-up "
+"operations."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid "The I<mode> argument has one of the following values:"
+msgstr ""
+
+#. type: TP
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "B<GAI_WAIT>"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"Perform the look-ups synchronously. The call blocks until the look-ups have "
+"completed."
+msgstr ""
+
+#. type: TP
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "B<GAI_NOWAIT>"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"Perform the look-ups asynchronously. The call returns immediately, and the "
+"requests are resolved in the background. See the discussion of the I<sevp> "
+"argument below."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"The array I<list> specifies the look-up requests to process. The I<nitems> "
+"argument specifies the number of elements in I<list>. The requested look-up "
+"operations are started in parallel. NULL elements in I<list> are ignored. "
+"Each request is described by a I<gaicb> structure, defined as follows:"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid ""
+"struct gaicb {\n"
+" const char *ar_name;\n"
+" const char *ar_service;\n"
+" const struct addrinfo *ar_request;\n"
+" struct addrinfo *ar_result;\n"
+"};\n"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"The elements of this structure correspond to the arguments of "
+"B<getaddrinfo>(3). Thus, I<ar_name> corresponds to the I<node> argument and "
+"I<ar_service> to the I<service> argument, identifying an Internet host and a "
+"service. The I<ar_request> element corresponds to the I<hints> argument, "
+"specifying the criteria for selecting the returned socket address "
+"structures. Finally, I<ar_result> corresponds to the I<res> argument; you "
+"do not need to initialize this element, it will be automatically set when "
+"the request is resolved. The I<addrinfo> structure referenced by the last "
+"two elements is described in B<getaddrinfo>(3)."
+msgstr ""
+
+#. type: Plain text
+#: archlinux fedora-40 fedora-rawhide mageia-cauldron
+msgid ""
+"When I<mode> is specified as B<GAI_NOWAIT>, notifications about resolved "
+"requests can be obtained by employing the I<sigevent> structure pointed to "
+"by the I<sevp> argument. For the definition and general details of this "
+"structure, see B<sigevent>(3type). The I<sevp-E<gt>sigev_notify> field can "
+"have the following values:"
+msgstr ""
+
+#. type: TP
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "B<SIGEV_NONE>"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid "Don't provide any notification."
+msgstr ""
+
+#. type: TP
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "B<SIGEV_SIGNAL>"
+msgstr ""
+
+#. si_pid and si_uid are also set, to the values of the calling process,
+#. which doesn't provide useful information, so we'll skip mentioning it.
+#. type: Plain text
+#: archlinux fedora-40 fedora-rawhide mageia-cauldron
+msgid ""
+"When a look-up completes, generate the signal I<sigev_signo> for the "
+"process. See B<sigevent>(3type) for general details. The I<si_code> field "
+"of the I<siginfo_t> structure will be set to B<SI_ASYNCNL>."
+msgstr ""
+
+#. type: TP
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "B<SIGEV_THREAD>"
+msgstr ""
+
+#. type: Plain text
+#: archlinux fedora-40 fedora-rawhide mageia-cauldron
+msgid ""
+"When a look-up completes, invoke I<sigev_notify_function> as if it were the "
+"start function of a new thread. See B<sigevent>(3type) for details."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"For B<SIGEV_SIGNAL> and B<SIGEV_THREAD>, it may be useful to point I<sevp-"
+"E<gt>sigev_value.sival_ptr> to I<list>."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"The B<gai_suspend>() function suspends execution of the calling thread, "
+"waiting for the completion of one or more requests in the array I<list>. "
+"The I<nitems> argument specifies the size of the array I<list>. The call "
+"blocks until one of the following occurs:"
+msgstr ""
+
+#. type: IP
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "\\[bu]"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid "One or more of the operations in I<list> completes."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid "The call is interrupted by a signal that is caught."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"The time interval specified in I<timeout> elapses. This argument specifies "
+"a timeout in seconds plus nanoseconds (see B<nanosleep>(2) for details of "
+"the I<timespec> structure). If I<timeout> is NULL, then the call blocks "
+"indefinitely (until one of the events above occurs)."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"No explicit indication of which request was completed is given; you must "
+"determine which request(s) have completed by iterating with B<gai_error>() "
+"over the list of requests."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"The B<gai_error>() function returns the status of the request I<req>: "
+"either B<EAI_INPROGRESS> if the request was not completed yet, 0 if it was "
+"handled successfully, or an error code if the request could not be resolved."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"The B<gai_cancel>() function cancels the request I<req>. If the request "
+"has been canceled successfully, the error status of the request will be set "
+"to B<EAI_CANCELED> and normal asynchronous notification will be performed. "
+"The request cannot be canceled if it is currently being processed; in that "
+"case, it will be handled as if B<gai_cancel>() has never been called. If "
+"I<req> is NULL, an attempt is made to cancel all outstanding requests that "
+"the process has made."
+msgstr ""
+
+#. type: SH
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "RETURN VALUE"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"The B<getaddrinfo_a>() function returns 0 if all of the requests have been "
+"enqueued successfully, or one of the following nonzero error codes:"
+msgstr ""
+
+#. type: TP
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "B<EAI_AGAIN>"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"The resources necessary to enqueue the look-up requests were not available. "
+"The application may check the error status of each request to determine "
+"which ones failed."
+msgstr ""
+
+#. type: TP
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "B<EAI_MEMORY>"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid "Out of memory."
+msgstr ""
+
+#. type: TP
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "B<EAI_SYSTEM>"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid "I<mode> is invalid."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"The B<gai_suspend>() function returns 0 if at least one of the listed "
+"requests has been completed. Otherwise, it returns one of the following "
+"nonzero error codes:"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"The given timeout expired before any of the requests could be completed."
+msgstr ""
+
+#. type: TP
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "B<EAI_ALLDONE>"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid "There were no actual requests given to the function."
+msgstr ""
+
+#. type: TP
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "B<EAI_INTR>"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"A signal has interrupted the function. Note that this interruption might "
+"have been caused by signal notification of some completed look-up request."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"The B<gai_error>() function can return B<EAI_INPROGRESS> for an unfinished "
+"look-up request, 0 for a successfully completed look-up (as described "
+"above), one of the error codes that could be returned by B<getaddrinfo>(3), "
+"or the error code B<EAI_CANCELED> if the request has been canceled "
+"explicitly before it could be finished."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid "The B<gai_cancel>() function can return one of these values:"
+msgstr ""
+
+#. type: TP
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "B<EAI_CANCELED>"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid "The request has been canceled successfully."
+msgstr ""
+
+#. type: TP
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "B<EAI_NOTCANCELED>"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid "The request has not been canceled."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid "The request has already completed."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"The B<gai_strerror>(3) function translates these error codes to a human "
+"readable string, suitable for error reporting."
+msgstr ""
+
+#. type: SH
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "ATTRIBUTES"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"For an explanation of the terms used in this section, see B<attributes>(7)."
+msgstr ""
+
+#. type: tbl table
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "Interface"
+msgstr ""
+
+#. type: tbl table
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "Attribute"
+msgstr ""
+
+#. type: tbl table
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "Value"
+msgstr ""
+
+#. type: tbl table
+#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
+#: opensuse-tumbleweed
+#, no-wrap
+msgid ".na\n"
+msgstr ""
+
+#. type: tbl table
+#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
+#: opensuse-tumbleweed
+#, no-wrap
+msgid ".nh\n"
+msgstr ""
+
+#. type: tbl table
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid ""
+"B<getaddrinfo_a>(),\n"
+"B<gai_suspend>(),\n"
+"B<gai_error>(),\n"
+"B<gai_cancel>()"
+msgstr ""
+
+#. type: tbl table
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "Thread safety"
+msgstr ""
+
+#. type: tbl table
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "MT-Safe"
+msgstr ""
+
+#. type: SH
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "STANDARDS"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
+#: opensuse-leap-15-6 opensuse-tumbleweed
+msgid "GNU."
+msgstr ""
+
+#. type: SH
+#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
+#: opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "HISTORY"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
+#: opensuse-leap-15-6 opensuse-tumbleweed
+msgid "glibc 2.2.3."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"The interface of B<getaddrinfo_a>() was modeled after the B<lio_listio>(3) "
+"interface."
+msgstr ""
+
+#. type: SH
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "EXAMPLES"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"Two examples are provided: a simple example that resolves several requests "
+"in parallel synchronously, and a complex example showing some of the "
+"asynchronous capabilities."
+msgstr ""
+
+#. type: SS
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "Synchronous example"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"The program below simply resolves several hostnames in parallel, giving a "
+"speed-up compared to resolving the hostnames sequentially using "
+"B<getaddrinfo>(3). The program might be used like this:"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid ""
+"$ B<./a.out mirrors.kernel.org enoent.linuxfoundation.org gnu.org>\n"
+"mirrors.kernel.org: 139.178.88.99\n"
+"enoent.linuxfoundation.org: Name or service not known\n"
+"gnu.org: 209.51.188.116\n"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid "Here is the program source code"
+msgstr ""
+
+#. type: Plain text
+#: archlinux fedora-40 fedora-rawhide mageia-cauldron
+#, no-wrap
+msgid ""
+"#define _GNU_SOURCE\n"
+"#include E<lt>err.hE<gt>\n"
+"#include E<lt>netdb.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"#include E<lt>string.hE<gt>\n"
+"\\&\n"
+"#define MALLOC(n, type) ((type *) reallocarray(NULL, n, sizeof(type)))\n"
+"\\&\n"
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" int ret;\n"
+" struct gaicb *reqs[argc - 1];\n"
+" char host[NI_MAXHOST];\n"
+" struct addrinfo *res;\n"
+"\\&\n"
+" if (argc E<lt> 2) {\n"
+" fprintf(stderr, \"Usage: %s HOST...\\en\", argv[0]);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" for (size_t i = 0; i E<lt> argc - 1; i++) {\n"
+" reqs[i] = MALLOC(1, struct gaicb);\n"
+" if (reqs[i] == NULL)\n"
+" err(EXIT_FAILURE, \"malloc\");\n"
+"\\&\n"
+" memset(reqs[i], 0, sizeof(*reqs[0]));\n"
+" reqs[i]-E<gt>ar_name = argv[i + 1];\n"
+" }\n"
+"\\&\n"
+" ret = getaddrinfo_a(GAI_WAIT, reqs, argc - 1, NULL);\n"
+" if (ret != 0) {\n"
+" fprintf(stderr, \"getaddrinfo_a() failed: %s\\en\",\n"
+" gai_strerror(ret));\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" for (size_t i = 0; i E<lt> argc - 1; i++) {\n"
+" printf(\"%s: \", reqs[i]-E<gt>ar_name);\n"
+" ret = gai_error(reqs[i]);\n"
+" if (ret == 0) {\n"
+" res = reqs[i]-E<gt>ar_result;\n"
+"\\&\n"
+" ret = getnameinfo(res-E<gt>ai_addr, res-E<gt>ai_addrlen,\n"
+" host, sizeof(host),\n"
+" NULL, 0, NI_NUMERICHOST);\n"
+" if (ret != 0) {\n"
+" fprintf(stderr, \"getnameinfo() failed: %s\\en\",\n"
+" gai_strerror(ret));\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+" puts(host);\n"
+"\\&\n"
+" } else {\n"
+" puts(gai_strerror(ret));\n"
+" }\n"
+" }\n"
+" exit(EXIT_SUCCESS);\n"
+"}\n"
+msgstr ""
+
+#. SRC END
+#. type: SS
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "Asynchronous example"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"This example shows a simple interactive B<getaddrinfo_a>() front-end. The "
+"notification facility is not demonstrated."
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid "An example session might look like this:"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid ""
+"$ B<./a.out>\n"
+"E<gt> a mirrors.kernel.org enoent.linuxfoundation.org gnu.org\n"
+"E<gt> c 2\n"
+"[2] gnu.org: Request not canceled\n"
+"E<gt> w 0 1\n"
+"[00] mirrors.kernel.org: Finished\n"
+"E<gt> l\n"
+"[00] mirrors.kernel.org: 139.178.88.99\n"
+"[01] enoent.linuxfoundation.org: Processing request in progress\n"
+"[02] gnu.org: 209.51.188.116\n"
+"E<gt> l\n"
+"[00] mirrors.kernel.org: 139.178.88.99\n"
+"[01] enoent.linuxfoundation.org: Name or service not known\n"
+"[02] gnu.org: 209.51.188.116\n"
+msgstr ""
+
+#. type: Plain text
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+msgid "The program source is as follows:"
+msgstr ""
+
+#. type: Plain text
+#: archlinux fedora-40 fedora-rawhide mageia-cauldron
+#, no-wrap
+msgid ""
+"#define _GNU_SOURCE\n"
+"#include E<lt>assert.hE<gt>\n"
+"#include E<lt>err.hE<gt>\n"
+"#include E<lt>netdb.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"#include E<lt>string.hE<gt>\n"
+"\\&\n"
+"#define CALLOC(n, type) ((type *) calloc(n, sizeof(type)))\n"
+"\\&\n"
+"#define REALLOCF(ptr, n, type) \\e\n"
+"({ \\e\n"
+" static_assert(__builtin_types_compatible_p(typeof(ptr), type *)); \\e\n"
+" \\e\n"
+" (type *) reallocarrayf(ptr, n, sizeof(type)); \\e\n"
+"})\n"
+"\\&\n"
+"static struct gaicb **reqs = NULL;\n"
+"static size_t nreqs = 0;\n"
+"\\&\n"
+"static inline void *\n"
+"reallocarrayf(void *p, size_t nmemb, size_t size)\n"
+"{\n"
+" void *q;\n"
+"\\&\n"
+" q = reallocarray(p, nmemb, size);\n"
+" if (q == NULL && nmemb != 0 && size != 0)\n"
+" free(p);\n"
+" return q;\n"
+"}\n"
+"\\&\n"
+"static char *\n"
+"getcmd(void)\n"
+"{\n"
+" static char buf[256];\n"
+"\\&\n"
+" fputs(\"E<gt> \", stdout); fflush(stdout);\n"
+" if (fgets(buf, sizeof(buf), stdin) == NULL)\n"
+" return NULL;\n"
+"\\&\n"
+" if (buf[strlen(buf) - 1] == \\[aq]\\en\\[aq])\n"
+" buf[strlen(buf) - 1] = 0;\n"
+"\\&\n"
+" return buf;\n"
+"}\n"
+"\\&\n"
+"/* Add requests for specified hostnames. */\n"
+"static void\n"
+"add_requests(void)\n"
+"{\n"
+" size_t nreqs_base = nreqs;\n"
+" char *host;\n"
+" int ret;\n"
+"\\&\n"
+" while ((host = strtok(NULL, \" \"))) {\n"
+" nreqs++;\n"
+" reqs = REALLOCF(reqs, nreqs, struct gaicb *);\n"
+" if (reqs == NULL)\n"
+" err(EXIT_FAILURE, \"reallocf\");\n"
+"\\&\n"
+" reqs[nreqs - 1] = CALLOC(1, struct gaicb);\n"
+" if (reqs[nreqs - 1] == NULL)\n"
+" err(EXIT_FAILURE, \"calloc\");\n"
+"\\&\n"
+" reqs[nreqs - 1]-E<gt>ar_name = strdup(host);\n"
+" }\n"
+"\\&\n"
+" /* Queue nreqs_base..nreqs requests. */\n"
+"\\&\n"
+" ret = getaddrinfo_a(GAI_NOWAIT, &reqs[nreqs_base],\n"
+" nreqs - nreqs_base, NULL);\n"
+" if (ret) {\n"
+" fprintf(stderr, \"getaddrinfo_a() failed: %s\\en\",\n"
+" gai_strerror(ret));\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"}\n"
+"\\&\n"
+"/* Wait until at least one of specified requests completes. */\n"
+"static void\n"
+"wait_requests(void)\n"
+"{\n"
+" char *id;\n"
+" int ret;\n"
+" size_t n;\n"
+" struct gaicb const **wait_reqs;\n"
+"\\&\n"
+" wait_reqs = CALLOC(nreqs, const struct gaicb *);\n"
+" if (wait_reqs == NULL)\n"
+" err(EXIT_FAILURE, \"calloc\");\n"
+"\\&\n"
+" /* NULL elements are ignored by gai_suspend(). */\n"
+"\\&\n"
+" while ((id = strtok(NULL, \" \")) != NULL) {\n"
+" n = atoi(id);\n"
+"\\&\n"
+" if (n E<gt>= nreqs) {\n"
+" printf(\"Bad request number: %s\\en\", id);\n"
+" return;\n"
+" }\n"
+"\\&\n"
+" wait_reqs[n] = reqs[n];\n"
+" }\n"
+"\\&\n"
+" ret = gai_suspend(wait_reqs, nreqs, NULL);\n"
+" if (ret) {\n"
+" printf(\"gai_suspend(): %s\\en\", gai_strerror(ret));\n"
+" return;\n"
+" }\n"
+"\\&\n"
+" for (size_t i = 0; i E<lt> nreqs; i++) {\n"
+" if (wait_reqs[i] == NULL)\n"
+" continue;\n"
+"\\&\n"
+" ret = gai_error(reqs[i]);\n"
+" if (ret == EAI_INPROGRESS)\n"
+" continue;\n"
+"\\&\n"
+" printf(\"[%02zu] %s: %s\\en\", i, reqs[i]-E<gt>ar_name,\n"
+" ret == 0 ? \"Finished\" : gai_strerror(ret));\n"
+" }\n"
+"}\n"
+"\\&\n"
+"/* Cancel specified requests. */\n"
+"static void\n"
+"cancel_requests(void)\n"
+"{\n"
+" char *id;\n"
+" int ret;\n"
+" size_t n;\n"
+"\\&\n"
+" while ((id = strtok(NULL, \" \")) != NULL) {\n"
+" n = atoi(id);\n"
+"\\&\n"
+" if (n E<gt>= nreqs) {\n"
+" printf(\"Bad request number: %s\\en\", id);\n"
+" return;\n"
+" }\n"
+"\\&\n"
+" ret = gai_cancel(reqs[n]);\n"
+" printf(\"[%s] %s: %s\\en\", id, reqs[atoi(id)]-E<gt>ar_name,\n"
+" gai_strerror(ret));\n"
+" }\n"
+"}\n"
+"\\&\n"
+"/* List all requests. */\n"
+"static void\n"
+"list_requests(void)\n"
+"{\n"
+" int ret;\n"
+" char host[NI_MAXHOST];\n"
+" struct addrinfo *res;\n"
+"\\&\n"
+" for (size_t i = 0; i E<lt> nreqs; i++) {\n"
+" printf(\"[%02zu] %s: \", i, reqs[i]-E<gt>ar_name);\n"
+" ret = gai_error(reqs[i]);\n"
+"\\&\n"
+" if (!ret) {\n"
+" res = reqs[i]-E<gt>ar_result;\n"
+"\\&\n"
+" ret = getnameinfo(res-E<gt>ai_addr, res-E<gt>ai_addrlen,\n"
+" host, sizeof(host),\n"
+" NULL, 0, NI_NUMERICHOST);\n"
+" if (ret) {\n"
+" fprintf(stderr, \"getnameinfo() failed: %s\\en\",\n"
+" gai_strerror(ret));\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+" puts(host);\n"
+" } else {\n"
+" puts(gai_strerror(ret));\n"
+" }\n"
+" }\n"
+"}\n"
+"\\&\n"
+"int\n"
+"main(void)\n"
+"{\n"
+" char *cmdline;\n"
+" char *cmd;\n"
+"\\&\n"
+" while ((cmdline = getcmd()) != NULL) {\n"
+" cmd = strtok(cmdline, \" \");\n"
+"\\&\n"
+" if (cmd == NULL) {\n"
+" list_requests();\n"
+" } else {\n"
+" switch (cmd[0]) {\n"
+" case \\[aq]a\\[aq]:\n"
+" add_requests();\n"
+" break;\n"
+" case \\[aq]w\\[aq]:\n"
+" wait_requests();\n"
+" break;\n"
+" case \\[aq]c\\[aq]:\n"
+" cancel_requests();\n"
+" break;\n"
+" case \\[aq]l\\[aq]:\n"
+" list_requests();\n"
+" break;\n"
+" default:\n"
+" fprintf(stderr, \"Bad command: %c\\en\", cmd[0]);\n"
+" break;\n"
+" }\n"
+" }\n"
+" }\n"
+" exit(EXIT_SUCCESS);\n"
+"}\n"
+msgstr ""
+
+#. SRC END
+#. type: SH
+#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
+#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
+#, no-wrap
+msgid "SEE ALSO"
+msgstr ""
+
+#. type: Plain text
+#: archlinux fedora-40 fedora-rawhide mageia-cauldron
+msgid ""
+"B<getaddrinfo>(3), B<inet>(3), B<lio_listio>(3), B<hostname>(7), B<ip>(7), "
+"B<sigevent>(3type)"
+msgstr ""
+
+#. type: TH
+#: debian-bookworm
+#, no-wrap
+msgid "2023-02-05"
+msgstr ""
+
+#. type: TH
+#: debian-bookworm
+#, no-wrap
+msgid "Linux man-pages 6.03"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"When I<mode> is specified as B<GAI_NOWAIT>, notifications about resolved "
+"requests can be obtained by employing the I<sigevent> structure pointed to "
+"by the I<sevp> argument. For the definition and general details of this "
+"structure, see B<sigevent>(7). The I<sevp-E<gt>sigev_notify> field can have "
+"the following values:"
+msgstr ""
+
+#. si_pid and si_uid are also set, to the values of the calling process,
+#. which doesn't provide useful information, so we'll skip mentioning it.
+#. type: Plain text
+#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"When a look-up completes, generate the signal I<sigev_signo> for the "
+"process. See B<sigevent>(7) for general details. The I<si_code> field of "
+"the I<siginfo_t> structure will be set to B<SI_ASYNCNL>."
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"When a look-up completes, invoke I<sigev_notify_function> as if it were the "
+"start function of a new thread. See B<sigevent>(7) for details."
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm
+msgid "These functions are GNU extensions; they first appeared in glibc 2.2.3."
+msgstr ""
+
+#. type: SH
+#: debian-bookworm
+#, no-wrap
+msgid "NOTES"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+"#define _GNU_SOURCE\n"
+"#include E<lt>netdb.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"#include E<lt>string.hE<gt>\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" int ret;\n"
+" struct gaicb *reqs[argc - 1];\n"
+" char host[NI_MAXHOST];\n"
+" struct addrinfo *res;\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" if (argc E<lt> 2) {\n"
+" fprintf(stderr, \"Usage: %s HOST...\\en\", argv[0]);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" for (size_t i = 0; i E<lt> argc - 1; i++) {\n"
+" reqs[i] = malloc(sizeof(*reqs[0]));\n"
+" if (reqs[i] == NULL) {\n"
+" perror(\"malloc\");\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+" memset(reqs[i], 0, sizeof(*reqs[0]));\n"
+" reqs[i]-E<gt>ar_name = argv[i + 1];\n"
+" }\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" ret = getaddrinfo_a(GAI_WAIT, reqs, argc - 1, NULL);\n"
+" if (ret != 0) {\n"
+" fprintf(stderr, \"getaddrinfo_a() failed: %s\\en\",\n"
+" gai_strerror(ret));\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" for (size_t i = 0; i E<lt> argc - 1; i++) {\n"
+" printf(\"%s: \", reqs[i]-E<gt>ar_name);\n"
+" ret = gai_error(reqs[i]);\n"
+" if (ret == 0) {\n"
+" res = reqs[i]-E<gt>ar_result;\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" ret = getnameinfo(res-E<gt>ai_addr, res-E<gt>ai_addrlen,\n"
+" host, sizeof(host),\n"
+" NULL, 0, NI_NUMERICHOST);\n"
+" if (ret != 0) {\n"
+" fprintf(stderr, \"getnameinfo() failed: %s\\en\",\n"
+" gai_strerror(ret));\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+" puts(host);\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" } else {\n"
+" puts(gai_strerror(ret));\n"
+" }\n"
+" }\n"
+" exit(EXIT_SUCCESS);\n"
+"}\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+"static struct gaicb **reqs = NULL;\n"
+"static size_t nreqs = 0;\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+"static char *\n"
+"getcmd(void)\n"
+"{\n"
+" static char buf[256];\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" fputs(\"E<gt> \", stdout); fflush(stdout);\n"
+" if (fgets(buf, sizeof(buf), stdin) == NULL)\n"
+" return NULL;\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" if (buf[strlen(buf) - 1] == \\[aq]\\en\\[aq])\n"
+" buf[strlen(buf) - 1] = 0;\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" return buf;\n"
+"}\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+"/* Add requests for specified hostnames. */\n"
+"static void\n"
+"add_requests(void)\n"
+"{\n"
+" size_t nreqs_base = nreqs;\n"
+" char *host;\n"
+" int ret;\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" while ((host = strtok(NULL, \" \"))) {\n"
+" nreqs++;\n"
+" reqs = realloc(reqs, sizeof(reqs[0]) * nreqs);\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" reqs[nreqs - 1] = calloc(1, sizeof(*reqs[0]));\n"
+" reqs[nreqs - 1]-E<gt>ar_name = strdup(host);\n"
+" }\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid " /* Queue nreqs_base..nreqs requests. */\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" ret = getaddrinfo_a(GAI_NOWAIT, &reqs[nreqs_base],\n"
+" nreqs - nreqs_base, NULL);\n"
+" if (ret) {\n"
+" fprintf(stderr, \"getaddrinfo_a() failed: %s\\en\",\n"
+" gai_strerror(ret));\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"}\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+"/* Wait until at least one of specified requests completes. */\n"
+"static void\n"
+"wait_requests(void)\n"
+"{\n"
+" char *id;\n"
+" int ret;\n"
+" size_t n;\n"
+" struct gaicb const **wait_reqs = calloc(nreqs, sizeof(*wait_reqs));\n"
+" /* NULL elements are ignored by gai_suspend(). */\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" while ((id = strtok(NULL, \" \")) != NULL) {\n"
+" n = atoi(id);\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" if (n E<gt>= nreqs) {\n"
+" printf(\"Bad request number: %s\\en\", id);\n"
+" return;\n"
+" }\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" wait_reqs[n] = reqs[n];\n"
+" }\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" ret = gai_suspend(wait_reqs, nreqs, NULL);\n"
+" if (ret) {\n"
+" printf(\"gai_suspend(): %s\\en\", gai_strerror(ret));\n"
+" return;\n"
+" }\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" for (size_t i = 0; i E<lt> nreqs; i++) {\n"
+" if (wait_reqs[i] == NULL)\n"
+" continue;\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" ret = gai_error(reqs[i]);\n"
+" if (ret == EAI_INPROGRESS)\n"
+" continue;\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" printf(\"[%02zu] %s: %s\\en\", i, reqs[i]-E<gt>ar_name,\n"
+" ret == 0 ? \"Finished\" : gai_strerror(ret));\n"
+" }\n"
+"}\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+"/* Cancel specified requests. */\n"
+"static void\n"
+"cancel_requests(void)\n"
+"{\n"
+" char *id;\n"
+" int ret;\n"
+" size_t n;\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" ret = gai_cancel(reqs[n]);\n"
+" printf(\"[%s] %s: %s\\en\", id, reqs[atoi(id)]-E<gt>ar_name,\n"
+" gai_strerror(ret));\n"
+" }\n"
+"}\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+"/* List all requests. */\n"
+"static void\n"
+"list_requests(void)\n"
+"{\n"
+" int ret;\n"
+" char host[NI_MAXHOST];\n"
+" struct addrinfo *res;\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" for (size_t i = 0; i E<lt> nreqs; i++) {\n"
+" printf(\"[%02zu] %s: \", i, reqs[i]-E<gt>ar_name);\n"
+" ret = gai_error(reqs[i]);\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" if (!ret) {\n"
+" res = reqs[i]-E<gt>ar_result;\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" ret = getnameinfo(res-E<gt>ai_addr, res-E<gt>ai_addrlen,\n"
+" host, sizeof(host),\n"
+" NULL, 0, NI_NUMERICHOST);\n"
+" if (ret) {\n"
+" fprintf(stderr, \"getnameinfo() failed: %s\\en\",\n"
+" gai_strerror(ret));\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+" puts(host);\n"
+" } else {\n"
+" puts(gai_strerror(ret));\n"
+" }\n"
+" }\n"
+"}\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+"int\n"
+"main(void)\n"
+"{\n"
+" char *cmdline;\n"
+" char *cmd;\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" while ((cmdline = getcmd()) != NULL) {\n"
+" cmd = strtok(cmdline, \" \");\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm opensuse-leap-15-6
+#, no-wrap
+msgid ""
+" if (cmd == NULL) {\n"
+" list_requests();\n"
+" } else {\n"
+" switch (cmd[0]) {\n"
+" case \\[aq]a\\[aq]:\n"
+" add_requests();\n"
+" break;\n"
+" case \\[aq]w\\[aq]:\n"
+" wait_requests();\n"
+" break;\n"
+" case \\[aq]c\\[aq]:\n"
+" cancel_requests();\n"
+" break;\n"
+" case \\[aq]l\\[aq]:\n"
+" list_requests();\n"
+" break;\n"
+" default:\n"
+" fprintf(stderr, \"Bad command: %c\\en\", cmd[0]);\n"
+" break;\n"
+" }\n"
+" }\n"
+" }\n"
+" exit(EXIT_SUCCESS);\n"
+"}\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed
+msgid ""
+"B<getaddrinfo>(3), B<inet>(3), B<lio_listio>(3), B<hostname>(7), B<ip>(7), "
+"B<sigevent>(7)"
+msgstr ""
+
+#. type: TH
+#: debian-unstable opensuse-tumbleweed
+#, no-wrap
+msgid "2023-07-20"
+msgstr ""
+
+#. type: TH
+#: debian-unstable opensuse-tumbleweed
+#, no-wrap
+msgid "Linux man-pages 6.05.01"
+msgstr ""
+
+#. type: Plain text
+#: debian-unstable opensuse-tumbleweed
+#, no-wrap
+msgid ""
+"#define _GNU_SOURCE\n"
+"#include E<lt>netdb.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"#include E<lt>string.hE<gt>\n"
+"\\&\n"
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" int ret;\n"
+" struct gaicb *reqs[argc - 1];\n"
+" char host[NI_MAXHOST];\n"
+" struct addrinfo *res;\n"
+"\\&\n"
+" if (argc E<lt> 2) {\n"
+" fprintf(stderr, \"Usage: %s HOST...\\en\", argv[0]);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" for (size_t i = 0; i E<lt> argc - 1; i++) {\n"
+" reqs[i] = malloc(sizeof(*reqs[0]));\n"
+" if (reqs[i] == NULL) {\n"
+" perror(\"malloc\");\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+" memset(reqs[i], 0, sizeof(*reqs[0]));\n"
+" reqs[i]-E<gt>ar_name = argv[i + 1];\n"
+" }\n"
+"\\&\n"
+" ret = getaddrinfo_a(GAI_WAIT, reqs, argc - 1, NULL);\n"
+" if (ret != 0) {\n"
+" fprintf(stderr, \"getaddrinfo_a() failed: %s\\en\",\n"
+" gai_strerror(ret));\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" for (size_t i = 0; i E<lt> argc - 1; i++) {\n"
+" printf(\"%s: \", reqs[i]-E<gt>ar_name);\n"
+" ret = gai_error(reqs[i]);\n"
+" if (ret == 0) {\n"
+" res = reqs[i]-E<gt>ar_result;\n"
+"\\&\n"
+" ret = getnameinfo(res-E<gt>ai_addr, res-E<gt>ai_addrlen,\n"
+" host, sizeof(host),\n"
+" NULL, 0, NI_NUMERICHOST);\n"
+" if (ret != 0) {\n"
+" fprintf(stderr, \"getnameinfo() failed: %s\\en\",\n"
+" gai_strerror(ret));\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+" puts(host);\n"
+"\\&\n"
+" } else {\n"
+" puts(gai_strerror(ret));\n"
+" }\n"
+" }\n"
+" exit(EXIT_SUCCESS);\n"
+"}\n"
+msgstr ""
+
+#. type: Plain text
+#: debian-unstable opensuse-tumbleweed
+#, no-wrap
+msgid ""
+"#define _GNU_SOURCE\n"
+"#include E<lt>netdb.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"#include E<lt>string.hE<gt>\n"
+"\\&\n"
+"static struct gaicb **reqs = NULL;\n"
+"static size_t nreqs = 0;\n"
+"\\&\n"
+"static char *\n"
+"getcmd(void)\n"
+"{\n"
+" static char buf[256];\n"
+"\\&\n"
+" fputs(\"E<gt> \", stdout); fflush(stdout);\n"
+" if (fgets(buf, sizeof(buf), stdin) == NULL)\n"
+" return NULL;\n"
+"\\&\n"
+" if (buf[strlen(buf) - 1] == \\[aq]\\en\\[aq])\n"
+" buf[strlen(buf) - 1] = 0;\n"
+"\\&\n"
+" return buf;\n"
+"}\n"
+"\\&\n"
+"/* Add requests for specified hostnames. */\n"
+"static void\n"
+"add_requests(void)\n"
+"{\n"
+" size_t nreqs_base = nreqs;\n"
+" char *host;\n"
+" int ret;\n"
+"\\&\n"
+" while ((host = strtok(NULL, \" \"))) {\n"
+" nreqs++;\n"
+" reqs = realloc(reqs, sizeof(reqs[0]) * nreqs);\n"
+"\\&\n"
+" reqs[nreqs - 1] = calloc(1, sizeof(*reqs[0]));\n"
+" reqs[nreqs - 1]-E<gt>ar_name = strdup(host);\n"
+" }\n"
+"\\&\n"
+" /* Queue nreqs_base..nreqs requests. */\n"
+"\\&\n"
+" ret = getaddrinfo_a(GAI_NOWAIT, &reqs[nreqs_base],\n"
+" nreqs - nreqs_base, NULL);\n"
+" if (ret) {\n"
+" fprintf(stderr, \"getaddrinfo_a() failed: %s\\en\",\n"
+" gai_strerror(ret));\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"}\n"
+"\\&\n"
+"/* Wait until at least one of specified requests completes. */\n"
+"static void\n"
+"wait_requests(void)\n"
+"{\n"
+" char *id;\n"
+" int ret;\n"
+" size_t n;\n"
+" struct gaicb const **wait_reqs = calloc(nreqs, sizeof(*wait_reqs));\n"
+" /* NULL elements are ignored by gai_suspend(). */\n"
+"\\&\n"
+" while ((id = strtok(NULL, \" \")) != NULL) {\n"
+" n = atoi(id);\n"
+"\\&\n"
+" if (n E<gt>= nreqs) {\n"
+" printf(\"Bad request number: %s\\en\", id);\n"
+" return;\n"
+" }\n"
+"\\&\n"
+" wait_reqs[n] = reqs[n];\n"
+" }\n"
+"\\&\n"
+" ret = gai_suspend(wait_reqs, nreqs, NULL);\n"
+" if (ret) {\n"
+" printf(\"gai_suspend(): %s\\en\", gai_strerror(ret));\n"
+" return;\n"
+" }\n"
+"\\&\n"
+" for (size_t i = 0; i E<lt> nreqs; i++) {\n"
+" if (wait_reqs[i] == NULL)\n"
+" continue;\n"
+"\\&\n"
+" ret = gai_error(reqs[i]);\n"
+" if (ret == EAI_INPROGRESS)\n"
+" continue;\n"
+"\\&\n"
+" printf(\"[%02zu] %s: %s\\en\", i, reqs[i]-E<gt>ar_name,\n"
+" ret == 0 ? \"Finished\" : gai_strerror(ret));\n"
+" }\n"
+"}\n"
+"\\&\n"
+"/* Cancel specified requests. */\n"
+"static void\n"
+"cancel_requests(void)\n"
+"{\n"
+" char *id;\n"
+" int ret;\n"
+" size_t n;\n"
+"\\&\n"
+" while ((id = strtok(NULL, \" \")) != NULL) {\n"
+" n = atoi(id);\n"
+"\\&\n"
+" if (n E<gt>= nreqs) {\n"
+" printf(\"Bad request number: %s\\en\", id);\n"
+" return;\n"
+" }\n"
+"\\&\n"
+" ret = gai_cancel(reqs[n]);\n"
+" printf(\"[%s] %s: %s\\en\", id, reqs[atoi(id)]-E<gt>ar_name,\n"
+" gai_strerror(ret));\n"
+" }\n"
+"}\n"
+"\\&\n"
+"/* List all requests. */\n"
+"static void\n"
+"list_requests(void)\n"
+"{\n"
+" int ret;\n"
+" char host[NI_MAXHOST];\n"
+" struct addrinfo *res;\n"
+"\\&\n"
+" for (size_t i = 0; i E<lt> nreqs; i++) {\n"
+" printf(\"[%02zu] %s: \", i, reqs[i]-E<gt>ar_name);\n"
+" ret = gai_error(reqs[i]);\n"
+"\\&\n"
+" if (!ret) {\n"
+" res = reqs[i]-E<gt>ar_result;\n"
+"\\&\n"
+" ret = getnameinfo(res-E<gt>ai_addr, res-E<gt>ai_addrlen,\n"
+" host, sizeof(host),\n"
+" NULL, 0, NI_NUMERICHOST);\n"
+" if (ret) {\n"
+" fprintf(stderr, \"getnameinfo() failed: %s\\en\",\n"
+" gai_strerror(ret));\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+" puts(host);\n"
+" } else {\n"
+" puts(gai_strerror(ret));\n"
+" }\n"
+" }\n"
+"}\n"
+"\\&\n"
+"int\n"
+"main(void)\n"
+"{\n"
+" char *cmdline;\n"
+" char *cmd;\n"
+"\\&\n"
+" while ((cmdline = getcmd()) != NULL) {\n"
+" cmd = strtok(cmdline, \" \");\n"
+"\\&\n"
+" if (cmd == NULL) {\n"
+" list_requests();\n"
+" } else {\n"
+" switch (cmd[0]) {\n"
+" case \\[aq]a\\[aq]:\n"
+" add_requests();\n"
+" break;\n"
+" case \\[aq]w\\[aq]:\n"
+" wait_requests();\n"
+" break;\n"
+" case \\[aq]c\\[aq]:\n"
+" cancel_requests();\n"
+" break;\n"
+" case \\[aq]l\\[aq]:\n"
+" list_requests();\n"
+" break;\n"
+" default:\n"
+" fprintf(stderr, \"Bad command: %c\\en\", cmd[0]);\n"
+" break;\n"
+" }\n"
+" }\n"
+" }\n"
+" exit(EXIT_SUCCESS);\n"
+"}\n"
+msgstr ""
+
+#. type: TH
+#: opensuse-leap-15-6
+#, no-wrap
+msgid "2023-03-30"
+msgstr ""
+
+#. type: TH
+#: opensuse-leap-15-6
+#, no-wrap
+msgid "Linux man-pages 6.04"
+msgstr ""