ADDOPT(2)
Series 300 and 800 Only
NAME
addopt() − adds an argument and its associated data to the NetIPC opt parameter
SYNOPSIS
#include <sys/ns_ipc.h>
void addopt (opt,argnum,optioncode,datalength,data,error);
short int opt[], data[], argnum, optioncode, datalength, *error;
DESCRIPTION
The addopt call adds an argument and its associated data to an NetIPC opt parameter. The parameter must be initialized by initopt before arguments can be added. 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 which you want to add an argument.
argnum (input parameter) The number of the argument to be added. The first argument is number zero.
optioncode (input parameter) The option code or constant definition (C programs only) for the argument to added. These codes are described in each NetIPC call opt parameter description.
datalength (input parameter) The length in bytes of the data to be included. This information is provided in each NetIPC call opt parameter description.
data (input parameter) An array containing the data associated with 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
initopt(2), optoverhead(2), addopt(2).
DIAGNOSTICS
[NSR_NO_ERROR] The call was successful.
[NSR_xxxx] Refer to the error codes listed in the NetIPC programmer’s manual for your system.
Hewlett-Packard Company — May 11, 2021