File: pr_enumerateaddrinfo.rst

package info (click to toggle)
firefox-esr 115.14.0esr-1~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,659,200 kB
  • sloc: cpp: 6,676,648; javascript: 5,690,850; ansic: 3,328,545; python: 1,120,605; asm: 397,163; xml: 180,531; java: 178,838; sh: 68,930; makefile: 20,999; perl: 12,595; objc: 12,561; yacc: 4,583; cs: 3,846; pascal: 2,840; lex: 1,720; ruby: 1,079; exp: 762; php: 436; lisp: 258; awk: 247; sql: 66; sed: 54; csh: 10
file content (58 lines) | stat: -rw-r--r-- 1,521 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
PR_EnumerateAddrInfo
====================


Enumerates each of the possible network addresses of a ``PRAddrInfo``
structure, acquired from :ref:`PR_GetAddrInfoByName`.


Syntax
~~~~~~

.. code::

   #include <prnetdb.h>

   void *PR_EnumerateAddrInfo(
     void *enumPtr,
     const PRAddrInfo *addrInfo,
     PRUint16 port,
     PRNetAddr *result);


Parameters
~~~~~~~~~~

The function has the following parameters:

``enumPtr``
   The index pointer of the enumeration. To begin an enumeration, this
   argument is set to ``NULL``. To continue an enumeration (thereby
   getting successive addresses from the ``PRAddrInfo`` structure), the
   value should be set to the function's last returned value. The
   enumeration is complete when a value of ``NULL`` is returned.
``addrInfo``
   A pointer to a ``PRAddrInfo`` structure returned by
   :ref:`PR_GetAddrInfoByName`.
``port``
   The port number to be assigned as part of the :ref:`PRNetAddr`
   structure. This parameter is not checked for validity.
``result``
   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
   not ``NULL``.


Returns
~~~~~~~

The function returns the value you should specify in the ``enumPtr``
parameter for the next call of the enumerator. If the function returns
``NULL``, the enumeration is ended.


Description
-----------

:ref:`PR_EnumerateAddrInfo` is a stateless enumerator. The principle input,
the ``PRAddrInfo`` structure, is not modified.