IPX/SPX Programming Manual

Library Routines
HP NonStop IPX/SPX Programming Manual528022-001
5-28
getsockopt, getsockopt_nw
level
is the socket level at which the socket option is being managed. The only possible
socket-level option value is SOL_SOCKET.
optname
is the socket option name. Possible values are:
optval_ptr
points to the value of the socket option specified by optname, which is passed to
the level specified in level. Types and lengths of getsockopt socket option
values are described in setsockopt, setsockopt_nw on page 5-49.
optlen_ptr
points, on return from the getsockopt routine, to the length of the value pointed to
by optval_ptr. The value is zero for the getsockopt_nw routine because this
parameter has no meaning for this routine; the length is not known until the
AWAITIOX call is completed.
tag
is the tag parameter to be used for the nowait operation initiated by
getsockopt_nw.
Errors
If an error occurs, the external variable errno is set to the following value:
Usage Guidelines
Use getsockopt on a socket created for waited operations, or getsockopt_nw
on a socket created for nowait operations. The operation initiated by
getsockopt_nw must be completed with a call to the AWAITIOX procedure.
The operation initiated by getsockopt_nw must be completed with a call to the
Guardian AWAITIOX procedure.
For information about error checking, see Nowait Call Errors on page 5-5.
SO_ERROR Socket error.
SO_LINGER Get the value of the SO_LINGER flag. For details, see
setsockopt, setsockopt_nw on page 5-49.
SO_KEEPALIVE Get the value of the SO_KEEPALIVE flag. For details, see
setsockopt, setsockopt_nw on page 5-49
SO_TYPE Returns socket type.
ENOPROTOOPT The specified option is unknown to the protocol.