RPC system data types

# RPC system data types

The data types refered to in the Routines section are as follows. For pascal, a declaration file (logical name rpc_proc) exists. If you use a different language, ensure that the data types and calling conventions match, given the operating system and language you are using. * Under VMS, The simple types which are normally passed by value are in fact always passed by address when using the libraries rpc$lib or rpc$large. (A feature of VMS Pascal, for FORTRAN compatibility). See also notes under rpc_name and entry_point types.

rpc_status
  A 32 bit integer. This is normally passed by address, as it is returned from the procedure.
rpc_name
  A 40 character fixed length string, padded with spaces. This is always passed by address. Users of VAX FORTRAN must be sure to include a %REF() around the parameter to prevent it being passed by descriptor. If you are calling these routines from C, and using a library which is not in C (ie RPC$LIB, RPC$LARGE under VMS, and libraries for M6809, MoniCa, RMS68k), you must always provide 40 characters. The RPC library in C (rpc$libc and rpc$libc8k on vms, and libraries on unix, os9 and the PC) will also accept zero-terminated strings up to a maximum of 40 characters plus terminator as IN parameters. Also be aware that the RPC system will not add a '\0' null character on the end of a returned string.
socket
  The RPC system uses a 32 bit "socket" Socket, definition of to refer to a communication channel to a remote task. This is just a reference number used by the commmunications code within the RPC system.
handle Handle, definition of
  A different reference number, which on a client machine refers to one remote package. There is a handle (32 bit) for each package. It is a global variable, and accessible as h_ followed by the package name. For example, the handle for the FILER package is h_filer.
rpc_message_pointer
  The system uses a data structure called an "rpc_message" rpc_message, definition of to hold all the information about a remote call. This includes its status and pointers to the socket which is being used for communication with the remote party. It is not normally necessary for the user to know the format of this structure, but in some cases he may want to pass a pointer to it from one routine to another. (For the format of an rpc_message, see the rpc_types include file, as this contains several fields used internally by the RPC RTS, which may be changed between versions. It is not recommended that user code uses this buffer directly, but calls RPC_Service to have it serviced.) An rpc_message_pointer is a pointer to an rpc_message.
entry_point
  This is the address of a routine. Under VAX/FORTRAN, the parameter must be enclosed in %LOC() in order to simulate its being passed as a VAX11 bound procedure value.