pr_enumerateaddrinfo.rst (1521B)
1 PR_EnumerateAddrInfo 2 ==================== 3 4 5 Enumerates each of the possible network addresses of a ``PRAddrInfo`` 6 structure, acquired from :ref:`PR_GetAddrInfoByName`. 7 8 9 Syntax 10 ~~~~~~ 11 12 .. code:: 13 14 #include <prnetdb.h> 15 16 void *PR_EnumerateAddrInfo( 17 void *enumPtr, 18 const PRAddrInfo *addrInfo, 19 PRUint16 port, 20 PRNetAddr *result); 21 22 23 Parameters 24 ~~~~~~~~~~ 25 26 The function has the following parameters: 27 28 ``enumPtr`` 29 The index pointer of the enumeration. To begin an enumeration, this 30 argument is set to ``NULL``. To continue an enumeration (thereby 31 getting successive addresses from the ``PRAddrInfo`` structure), the 32 value should be set to the function's last returned value. The 33 enumeration is complete when a value of ``NULL`` is returned. 34 ``addrInfo`` 35 A pointer to a ``PRAddrInfo`` structure returned by 36 :ref:`PR_GetAddrInfoByName`. 37 ``port`` 38 The port number to be assigned as part of the :ref:`PRNetAddr` 39 structure. This parameter is not checked for validity. 40 ``result`` 41 On input, a pointer to a :ref:`PRNetAddr` structure. On output, this 42 structure is filled in by the runtime if the result of the call is 43 not ``NULL``. 44 45 46 Returns 47 ~~~~~~~ 48 49 The function returns the value you should specify in the ``enumPtr`` 50 parameter for the next call of the enumerator. If the function returns 51 ``NULL``, the enumeration is ended. 52 53 54 Description 55 ----------- 56 57 :ref:`PR_EnumerateAddrInfo` is a stateless enumerator. The principle input, 58 the ``PRAddrInfo`` structure, is not modified.