Previous | Contents | Index |
This procedure modifies Terminal Subsystem Controller (TSC) Config class attributes.
tsc_status_rec_2 *acmsmgmt_set_tsc_2(tsc_config_rec_2 *set_struct,CLIENT *cl)
set_struct
Type: Tsc_config_rec_2 Access: Read Mechanism: By reference Usage: Structure that contains the following client identification and TSC table fields. 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 of client_id is 0, proxy access is used. Client_id is obtained by calling the acms$mgmt_get_creds procedure. active_sw Type: Integer Access: Read Mechanism: By value Usage: Indicates whether active variables should be updated (active_sw = 1). Active variables are currently in use by the ACMS system; updates to active variables take effect immediately but are not durable (that is, they do not survive a restart of the ACMS system). Not all variables are dynamic, however. Refer to Section 9.14, and to the field descriptions in this section, to determine whether a particular variable can be updated dynamically. current_sw Type: Integer Access: Read Mechanism: By value Usage: Indicates whether current variables should be updated (current_sw = 1). Current variables are those stored in the ACMSGEN file currently in use by the ACMS system and are durable (that is, they survive a restart of the ACMS system). Updates to current variables take effect when the ACMS system is restarted. tsc_priority, cp_priority, cp_slots, max_logins, max_tts_cp, perm_cps, min_cpis Type: Integer Access: Read Mechanism: By value Usage: Values to be updated. These fields correspond to fields of the same names in the TSC table, depending on the value of active_sw and current_sw in this record (for example, tsc_priority will update the tsc_priority_stored field if current_sw is equal to 1). See Section 9.14 for a discussion of these fields. None of these fields can be updated dynamically. astlm, biolm, bytlm, diolm, enqlm, fillm, pgflquota, tqelm, wsdefault, wsextent, wsquota Type: Integer Access: Read Mechanism: By value Usage: Values to be updated. These fields correspond to fields of the same names in the TSC table, depending on the value of active_sw and current_sw in this record (for example, astlm will update the astlm_stored field if current_sw is equal to 1). See Section 9.14 for a discussion of these fields. Note that not all fields can be updated dynamically. tsc_username, cp_username Type: Null-terminated string Access: Read Mechanism: By reference Usage: Values to be updated. These fields correspond to fields of the same names in the TSC table, depending on the value of active_sw and current_sw in this record (for example, tsc_username will update the tsc_username_stored field if current_sw is equal to 1). See Section 9.14 for a discussion of these fields. Note that not all fields can be updated dynamically. In order to have any of these fields set to null (that is, ""), set the field to the string "NULL". cl
Type: CLIENT * Access: Read Mechanism: By value Usage: Pointer to an RPC client handle previously obtained by calling the RPC routine CLNT_CREATE.
Type: Tsc_status_rec_2 Access: Write Mechanism: By reference Usage: Pointer to a record that contains a union consisting of either a failure code or a structure of type tsc_config_rec_out_2, which contains status codes for each field, as well as a linked list of status messages associated with the update. See the Description section for a discussion of how to determine the update status for any field. The following are the contents of this union: rc Type: Integer Access: Write Mechanism: By value Usage: Failure return code. data, data_warn Type: Tsc_config_rec_out_2 Access: Write Mechanism: By value Usage: Structure containing fields corresponding to the fields in the set_struct structure, as well as a linked list of status messages associated with the update. See the Description section for a discussion of how to determine the update status for any field. The following are the contents of this structure: astlm, biolm, bytlm, cp_priority, cp_slots, cp_username, diolm, enqlm, fillm, max_logins, max_tts_cp, min_cpis, pgflquota, perm_cps, tqelm, tsc_priority, tsc_username, wsdefault, wsextent, wsquota Type: Integer Access: Write Mechanism: By value Usage: Status fields corresponding to the fields in the input argument. cmd_output Type: Dcl_list Access: Write Mechanism: By reference Usage: Pointer to a linked list of records containing status messages related to the failure of any updates. This structure contains the following fields: dcl_msg Type: Null-terminated string Access: Write Mechanism: By reference Usage: The status message. pNext Type: Dcl_list Access: Write Mechanism: By reference Usage: Pointer to the next node in the linked list.
This procedure requests updates to ACMS TSC Config class fields contained in the TSC table (see Section 9.14). Note that the TSC table contains both active and stored values. The active_sw field and current_sw field control which fields are attempted to be updated.Attempting to update an active field that is nondynamic is essentially useless, since the active field value will not change. For instance, calling this procedure with the active_sw field set to 1 and the tsc_username field populated does not result in any change to the system.
Setting the current_sw field to 1 causes updates to be written to the current ACMSGEN file. These updates are durable (that is, they survive a restart of the ACMS sytem) but do not affect the active system until the system is restarted.
For any nonnegative integer fields, the completion status of the update is returned in the corresponding field in the return structure. For string fields, the string field value is returned, regardless of the status of the call.
In order to have one of the string fields set to a null string (that is, ""), populate the field with value "NULL". To have one of the string fields ignored, pass in a null string.
int set_tsc_data(int client_id,CLIENT *cl) { static char c_name_all[2] = "*"; static char c_null_str[2] = ""; static tsc_config_rec set_struct; tsc_status_rec *ret_struct; dcl_link *nl; memset(&set_struct,-1,sizeof(set_struct)); set_struct.client_id = client_id; set_struct.active_sw = 1; set_struct.current_sw = 0; set_struct.max_logins = 61; /* Have to provide a pointer for string conversions by XDR or it will tscess vio. RM will ignore any fields with strlen of 0 */ set_struct.tsc_username = c_null_str; set_struct.cp_username = c_null_str; ret_struct = acmsmgmt_set_tsc_2(&set_struct,cl); if (!ret_struct) { printf("\n Call to modify TSC failed"); return(MGMT_FAIL); } if (ret_struct->status != MGMT_SUCCESS) printf("\n Call to modify TSC returned the following warnings or errors\n"); else printf("\n Call to modify TSC completed\n"); for (nl = ret_struct->tsc_status_rec_2_u.data.cmd_output; nl != NULL; nl = nl->pNext) printf("\n %s",nl->dcl_msg); xdr_free(xdr_tsc_status_rec_2, ret_struct); free(ret_struct); return(0); } |
In the preceding example, the ACMSMGMT_SET_TSC_2 procedure is called to set the ACMSGEN parameter max_logins to 61. If the call succeeds, only the active value is modified; the stored value is unchanged, and a success message is displayed. 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.42 ACMSMGMT_START_ACC_1
This procedure requests that the Remote Manager start the ACMS system.
cmd_output_rec *acmsmgmt_start_acc_1(acc_startup_rec *start_struct,CLIENT *cl)
start_struct
Type: Acc_startup_rec Access: Read Mechanism: By reference Usage: Structure that contains the following 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. audit_sw Type: Integer Access: Read Mechanism: By value Usage: Indicates whether system auditing should be enabled (audit_sw = 1), or disabled (audit_sw = 0). qti_sw Type: Integer Access: Read Mechanism: By value Usage: Indicates whether the Queued Task Initiator (QTI) should be started (qti_sw = 1), or not (qti_sw = 0). terminals_sw Type: Integer Access: Read Mechanism: By value Usage: Indicates whether the Terminal Subsystem Controller (TSC) should be started (terminals_sw = 1), or not (terminals_sw = 0). cl
Type: CLIENT * Access: Read Mechanism: By value Usage: Pointer to an RPC client handle previously obtained by calling the RPC routine CLNT_CREATE.
Type: Cmd_output_rec Access: Write Mechanism: By reference Usage: Pointer to a record that contains a union consisting of either a failure code or a structure of type cmd_rec, which points to a linked list containing status messages. The following are the contents of this union: rc Type: Integer Access: Write Mechanism: By value Usage: Failure return code. data, data_warn Type: Cmd_rec Access: Write Mechanism: By value Usage: Structure containing the first node in a linked list of status messages (type dcl_list). The following are the contents of this structure: cmd_output Type: Dcl_list Access: Write Mechanism: By reference Usage: Pointer to a linked list of records containing status messages related to the failure of any updates. This structure contains the following fields: dcl_msg Type: Null-terminated string Access: Write Mechanism: By reference Usage: The status message. pNext Type: Dcl_list Access: Write Mechanism: By reference Usage: Pointer to the next node in the linked list.
This procedure requests startup of the ACMS run-time system on the same node that the Remote Manager is running on. Fields in the input argument determine how the ACMS system will be started (that is, with or without auditing, terminals or QTI).
Previous Next Contents Index