 |
Compaq ACMS for OpenVMS Remote Systems Management
Guide
8.26 ACMSMGMT_LIST_TRAP_1
ACMS Remote Manager clients call this procedure to obtain a list of
Trap table entries.
Format
trap_data_list *acmsmgmt_list_trap_1(sub_id_struct *sub_rec, CLIENT
*cl)
Parameters
sub_rec
Type:
|
Sub_id_struct
|
Access:
|
Read
|
|
Mechanism:
|
By reference
|
|
Usage:
|
Structure that contains the following client authorization information.
|
|
|
|
|
client_id
|
|
Type:
|
Integer
|
|
Access:
|
Read
|
|
Mechanism:
|
By value
|
|
Usage:
|
If explicit authentication is being used, a valid client ID must be
provided. If the value for client_id is 0, proxy access is used.
Client_id is obtained by calling the acms$mgmt_get_creds procedure.
|
cl
Type:
|
CLIENT *
|
Access:
|
Read
|
|
Mechanism:
|
By value
|
|
Usage:
|
Pointer to an RPC client handle previously obtained by calling the RPC
routine CLNT_CREATE.
|
Return Value
Type:
|
Trap_data_list
|
Access:
|
Write
|
Mechanism:
|
By reference
|
Usage:
|
Pointer to a record that contains a union consisting of either a
failure code or a pointer to a structure of type trap_link, which
contains the start of a linked list of records. The following are the
contents of this union:
|
|
|
|
|
|
|
rc
|
|
Type:
|
Integer
|
|
Access:
|
Write
|
|
Mechanism:
|
By value
|
|
Usage:
|
Failure return code.
|
|
|
|
|
|
|
list
|
|
Type:
|
Trap_list
|
|
Access:
|
Write
|
|
Mechanism:
|
By reference
|
|
Usage:
|
Start of linked list. Pointer to a structure of trap table rows, and a
forward pointer to the next node in the linked list. The following are
the contents of this structure:
|
|
|
|
|
|
|
|
pNext
|
|
|
Type:
|
Trap_list
|
|
|
Access:
|
Write
|
|
|
Mechanism:
|
By value
|
|
|
Usage:
|
Start of linked list. Pointer to a structure of type trap_list.
|
|
|
|
|
|
|
|
trap_data
|
|
|
Type:
|
Trap_rec
|
|
|
Access:
|
Write
|
|
|
Mechanism:
|
By reference
|
|
|
Usage:
|
Trap table row. Trap table fields are described in Section 9.13.
|
Description
The ACMSMGMT_LIST_TRAP_1 procedure returns a linked list of Trap table
rows. All Trap table rows are returned in each call. Records are
returned sequentially from the table, beginning at the start of the
table.
Entire table rows are returned. See Section 9.13 for a description of
the fields in the trap_rec structure.
This procedure does not require the ACMS run-time system in order to
execute.
Example
|
int list_trap_data(int client_id,CLIENT *cl)
{
char c_states[2][9] = {"enabled","disabled"};
char c_entities[10][9] = {"unknown","*","acc","tsc","qti","cp","exc",
"server","group","mgr"};
char c_classes[6][8] = {"*","id","config","runtime","pool","error"};
char c_trap_params[2][15] = {"exists","event severity"};
trap_data_list *trap;
trap_link *nl;
static struct sub_id_struct sub_rec;
int status;
sub_rec.client_id = client_id;
trap = acmsmgmt_list_trap_1(&sub_rec,cl);
if (!trap) {
printf("\n RPC Call to get Trap data failed");
return(MGMT_FAIL);
}
if (trap->status != MGMT_SUCCESS) {
printf("\n Call to get Trap data failed, returning status code %d",
trap->trap_data_list_u.rc);
status = trap->trap_data_list_u.rc;
xdr_free(xdr_trap_data_list, trap);
free(trap);
return(status);
}
for (nl = trap->trap_data_list_u.list; nl != NULL; nl = nl->pNext) {
printf("\n Entity: %-9s Name: %-32s Param: %-15s Trap Min: %d
Trap Max: %d",
c_entities[nl->trap_data.entity_type],
nl->trap_data.entity_name,
c_trap_params[nl->trap_data.param_to_trap],
nl->trap_data.min,
nl->trap_data.max);
}
printf("\n End of data");
xdr_free(xdr_trap_data_list, trap);
free(trap);
return(0);
}
|
In the preceding example, the ACMSMGMT_LIST_TRAP_1 procedure is called
to fetch the contents of the Trap table. If the call succeeds, the
entity_type, entity_name, parameter, trap_min, and trap_max fields are
displayed for each row in the table. Otherwise, an error message is
displayed. The example in Section 6.4.1 shows how to declare and
initialize the input arguments to this procedure.
8.27 ACMSMGMT_LIST_USERS_1
ACMS Remote Manager clients call this procedure to obtain information
about users attached to a Remote Manager server on a local or remote
node.
Format
user_data_list *acmsmgmt_list_users_1 (sub_id_struct *sub_rec,
CLIENT *cl)
Parameters
sub_rec
Type:
|
Sub_id_struct
|
Access:
|
Read
|
|
Mechanism:
|
By reference
|
|
Usage:
|
Structure that contains the following client authorization information.
|
|
|
|
|
client_id
|
|
Type:
|
Integer
|
|
Access:
|
Read
|
|
Mechanism:
|
By value
|
|
Usage:
|
If explicit authentication is being used, a valid client ID must be
provided. If the value for client_id is 0, proxy access is used.
Client_id is obtained by calling the acms$mgmt_get_creds procedure.
|
cl
Type:
|
CLIENT *
|
Access:
|
Read
|
|
Mechanism:
|
By value
|
|
Usage:
|
Pointer to an RPC client handle previously obtained by calling the RPC
routine CLNT_CREATE.
|
Return Value
Type:
|
User_data_list
|
Access:
|
Write
|
Mechanism:
|
By reference
|
Usage:
|
Pointer to a record that contains a union consisting of either a
failure code or a pointer to a structure of type user_link, which
contains the start of a linked list of records. The following are the
contents of this union:
|
|
|
|
|
|
|
rc
|
|
Type:
|
Integer
|
|
Access:
|
Write
|
|
Mechanism:
|
By value
|
|
Usage:
|
Failure return code.
|
|
|
|
|
|
|
list
|
|
Type:
|
User_list
|
|
Access:
|
Write
|
|
Mechanism:
|
By reference
|
|
Usage:
|
Start of linked list. Pointer to a structure of user data, and a
forward pointer to the next node in the linked list. The following are
the contents of this structure:
|
|
|
|
|
|
|
|
pNext
|
|
|
Type:
|
User_list
|
|
|
Access:
|
Write
|
|
|
Mechanism:
|
By value
|
|
|
Usage:
|
Start of linked list. Pointer to a structure of type user_list.
|
|
|
|
|
|
|
|
user_data
|
|
|
Type:
|
User_rec
|
|
|
Access:
|
Write
|
|
|
Mechanism:
|
By reference
|
|
|
Usage:
|
The data describing the user. This record contains the following fields:
|
|
|
|
|
|
|
|
|
client_id
|
|
|
|
Type:
|
Integer
|
|
|
|
Access:
|
Write
|
|
|
|
Mechanism:
|
By value
|
|
|
|
Usage:
|
Integer value containing the client ID for the user.
|
|
|
|
|
|
|
|
|
reserved
|
|
|
|
Type:
|
Integer
|
|
|
|
Access:
|
Write
|
|
|
|
Mechanism:
|
By value
|
|
|
|
Usage:
|
Reserved for Compaq use.
|
|
|
|
|
|
|
|
|
gid
|
|
|
|
Type:
|
Word
|
|
|
|
Access:
|
Write
|
|
|
|
Mechanism:
|
By value
|
|
|
|
Usage:
|
UIC group identifier.
|
|
|
|
|
|
|
|
|
uid
|
|
|
|
Type:
|
Word
|
|
|
|
Access:
|
Write
|
|
|
|
Mechanism:
|
By value
|
|
|
|
Usage:
|
UIC user identifier.
|
|
|
|
|
|
|
|
|
proxy_gid
|
|
|
|
Type:
|
Word
|
|
|
|
Access:
|
Write
|
|
|
|
Mechanism:
|
By value
|
|
|
|
Usage:
|
UIC group identifier of the proxy user, if proxy is being used.
|
|
|
|
|
|
|
|
|
proxy_uid
|
|
|
|
Type:
|
Word
|
|
|
|
Access:
|
Write
|
|
|
|
Mechanism:
|
By value
|
|
|
|
Usage:
|
UIC user identifier of the proxy user, if proxy is being used.
|
|
|
|
|
|
|
|
|
node-name
|
|
|
|
Type:
|
Null-terminated string
|
|
|
|
Access:
|
Write
|
|
|
|
Mechanism:
|
By reference
|
|
|
|
Usage:
|
Pointer to a null-terminated string containing the name of the node
from which the user logged in.
|
|
|
|
|
|
|
|
|
expires
|
|
|
|
Type:
|
Null-terminated string
|
|
|
|
Access:
|
Write
|
|
|
|
Mechanism:
|
By reference
|
|
|
|
Usage:
|
Time the user's credentials expire. Time is expressed in OpenVMS ASCII
time format (
DD-MMM-YYYY HH:MM:SS.hh).
|
|
|
|
|
|
|
|
|
user-name
|
|
|
|
Type:
|
Null-terminated string
|
|
|
|
Access:
|
Write
|
|
|
|
Mechanism:
|
By reference
|
|
|
|
Usage:
|
Pointer to a null-terminated string containing the user name.
|
|
|
|
|
|
|
|
|
rights
|
|
|
|
Type:
|
Array of integers
|
|
|
|
Access:
|
Write
|
|
|
|
Mechanism:
|
By value
|
|
|
|
Usage:
|
ACMS management rights identifiers held by the user.
|
|
|
|
|
|
|
|
|
proxy_flag
|
|
|
|
Type:
|
Integer
|
|
|
|
Access:
|
Write
|
|
|
|
Mechanism:
|
By value
|
|
|
|
Usage:
|
Indicates whether the record is for a proxy user (proxy_flag = 1) or is
not for a proxy user (proxy_flag = 0).
|
Description
The ACMSMGMT_LIST_USERS_1 procedure returns a linked list of users who
are logged in to a particular Remote Manager. All user records are
returned on each call to this procedure.
|