HP-UX SNAplus2 R7 LUA Programmer's Guide
Designing and Writing LUA Applications
SNA Information
if( rui_init.common.lua_prim_rc == LUA_OK )
{
/* Init OK */
.
.
.
}
else
{
/* Do error routine */
.
.
.
}
2.4 SNA Information
This section explains some SNA information that you need to consider when writing SNAplus2 LUA applications for
communications with a host. If you are writing an RUI Primary application for communications with a downstream
LU, see Section 2.5, SNA Information for RUI Primary.
This guide does not attempt to explain SNA concepts in detail. If you need specific information about SNA message
flows, refer to the documentation listed in Related Publications, and to the documentation for the host application
for which you are designing your SNAplus2 LUA application.
2.4.1 BIND Checking: RUI
During initialization of the LU session, the host sends a BIND message to the SNAplus2 LUA application that
contains information such as RU sizes to be used by the LU session. SNAplus2 returns this message to the LUA
application on an RUI_READ verb. It is the responsibility of the LUA application to check that the parameters
specified on the BIND are suitable. The application has the following options:
• Accept the BIND as it is, by issuing an RUI_WRITE verb containing an
OK
response to the BIND. No data
needs to be sent on the response.
• Try to negotiate one or more BIND parameters (this is only permitted if the BIND is negotiable). To do this, the
application issues an RUI_WRITE verb containing an
OK response, but including the modified BIND as data.
• Reject the BIND by issuing an RUI_WRITE verb containing a negative response, using an appropriate SNA
sense code as data.
For more information about the RUI_WRITE verb, see Chapter 4, RUI Verbs.
The validation of the BIND parameters, and ensuring that all messages sent are consistent with them, is the
responsibility of the LUA application. However, the following two restrictions apply:
• SNAplus2 rejects any RUI_WRITE verb that specifies an RU length greater than the size specified on the BIND.
• SNAplus2 requires the BIND to specify that the secondary LU is the contention winner, and that error recovery
is the responsibility of the contention loser.
2.4.2 BIND Checking: SLI
During initialization of the LU session, the host sends a BIND message to the SNAplus2 LUA application that
contains information such as RU sizes to be used by the LU session.
44