RUI_INIT(3) — Subroutines
Name
RUI_INIT − Allocates a local LU on a DIGITAL SNA gateway and provides access to the SSCP-LU established by the DIGITAL SNA gateway.
FORMAT
#include <lua_c.h>
void RUI(LUA_VERB_RECORD ∗rui_init_vcb);
Parameter
rui_init_vcb
A pointer to an LUA_VERB_RECORD structure appropriately initialized for the RUI_INIT verb.
Required Verb Control Block Fields
common.lua_verb
An unsigned short value specifying the verb code LUA_VERB_RUI.
common.lua_verb_length
An unsigned short value specifying the length of the verb control block. Specify the value LUA_RUI_INIT_LENGTH.
common.lua_post_handle
A pointer to a sem_t structure specifying the DIGITAL UNIX semaphore that the interface should use for asynchronous calls. See the DIGITAL UNIX sem_init man page for more information about the data type of this parameter.
common.lua_opcode
An unsigned short value specifying the verb opcode. Specify the value LUA_OPCODE_RUI_INIT.
common.lua_luname
An 8-element unsigned char array specifying the local LU name (in ASCII). If the name is fewer than 8 characters in length, pad the name with space characters.
common.lua_cobol_ptr
This parameter is not currently implemented and should be set to NULL.
common.lua_flag3
This parameter is not currently implemented. Any fields set are ignored.
common.lua_ct_lu_norm_send_size
This parameter is not currently implemented and should be set to 0.
common.lua_encr_decr_option
An unsigned char value specifying the encryption options that the interface should use for this session.
specific.init.gwy_node
A pointer to a char array containing the node name of the DIGITAL SNA gateway.
specific.init.gwy_access_name
A pointer to a char array containing the access name to use when connecting to the DIGITAL SNA gateway.
specific.init.gwy_lu_name
A pointer to a char array containing the name of the LU to use on the DIGITAL SNA gateway.
specific.init.gwy_lu_auth_password
A pointer to a char array containing the authorization password to use for a restricted LU on the DIGITAL SNA gateway.
Optional Verb Control Block Fields
common.lua_correlator
A void ∗ pointer that can contain either a value or an address of a user-supplied data structure. The LUA application can use this parameter to correlate this verb control block with other user-supplied data structures. The interface does not read from or write to this field.
Returned Verb Control Block Fields
common.lua_prim_rc
An unsigned short value containing the primary error code.
common.lua_sec_rc
An unsigned int value containing the secondary error code.
common.lua_sid
An unsigned int value containing the session ID that subsequent verbs can use to specify the session to the interface. If RUI_INIT returns any primary return code other than LUA_OK or LUA_IN_PROGRESS, or if RUI_INIT returns a failure after having first returned LUA_IN_PROGRESS, the session ID is no longer valid.
common.lua_flag2
An LUA_FLAG2 structure containing various flags that indicate how the interface executed the verb. The following flag is returned:
async---If set, indicates that the interface is completing the verb asynchronously.
Description
The LUA interface processing for the RUI_INIT verb depends on the state of the LU on the gateway:
•The gateway LU has been enabled -- The RUI sends a notification command to the LU’s SSCP indicating that the LU is ready to participate in a session. The form of the notification is gateway dependent.
•The gateway LU is disabled -- The RUI receives an error from the gateway and returns the primary return code LUA_SESSION_FAILURE with a secondary return code of LUA_SESSION_INOP.
This verb’s function differs from the processing described in the IBM Communications Server for OS/2 Warp -- 32-Bit Conventional LUA Programming Reference. The processing described in the IBM document IBM Communications Server for OS/2 Warp -- 32-Bit Conventional LUA Programming Reference states that the RUI_INIT request waits indefinitely for an ACTLU from the remote host. In the DIGITAL SNA LUA Programming Interface for DIGITAL UNIX product, if the local LU is not active, the interface returns an immediate error.
While the RUI_INIT request is pending, the only verb that the LUA application can issue is the RUI_TERM verb.
The return code LUA_OK indicates that the LUA application has access to the SSCP-LU session.
The RUI allows the LUA application to use the RUI_INIT verb to recover a lost session. To use this feature, simply call the RIU_INIT verb if another RUI verb returns the primary return code LUA_SESSION_FAILURE.
You can use the returned session ID in all subsequent verbs for this session.
Primary Return Codes
LUA_OK
LUA_CANCELLED
LUA_COMM_SUBSYSTEM_ABENDED
LUA_COMM_SUBSYSTEM_NOT_LOADED
LUA_IN_PROGRESS
LUA_INVALID_VERB
LUA_INVALID_VERB_SEGMENT
LUA_PARAMETER_CHECK
LUA_SESSION_FAILURE
LUA_STATE_CHECK
LUA_UNEXPECTED_DOS_ERROR
LUA_UNSUCCESSFUL