Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ readopt(3N) — HP-UX 8.05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ipcconnect(2)

ipccontrol(2)

ipccreate(2)

ipcdest(2)

ipcerrmsg(3N)

ipcgetnodename(2)

ipclookup(2)

ipcname(2)

ipcnamerase(2)

ipcrecv(2)

ipcrecvcn(2)

ipcselect(2)

ipcsend(2)

ipcsetnodename(2)

ipcshutdown(2)

addopt(3N)

initopt(3N)

optoverhead(3N)

readopt(3N)

readopt(3N)

Requires Optional LAN/X.25 Software

NAME

readopt − obtain option code and data from NetIPC option buffer

SYNOPSIS

#include <sys/ns_ipc.h>

void readopt(

short opt[],
short argnum,
short ∗optioncode,
short ∗datalength,
short data[],
short ∗result);

DESCRIPTION

readopt extracts an option from an option buffer and copies it into a user- supplied data buffer. 

readopt recognizes the following 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.  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. 

result (output parameter) The result code returned.  Refer to "Diagnostics" below for more information. 

RETURN VALUE

None.  Errors are returned in the result parameter. 

DIAGNOSTICS

[NSR_ADDR_OPT] The opt buffer pointer is null. 

[NSR_NO_ERROR] The call was successful. 

[NSR_OPT_CANTREAD] Data in the option buffer has been corrupted and cannot be read. 

[NSR_OPT_DATA_LEN] The supplied buffer is not large enough to receive the option. 

[NSR_OPT_ENTRY_NUM] The option index is negative or larger than the number of options in the opt buffer. 

AUTHOR

readopt was developed by HP. 

SEE ALSO

ipcconnect(2), ipccontrol(2), ipccreate(2), ipcdest(2), ipcerrmsg(3N), ipcgetnodename(2), ipclookup(2), ipcname(2), ipcnamerase(2), ipcrecv(2), ipcrecvcn(2), ipcselect(2), ipcsend(2), ipcsetnodename(2), ipcshutdown(2), addopt(3N), initopt(3N), optoverhead(3N), readopt(3N). 

Hewlett-Packard Company  —  HP-UX Release 8.05: June 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026