summaryrefslogtreecommitdiffstats
path: root/docs/nspr/reference/pr_enumeratehostent.rst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
commit9e3c08db40b8916968b9f30096c7be3f00ce9647 (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /docs/nspr/reference/pr_enumeratehostent.rst
parentInitial commit. (diff)
downloadthunderbird-upstream.tar.xz
thunderbird-upstream.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/nspr/reference/pr_enumeratehostent.rst')
-rw-r--r--docs/nspr/reference/pr_enumeratehostent.rst61
1 files changed, 61 insertions, 0 deletions
diff --git a/docs/nspr/reference/pr_enumeratehostent.rst b/docs/nspr/reference/pr_enumeratehostent.rst
new file mode 100644
index 0000000000..a808730330
--- /dev/null
+++ b/docs/nspr/reference/pr_enumeratehostent.rst
@@ -0,0 +1,61 @@
+PR_EnumerateHostEnt
+===================
+
+Evaluates each of the possible addresses of a :ref:`PRHostEnt` structure,
+acquired from :ref:`PR_GetHostByName` or :ref:`PR_GetHostByAddr`.
+
+
+Syntax
+------
+
+.. code::
+
+ #include <prnetdb.h>
+
+ PRIntn PR_EnumerateHostEnt(
+ PRIntn enumIndex,
+ const PRHostEnt *hostEnt,
+ PRUint16 port,
+ PRNetAddr *address);
+
+
+Parameters
+~~~~~~~~~~
+
+The function has the following parameters:
+
+``enumIndex``
+ The index of the enumeration. To begin an enumeration, this argument
+ is set to zero. To continue an enumeration (thereby getting
+ successive addresses from the host entry structure), the value should
+ be set to the function's last returned value. The enumeration is
+ complete when a value of zero is returned.
+``hostEnt``
+ A pointer to a :ref:`PRHostEnt` structure obtained from
+ :ref:`PR_GetHostByName` or :ref:`PR_GetHostByAddr`.
+``port``
+ The port number to be assigned as part of the :ref:`PRNetAddr`
+ structure. This parameter is not checked for validity.
+``address``
+ On input, a pointer to a :ref:`PRNetAddr` structure. On output, this
+ structure is filled in by the runtime if the result of the call is
+ greater than 0.
+
+
+Returns
+~~~~~~~
+
+The function returns one of the following values:
+
+- If successful, the function returns the value you should specify in
+ the ``enumIndex`` parameter for the next call of the enumerator. If
+ the function returns 0, the enumeration is ended.
+- If unsuccessful, the function returns -1. You can retrieve the reason
+ for the failure by calling :ref:`PR_GetError`.
+
+
+Description
+-----------
+
+:ref:`PR_EnumerateHostEnt` is a stateless enumerator. The principle input,
+the :ref:`PRHostEnt` structure, is not modified.