Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

OSS Library Calls (g - h) getnetent_r(3)
NAME
getnetent_r - Gets the next entry in the network database (reentrant)
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
32-bit H-series and J-series OSS processes that do not use the Standard POSIX Thread library: |
/G/system/zdllnnn/zinetdll |
64-bit H-series and J-series OSS processes that do not use the Standard POSIX Thread library: |
/G/system/zdllnnn/yinetdll |
H-series and J-series OSS processes that use the Standard POSIX Thread library:
/G/system/zdllnnn/zsptdll
(See NOTES)
SYNOPSIS
#include <netdb.h>
[#include <spthread.h>] /* Required if using Standard POSIX Threads Library */
struct netent *getnetent_r (
struct netent *ret,
char *buffer,
int buflen);
PARAMETERS
ret Points to a netent structure allocated by the caller.
buffer Points to the buffer supplied by the caller and used as a storage space for
returned data.
buflen Specifies the size of the buffer passed in bytes.
DESCRIPTION
The getnetent_r() function is the reentrant version of the getnetent( ) function and performs the
same function. However, the getnetent( ) function uses buffers that are supplied by the caller of
the function to store returned results.
The ret parameter must be a pointer to a struct netent structure allocated by the caller. On suc-
cessful completion, the function returns the network entry in this structure. The buffer parameter
must be a pointer to a buffer supplied by the caller. This buffer is used as storage space for the
host data. All of the pointers within the returned struct netent ret point to data stored within this
buffer. The buffer must be large enough to hold all of the data associated with the host entry. For
H06.21 and later H-series RVUs and J06.10 and later J-series RVUs, HP recommends that the
size of the buffer, indicated by the buflen parameter, be equal or greater than the size of the
netent_data structure.
If multiple threads interleave calls to getnetbyname_r( ), getnetbyaddr_r( ), getnetent_r( ) and
their base versions, the threads enumerate disjoint subsets of the networks database.
NOTES
On systems running H-series RVUs earlier than H06.21, J-series RVUs earlier than J06.10, or
G-series RVUs (native OSS processes only), follow the instructions for using the Standard
POSIX Threads library.
On systems running H06.21 or later H-series RVUs or J06.10 or later J-series RVUs, you can use
either the POSIX User Thread Model library or the Standard POSIX Threads library for threaded
applications.
On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use |
this function with 32-bit applications or 64-bit applications unless you are using the Standard |
POSIX Threads Library.
527187-017 Hewlett-Packard Company 393