HP 3000 Manuals

READOPT [ Net IPC 3000/XL Programmer's Reference Manual ] MPE/iX 5.0 Documentation


Net IPC 3000/XL Programmer's Reference Manual

READOPT 

Obtains the option code and argument data associated with an opt 
parameter argument.

Syntax 
______________________________________________________________________
|                                                                    |
|                                                                    |
|      READOPT ( opt, entrynum, optioncode, datalength, data, result)|
|                                                                    |
______________________________________________________________________

Parameters 

 opt (input) 

Record or byte array, by reference.  The  opt parameter to be read.
Refer to "NetIPC Intrinsics/Common Parameters" for information on the
structure and use of this parameter.

 entrynum (input) 

16-bit integer, by value.  The number of the option entry to be obtained.
The first entry is number zero.

 optioncode (output) 

16-bit integer, by reference.  The option code associated with the entry.
These codes are described in each NetIPC call opt parameter description.

 datalength  & (input/output) 

16-bit integer, by reference.  The length of the data buffer into which
the entry should be read.  If the data buffer is not large enough to
accommodate the entry 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) 

Byte array, by reference.  An array which will contain the data read from
the option entry.  If the array is not large enough to hold the data
read, only as much as requested will be returned and SOCKERR 137, more
data available will be returned in the result parameter.

 result (output) 

16-bit integer, by reference.  The error code returned; zero if no error.

Description 

If the data field is not large enough, then as much data as the user
asked for will be returned and SOCKERR 173 will be returned indicating
more data is available.  A second call to READOPT could get all the data.



MPE/iX 5.0 Documentation