Parameters

The parameters for CSNBT31R.

For the definitions of the return_code, reason_code, exit_data_length, and exit_data parameters, see Parameters common to all verbs.

rule_array_count
Direction: Input
Type: Integer
A pointer to an integer variable containing the number of elements in the rule_array variable. The value must be 1.
rule_array
Direction: Input
Type: String array
A pointer to a string variable containing an array of keywords. The keywords are 8 bytes in length and must be left-aligned and padded on the right with space characters. The following rule_array keywords are defined for this verb:

Keywords for the TR31 Key Token Parse control information

Keyword Meaning
Operation (one required)
INFO Return information about the optional blocks in the TR-31 key block.
DATA Return the data contained in a specified optional block in the TR-31 key block.
tr31_key_length
Direction: Input
Type: Integer
A pointer to an integer variable containing the number of bytes of data in the tr31_key variable. Specify a length that is greater than or equal to the size of the key block. The verb determines the actual length of the key by parsing its contents.
tr31_key
Direction: Input
Type: String
A pointer to a string variable containing the TR-31 key block to be disassembled.
opt_block_id
Direction: Input
Type: String
This parameter is used when operation keyword DATA is specified, otherwise it is ignored. For keyword DATA, this parameter is a pointer to a string variable that identifies the 2-byte ID of the optional block to obtain from the TR-31 key block.
num_opt_blocks
Direction: Input
Type: Integer
This parameter is used when operation keyword INFO is specified, otherwise it is ignored. For keyword INFO, this parameter is a pointer to an integer variable that specifies the number of 2-byte optional block IDs that are allocated for (1) the opt_block_ids variable and (2) the number of 2-byte integers that are allocated for the opt_block_lengths variable. This the value must specify the exact number of optional blocks that are in the header of the TR-31 key block. Use the TR31 Key Token Parse verb to determine the number of optional block IDs in a TR-31 key block before calling this verb.
opt_block_ids
Direction: Output
Type: String array
This parameter is used when operation keyword INFO is specified, otherwise it is ignored. For keyword INFO, this parameter is a pointer to a string array of 2-byte values that lists the identifiers of each optional block contained in the header of the TR-31 key block. Each ID must be unique, that is, no duplicates are allowed. The IDs, along with the associated lengths listed in the opt_block_lengths variable, are returned in the order that the optional blocks appear in the header of the TR-31 key block. The size of the variable must be at least two times the value of the num_opts_blocks variable.
opt_block_lengths
Direction: Output
Type: String array
This parameter is used when operation keyword INFO is specified, otherwise it is ignored. For keyword INFO, this parameter is a pointer to an integer array of 2-byte values that are 16-bit unsigned integers corresponding to the associated length of the optional block identified in the opt_block_ids variable. The lengths, along with the associated IDs listed in the opt_block_ids variable, are returned in the order that the optional blocks appear in the header of the TR-31 key block. The size of the variable must be at least two times the value of the num_opts_blocks variable.
opt_block_data_length
Direction: Input/Output
Type: Integer
This parameter is used when operation keyword DATA is specified, otherwise it is ignored. For keyword DATA, this parameter is a pointer to an integer variable containing the length of the opt_block_data parameter. On input, this variable specifies the maximum permissible length of the result. On output, the verb updates the value to length of the returned optional block data.
opt_block_data
Direction: Output
Type: String
This parameter is used when operation keyword DATA is specified, otherwise it is ignored. For keyword DATA, this parameter is a pointer to a string variable. If the TR-31 key block is found to be valid and the TR-31 key block contains an optional block specified by the optional_block_ID variable, the optional block is copied into this variable if it is large enough. The opt_block_data_length variable is updated with the length of the data returned in the variable.