Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ SLI_OPEN(3) — SNA LUA 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SLI_OPEN(3)  —  Subroutines

 
 
 
 

Name

SLI_OPEN − Allocates an LU, provides access to the SSCP-LU session established by the DIGITAL SNA gateway, and establishes the LU-LU session with the remote LUA application. 
 
 
 

FORMAT

#include <lua_c.h>
 
void SLI(LUA_VERB_RECORD ∗sli_open_vcb);
 
 
 
 

Parameter

 

sli_open_vcb
 
 
A pointer to an LUA_VERB_RECORD structure appropriately initialized for the SLI_OPEN verb. 
 
 
 

Required Verb Control Block Fields

 

common.lua_verb
 
 
An unsigned short value specifying the verb code LUA_VERB_SLI. 
 

common.lua_verb_length
 
 
An unsigned short value specifying the length of the verb control block. Specify the value LUA_SLI_OPEN_LENGTH. 
 

common.lua_post_handle
 
 
A pointer to a sem_t structure specifying the wait object that the interface should use for asynchronous calls. 
 

common.lua_opcode
 
 
An unsigned short value specifying the verb opcode.  Specify the value LUA_OPCODE_SLI_OPEN. 
 

common.lua_luname
 
 
An unsigned char 8-element 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_extension_list_ptr
 
 
A pointer to a LUA_EXT_LIST structure specifying the extension routines control block. If there are no user-supplied extension routines, specify NULL. 
 
For a description of the user-supplied extension routines and the SLI’s default actions if these routines are not specified, see the descriptions of the SLI_BIND_ROUTINE, SLI_SDT_ROUTINE, and SLI_STSN_ROUTINE verbs in this chapter.
 
 
 

common.lua_cobol_ptr
 
 
 
This parameter is not currently implemented and should be set to NULL.
 

common.lua_data_length
 
 
An unsigned short value specifying the length of the data in the buffer referenced by the common.lua_data_ptr parameter. 
 

common.lua_data_ptr
 
 
An unsigned char pointer to the data buffer that the interface should use (if any). 
 

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
 
 
 
This parameter is not currently implemented and should be set to 0.
 

specific.open.lua_init_type
 
 
An unsigned char value specifying how the interface should initialize the session.  The following values are available:

 

LUA_INIT_TYPE_SEC_IS
 

LUA_INIT_TYPE_SEC_LOG
 

LUA_INIT_TYPE_PRIM
 

LUA_INIT_TYPE_PRIM_SSCP

 

 
The "Description" section discusses each of these options in detail.
 

specific.open.gwy_node
 
 
A pointer to a char array containing the node name of the DIGITAL SNA gateway. 
 
 

specific.open.gwy_access_name
 
 
A pointer to a char array containing the access name to use when connecting to the DIGITAL SNA gateway. 
 
 

specific.open.gwy_lu_name
 
 
A pointer to a char array containing the name of the LU to use on the DIGITAL SNA gateway. 
 
 

specific.open.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. 
 

specific.open.lua_session_type
 
 
An unsigned_char value specifying how the interface should process a normal UNBIND request.  The following values are available:

 

LUA_SESSION_TYPE_NORMAL (the default)
 

LUA_SESSION_TYPE_DEDICATED

 

 
The "Description" section discusses each of these options in detail.
 

specific.open.lua_wait
 
 
An unsigned int value specifying, for LUA-initiated sessions, the number of seconds that the interface should wait before retrying a transmission after one of the following occurs:

 

•the interface detects an LUA_SESSION_FAILURE condition with a secondary code of LUA_RESOURCE_NOT_AVAILABLE, LUA_SESSION_LIMIT_EXCEEDED, LUA_SSCP_LU_SESS_NOT_ACTIVE, or LUA_SESSION_SERVICES_PATH_ERROR. 
 

•the interface receives an NSPE command
 

•the interface receives a NOTIFY command indicating a procedure error

 

 
A value of 0 indicates that the interface should not perform any retries and that it should return the error codes. The default is 0.
 
 
 
 

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. 
 

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 action taken by the SLI_OPEN routine varies depending on the value you supply for the specific.open.lua_init_type parameter:

 

•LUA_INIT_TYPE_SEC_IS -- specifies that the SLI initiates the LU-LU session using an INITSELF command. 

 
The LUA application must provide a valid INITSELF command in the buffer described by the lua_data_ptr and lua_data_length parameters. This INITSELF command must include a PLU name and mode name defined on the remote host.  The LUA application cannot make any other SLI requests (except SLI_CLOSE) until the SLI_OPEN request completes. 
 
 

•LUA_INIT_TYPE_SEC_LOG -- specifies that the SLI initiates the LU-LU session with the unformatted LOGON message in the data buffer. 

 
The LUA application must provide a valid LOGON command in the buffer described by the lua_data_ptr and lua_data_length parameters.  The LUA application cannot make any other SLI requests (except SLI_CLOSE) until the SLI_OPEN request completes. 
 
 

•LUA_INIT_TYPE_PRIM -- specifies that the remote host application initiates the session and that the SLI should wait for the BIND command. 

 
The SLI_OPEN request’s primary status code remains LUA_IN_PROGRESS until the BIND is received from the PLU. Note that this request could wait forever. The LUA application cannot make any other SLI requests (except SLI_CLOSE) until the SLI_OPEN request completes.
 
 

•LUA_INIT_TYPE_PRIM_SSCP -- specifies that SLI should acquire a local LU and then return to the LUA application. 

 
The LUA application then uses SLI_SEND directly to send INITSELF and LOGON messages to the SSCP and SLI_RECEIVE to receive responses from the SSCP. Note that this option is the only option that allows the LUA application to make another SLI request before SLI_OPEN completes. The LUA application can issue an SLI_RECEIVE or SLI_BID request to receive the INIT_COMPLETE response from the SSCP indicating that the SSCP-LU session is available.

 
 

 
The lua_session_type parameter controls how the SLI processes an UNBIND command received on the LU-LU session:

 

•LUA_SESSION_TYPE_NORMAL -- specifies that the SLI process the UNBIND normally. 

 
The SLI responds positively to the UNBIND. The SLI then ends the LU-LU session, ends the LU-SSCP session, and deallocates the local LU.

 
Note that if the received UNBIND is type X’02’ (UNBIND with BIND forthcoming), the SLI processes the request as if the lua_session_type parameter was LUA_SESSION_TYPE_DEDICATED. 
 
 

•LUA_SESSION_TYPE_DEDICATED -- specifies that the SLI process the UNBIND but retain the local LU. 

 
The SLI responds positively to the UNBIND. This ends the LU-LU session. However, the SLI does not end the SSCP-LU session or deallocate the local LU.
 
When the SLI receives a BIND, STSN, or SDT for the local LU, it restarts the LU-LU session.
 
 
 
 
Note that if the UNBIND is not type X’01’ (UNBIND Normal) or X’02’ (UNBIND with BIND forthcoming), the SLI processes the request as if the lua_session_type parameter was LUA_SESSION_TYPE_NORMAL. 

 

 
The SLI allows the LUA application to use the SLI_OPEN verb to recover a lost session. To use this feature, simply call the SLI_OPEN verb if another SLI verb returns the primary return code LUA_SESSION_FAILURE.

 
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
 
 
 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026