READOPT(2)
Series 300 and 800 Only
NAME
readopt() − obtains the option code and argument data associated with an NetIPC opt parameter argument
SYNOPSIS
#include <sys/ns_ipc.h>
void readopt (opt,argnum,optioncode,datalength,data,error);
short int opt[], data[], *error, *optioncode, *datalength;
ns_int_t argnum;
DESCRIPTION
Obtains the option code and argument data associated with an opt parameter argument. Refer to the NetIPC programmer’s manual for your system for a complete description of the opt parameter.
This routine can be linked into a program by giving the -lnsipc option to cc(1) or ld(1).
PARAMETERS
opt (input parameter) The opt parameter to be read.
argnum (input parameter) The number of the argument to be obtained. The first argument is number zero.
optioncode (output parameter) The option code or constant definition (C programs only) associated with the argument. These codes are described in each NetIPC call opt parameter description.
datalength (input/output parameter) The length of the data buffer into which the argument should be read. If the data buffer is not large enough to accommodate the argument data, an error will be returned. On output, this parameter contains the length of the data actually read. (The length of the data associated with a particular option code is provided in each NetIPC call opt parameter description.)
data (output parameter) A data buffer which will contain the data read from the argument.
error (output parameter) The error code returned; zero or NSR_NO_ERROR if no error. Refer to "Diagnostics" below for more information.
RETURNS
None. Errors are returned in the error parameter.
AUTHOR
HP.
SEE ALSO
addopt(2), initopt(2), optoverhead(2).
DIAGNOSTICS
[NSR_NO_ERROR] The call was successful.
[NSR_xxxx] Refer to the errors listed in the NetIPC programmer’s manual for your system.
Hewlett-Packard Company — May 11, 2021