TCP/IP Programming Manual

Get the value of the TCP_MAXRXMT flag. See setsockopt, setsockopt_nw (page 184) for
details.
TCP_MAXRXMT
Get the value of the TCP_RXMTCNT flag. See setsockopt, setsockopt_nw (page 184) for
details.
TCP_RXMTCNT
Get the value of the TCP_TOTRXMTVA flag. See setsockopt, setsockopt_nw (page 184)
for details.
TCP_TOTRXMTVAL
When level is a user-defined protocol above IP, the possible values are defined by the
protocol.
optval_ptr
input and return value; 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 (page 184).
optlen_ptr
input and return value; 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
input value; 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:
The specified option is unknown to the protocol.ENOPROTOOPT
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.
See Nowait Call Errors (page 86) for information on checking errors.
Examples
See Client and Server Programs Using UDP (page 219) for examples that call the getsockopt
function.
if_freenameindex
The if_freenameindex function frees dynamic memory allocated by the if_nameindex
function. (This function is supported for NonStop TCP/IP only.)
NOTE: The C synopsis is given in ANSI C format rather than the pre-ANSI C formats of the other
library routines because the only NonStop servers you can use these routines on all support ANSI
C. (ANSI C format defines the function and the arguments in the same line rather than using an
assign statement and defining the arguments underneath.)
C Synopsis
#include <if.h>
130 Library Routines