vrcppr
Purpose
Installs or removes a protocol procedure.
Library
Run-time Services Library (librts.a)
Syntax
#include <vrcppr.h>
int vrcppr (request, path)
char request, *path;
Description
The vrcppr subroutine issues a DEFINE_CODE supervisor
call to add or delete a protocol procedure from Virtual
Resource Manager (VRM). A protocol procedure is a
special-purpose program that runs in VRM to support an
application or service running on AIX.
The calling process's effective user ID must be superuser
to use the vrcppr subroutine.
The value of the request parameter determines whether to
add or delete the protocol procedure:
"'a'" Adds the protocol procedure that is contained in
the file named by the path parameter. The file
must be an executable file in a.out format.
"'d'" Deletes the protocol procedure named by the path
parameter.
In both cases the path parameter must specify the full
path name.
The /etc/system and /etc/master files must be set up cor-
rectly for the vrcppr subroutine to work properly. The
/etc/system file must contain a stanza with the following
information:
sstname":" The name of this /etc/system stanza. " protocol = true" This is a protocol procedure. " nospecial = true" No /dev special file is to be created. " noshow = true" The devices command should not display this device
The /etc/master file must contain a corresponding stanza
with the following information:
mstname":" The name of this /etc/master stanza. " protocol = true" This is a protocol procedure. " code = "path The full path name of the protocol procedure. " iocn = "iocn The IOCN for this code.
The value of the code keyword must be the same as the
path parameter passed to the vrcppr subroutine.
Return Value
Upon successful completion, a nonnegative integer value
representing the IOCN of the installed protocol procedure
is returned. If the vrcppr subroutine fails, then it
returns one of the following negative values:
VRM_inaa The calling process's effective user ID is
not superuser.
VRM_pnnf The file named by the path parameter does not
appear as the value of a code keyword in the
/etc/master file.
VRM_snnf The file named by the path parameter does not
appear as the name of stanza in the
/etc/system file.
VRM_mopn The /etc/master file cannot be opened.
VRM_sopn The /etc/system file cannot be opened.
VRM_defpp The vrmconfig program failed.
VRM_bopt The request parameter is not "'a'" or "'d'".
VRM_fork The fork system call failed.
VRM_pnam The path parameter does not specify a valid
full path name.
VRM_iocn The stanza of the /etc/master file that con-
tains code = path does not contain definition
for the iocn keyword.
FORKERR The fork system call failed.
EXECERR The exec system call failed.
Files
/etc/master
/etc/system
/etc/vrmconfig
Related Information
In this book: "attributes," "master," "system," and
"config."