summaryrefslogtreecommitdiffstats
path: root/docs/nspr/reference/pr_netaddrtostring.rst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /docs/nspr/reference/pr_netaddrtostring.rst
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/nspr/reference/pr_netaddrtostring.rst')
-rw-r--r--docs/nspr/reference/pr_netaddrtostring.rst50
1 files changed, 50 insertions, 0 deletions
diff --git a/docs/nspr/reference/pr_netaddrtostring.rst b/docs/nspr/reference/pr_netaddrtostring.rst
new file mode 100644
index 0000000000..d21f4d5ecc
--- /dev/null
+++ b/docs/nspr/reference/pr_netaddrtostring.rst
@@ -0,0 +1,50 @@
+PR_NetAddrToString
+==================
+
+Converts a character string to a network address.
+
+
+Syntax
+------
+
+.. code::
+
+ #include <prnetdb.h>
+
+ PRStatus PR_NetAddrToString(
+ const PRNetAddr *addr,
+ char *string,
+ PRUint32 size);
+
+
+Parameters
+~~~~~~~~~~
+
+The function has the following parameters:
+
+``addr``
+ A pointer to the network address to be converted.
+``string``
+ A buffer that will hold the converted string on output.
+``size``
+ The size of the result buffer (``string``).
+
+
+Returns
+~~~~~~~
+
+The function returns one of the following values:
+
+- If successful, ``PR_SUCCESS``.
+- If unsuccessful, ``PR_FAILURE``. You can retrieve the reason for the
+ failure by calling :ref:`PR_GetError`.
+
+
+Description
+-----------
+
+The network address to be converted (``addr``) may be either an IPv4 or
+IPv6 address structure, assuming that the NSPR library and the host
+system are both configured to utilize IPv6 addressing. If ``addr`` is an
+IPv4 address, ``size`` needs to be at least 16. If ``addr`` is an IPv6
+address, ``size`` needs to be at least 46.