Compaq ACMS for OpenVMS
Remote Systems Management Guide


Previous Contents Index

7.32 ACMSMGMT_SET_TSC_1

This procedure modifies Terminal Subsystem Controller (TSC) Config class attributes.


Format

tsc_status_rec *acmsmgmt_set_tsc_1(tsc_config_rec *tsc_cfg_rec,CLIENT *cl)


Parameters

tsc_cfg_rec

Type: Tsc_config_rec
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 8.13, 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 8.13 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 8.13 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.

Return Value

Type: Struct tsc_status_rec
Access: Write
Mechanism: By reference
Usage: Pointer to a union. The union contains either a failure code or a structure of type tsc_config_rec_out, 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:
         
  status
  Type: Integer
  Access: Write
  Mechanism: By value
  Usage: Failure return code.
         
  data, data_warn
  Type: Tsc_config_rec_out
  Access: Write
  Mechanism: By value
  Usage: Structure containing fields corresponding to the fields in the acc_config_rec 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:
         
    tsc_priority, cp_priority, cp_slots, max_logins, max_tts_cp, perm_cps, min_cpis
    Type: Integer
    Access: Write
    Mechanism: By value
    Usage: Status fields corresponding to the fields in the input argument.
         
    tsc_username, cp_username
    Type: Null-terminated string
    Access: Write
    Mechanism: By reference
    Usage: These fields contain the values that were supplied in the input argument, and can be ignored.
         
    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.

Description

This procedure requests updates to ACMS TSC Config class fields contained in the TSC table (see Section 8.13). 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.

Both current_sw and active_sw may be set on a given call. In this case, both the active and stored values for any nonnegative or nonnull fields will be updated.

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.


Example


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; 
   static 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_1(&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_u.data.cmd_output; nl != NULL; nl = 
nl->pNext) 
     printf("\n %s",nl->dcl_msg); 
 
   return(0); 
} 
      

In the preceding example, the acmsmgmt_set_tsc_1 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 5.3.1 shows how to declare and initialize the input arguments to this procedure.

7.33 ACMSMGMT_START_ACC_1

This procedure requests that the Remote Manager start the ACMS system.

Format

cmd_output_rec *acmsmgmt_start_acc_1(acc_startup_rec *acc_start_rec,CLIENT *cl)


Parameters

acc_start_rec

Type: Acc_startup_rec
Access: Read  
Mechanism: By reference  
Usage: Structure that contains the following client identification and Trap 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 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.

Return Value

Type: Cmd_output_rec
Access: Write
Mechanism: By reference
Usage: Pointer to a union. The union contains either a failure code or a structure of type cmd_rec_r, which points to a linked list containing status messages. The following are the contents of this union:
         
  status
  Type: Integer
  Access: Write
  Mechanism: By value
  Usage: Failure return code.
         
  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.

Description

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