Appendix B - 3270/SNA Technical Description
This appendix presents a technical description of the 3270/SNA emulation product. The sections that follow explain these topics:
A summary of the devices the product emulates SNA requests that the product supports Link control support Display station support Additional features
The VINES 3270/SNA service provides full emulation of IBM 3174 clusters, IBM 3274 clusters, and IBM 3276 clusters on a VINES network. The service emulates any 3174 controller, a 3274 Model controller, or any 3276 controller.
The product supports both Type 1 (SCS) and Type 3 (DSC) printers by emulating 3287 Model 1 and Model 2 devices.
The PC client software emulates a 3279 Model 2B display station. PCs can engage in a maximum of four concurrent sessions, with a maximum of one print session. Support for PC display adapters includes standard monochrome, VGA, CGA, EGA, and Host Session Adapter (3270/PC).
Support for SNA requests is as follows:
Session control (SC): ACTPU, DACTPU, ACTLU, DACTLU, BIND, UNBIND, SDT, CLEAR. Data flow control (DFC): CANCEL, CHASE, LUSTAT, SHUTD, SHUTC, RTR, BID, SIGNAL (for display devices). Function Management Data (FMD): TERMSELF (from SLU to SSCP, NS) sent when PC client disconnects from SNA service, NOTIFY (sent from SLU to SSCP), DATA.
Link control support includes Token-Ring LANs and switched and leased lines up to 56 KB. Emulation supports the following:
Token-Ring Station functions. Full SDLC Secondary Station functions, including the exchange of XIDs. The SDLC link operates half-duplex in Normal Response Mode.
The next two sections provide overviews of Token-Ring and SDLC support for 3270/SNA services. They also show examples of how Token-Ring and SDLC communication events are recorded in the 3270/SNA service log files. Note that the section on SDLC support discusses the ICA card only.
VINES servers and IBM hosts communicate over Token-Ring LANs using SNA Physical Unit (PU) Type 2 communication. This type of communication requires that the server and host establish a logical connection between them. The server and host use a protocol that is very similiar, but not identical, to SDLC. The logical connection can span IBM Token-Ring bridges or VINES servers equipped with the Token-Ring Bridge option.
IBM Token-Ring cards provide a high-level interface for establishing and maintaining the logical connection over which SNA communications take place. The card performs most management tasks for the logical connection, such as keep-alive messages, sequence number generation, and checking and error recovery. The 3270/SNA service is responsible for configuring parameters and issuing commands to the card to establish the logical connection only.
Logical Connection Establishment
The 3270/SNA service performs the following actions to set up a logical connection between itself and other IBM equipment:
Issues a DLC_OPEN_STATION command. This is a high-level command that instructs the card to establish a logical link station. In addition, the service passes most of the configuration parameters except for the host's Token-Ring address to the card. The card responds to the 3270/SNA service with a station opened indication.
Transmits a logical link control (LLC) TEST command to a remote Token-Ring card. This command acts as a probe to determine if the remote card is powered on. In addition, if the server and host must communicate through IBM Token-Ring bridges, this command and its associated response from the host causes the Token-Ring card in the server to compile source-level routing information.
Transmits two exchange station identification (XID) commands. IBM currently requires that two XID commands be sent prior to establishment of a logical connection. The first XID command carries no data. The second carries the XID address of the PU. This is the same XID address that is included in SDLC XID exchanges. The remote host does not respond to the second XID.
Waits for a DLC_STATUS indication from the host. This indicates that the link is set up. The 3270/SNA service waits for the IBM Token-Ring card in the server to indicate that the card has received a SABME. The SABME is the analog of a set normal response mode (SNRM) command on an SDLC connection.
Issues a DLC_CONNECT_STATION. Since an outstanding SABME command on the connection exists, the card generates an unnumbered acknowledgment (UA) command, which establishes the logical link. The 3270/SNA service and the host may then exchange user data.
Figure B-1 illustrates the sequence of actions that the 3270/SNA service, the Token-Ring card in the server, and the Token-Ring card in the remote IBM host perform to establish a logical connection.
Service | Local Card | Remote Card |
DLC_OPEN_STATION -------> | ||
<------ Station Opened | ||
Transmits TEST (c) ------> | Transmits TEST (c) ------> | Receives TEST (c) |
<------ Transmission Complete | ||
Receives TEST (r) | <------ Receives TEST (r) | <------ Transmits TEST (r) |
Transmits XID (c) ------> | Transmits XID (c) ------> | Receives XID (c) |
<------ Transmission Complete | ||
Receives XID (r) | <------ Receives XID (r) | <------ Transmits XID (r) |
Transmits XID (c) ------> | Transmits XID (c) ------> | Receives XID (r) |
<------ Transmission Complete | ||
Receives DLC_STATUS | <------ Receives SABME* | <------ Transmits SABME |
DLC_CONNECT_STATION ------> | ||
<------ Station Connected |
* = Local card receives SABME and passes DLC_STATUS to service
(c) = Command
(r) = Response
The current implementation reports the actual errors returned by the card. Refer to the IBM Token-Ring Network PC Adapter Technical Reference for a complete explanation of these errors.
Sample Token-Ring Communication Errors
The following samples show how 3270/SNA service communication errors over Token-Ring are recorded in the service log files. The first sample shows what happens when you do not configure any logical link stations for the IBM Token-Ring card. Note that the Token-Ring card is referred to as an adapter in the log files.
*** Tue Jun 13 08:09:13 1989
08:09:13 SNA Service Sna@Corp@Servers initializing
08:09:16 TK: Socket opened.
TK: Socket connected.
TK: Issuing DLC_OPEN_STATION
TK: Send completion error.
TK: Adapter Error 0x40 on command .
Aborting and flushing log.
The next sample shows an IBM host that the 3270/SNA service could not reach initially, became reachable, then became unreachable again, and finally became reachable for a second time. Comments are included in quotes in the sample. These comments do not appear in real log files.
*** Mon Jun 12 10:24:22 1989
10:24:22 SNA Service Sna@Corp@Servers initializing
10:24:26 TK: Socket opened.
TK: Socket connected.
TK: Issuing DLC_OPEN_STATION
TK: Station opened. "Successful DLC_OPEN_STATION"
TK: Sending local TEST
TK: Send completion error.
TK: Adapter Error 0x22 on command ...continuing
"Host is not online"
10:24:37 TK: Sending local TEST
TK: Send completion error.
TK: Adapter Error 0x22 on command ...continuing
10:24:48 TK: Sending local TEST
TK: Send completion error.
TK: Adapter Error 0x22 on command ...continuing
10:24:59 TK: Sending Broadcast TEST "All-rings broadcast attempt"
TK: Send completion error.
TK: Adapter Error 0x22 on command ...continuing
10:25:11 TK: Sending Broadcast TEST
TK: Received Broadcast TEST response.
"Received a TEST response"
TK: Received XID response. "Receives an XID response"
TK: Sending 3274 XID cmd "Sends an SNA-formatted XID"
TK: Received dlc status indicator- 0x0800
SABME received for open link station.
"Service receives a SABME"
TK: Issuing DLC_CONNECT_STATION "Handshake finished"
TK: Station connected.
10:27:45 TK: Received dlc status indicator- 0x8000
Link to remote is lost. "Link went down"
TK: Socket closed.
10:28:18 TK: Socket opened.
TK: Socket connected.
TK: Issuing DLC_OPEN_STATION
TK: Station opened.
TK: Sending local TEST
TK: Send completion error.
TK: Adapter Error 0x22 on command ...continuing
10:28:29 TK: Sending local TEST
TK: Send completion error.
TK: Adapter Error 0x22 on command ...continuing
10:28:40 TK: Sending local TEST
TK: Received local TEST response.
TK: Received XID response.
TK: Sending 3274 XID cmd
TK: Received dlc status indicator- 0x0800
SABME received for open link station.
TK: Issuing DLC_CONNECT_STATION
TK: Station connected.
This sample shows what happens when you configure a transmit buffer size for the service that exceeds the maximum packet size configured for the Token-Ring card.
*** Tue Jun 13 15:54:55 1989
15:54:55 SNA Service sna@Ralph@Servers initializing
15:54:58 TK: Socket opened.
TK: Socket connected.
TK: Issuing DLC_OPEN_STATION
TK: Station opened.
TK: Sending local TEST
TK: Received local TEST response.
TK: Received XID response.
TK: Sending 3274 XID cmd
TK: Received dlc status indicator- 0x0800
SABME received for open link station.
TK: Issuing DLC_CONNECT_STATION
TK: Station connected.
15:59:28 TK: Error on sosend.
Error text = System error 156, see your Administrator Aborting and flushing log
This sample shows what happens when the Token-Ring card receives a packet the size of which exceeds the receive buffer size configured for the service, but is still small enough to fit in the Token-Ring card buffers.
*** Wed Jun 14 15:48:50 1989
15:48:50 SNA Service sna@Ralph@Servers initializing
15:48:54 TK: Socket opened.
TK: Socket connected.
TK: Issuing DLC_OPEN_STATION
TK: Station opened.
TK: Sending local TEST
TK: Received local TEST response.
TK: Received XID response.
TK: Sending 3274 XID cmd
TK: Received dlc status indicator- 0x0800
SABME received for open link station.
TK: Issuing DLC_CONNECT_STATION
TK: Station connected.
15:52:01 TK: Received dlc status indicator- 0x1000
FRMR sent to remote.
FRMR data- 0200000204
TK: Received dlc status indicator- 0x4000
DM or DISC received.
TK: Socket closed.
15:52:33 TK: Socket opened.
TK: Socket connected.
TK: Issuing DLC_OPEN_STATION
TK: Station opened.
TK: Sending local TEST
TK: Received local TEST response.
TK: Received XID response.
TK: Sending 3274 XID cmd
TK: Received dlc status indicator- 0x0800
SABME received for open link station.
TK: Issuing DLC_CONNECT_STATION
TK: Station connected.
SDLC support for the ICA card is modeled after the IBM data link control (DLC) Link Manager. This allows the 3270/SNA service and the ICA SDLC software to communicate through messages. The VINES kernel serves as a vehicle for transferring these messages between the 3270/SNA service and the SDLC software in the ICA controller only. These messages perform configuration and control functions, and transfer data to and from the link.
How the Service Communicates with the ICA Card
The 3270/SNA service uses the following messages to communicate with the ICA card:
CONFIGLS configures the link. It contains information about the link such as buffer size, Non-Return to Zero Inverted (NRZI) on or off, window size, and request to send (RTS) setting.
CONFIGALS configures a logical station on the link. It contains the information about the logical station, such as station address, station window size, and retry counters.
ACTLINK activates the link. It causes the ICA card to assert data terminal ready (DTR). The ICA card should always signal ACTLINK complete.
ACTCONIN activates a switched connection. The 3270/SNA service restricts its use of this request to lines configured as switched. The message causes the ICA card to drop DTR to guarantee that a new connection is established. Then the ICA card asserts DTR, and the card starts a background timer to look for data set ready (DSR). The ICA card should always signal ACTCONIN complete.
CONINSUC indicates that an attempt to establish a switched connection is successful. The ICA SDLC software generates this request as a result of a previous ACTCONIN only. It indicates DSR was seen by the ICA SDLC code.
XIDSIG indicates that the ICA SDLC software encountered an XID request. In general, this should only happen on switched lines. The ICA SDLC software also attempts to send the XID response at the same time it notifies the 3270/SNA service of reception of the XID request.
CONTACT prepares the logical station to enter normal response mode (NRM). If the host transmits SNRM, the ICA SDLC software transmits UA and enters NRM.
CONTACTD indicates that the ICA SDLC software received a SNRM and the ICA has entered NRM.
INOP indicates that the ICA SDLC software encountered an error. A specific reason may be included. INOP sense codes that describe these reasons are described below.
0x0000 - Usually indicates an error in mode FSM. 0x00E0 - Indicates that the retry time-out error threshold was reached. 0x00E2 - Indicates that a frame less than 2 bytes was received. 0x00E3 - Indicates that a frame with an invalid station address was received. 0x00F7 - Indicates that no heap space is available. 0x00F8 - Indicates that DSR has gone away. 0x00F9 - Indicates that the modem interface failed to assert clear to send (CTS) after the ICA card raised RTS.
Sample SDLC Communication Events
The following samples show how 3270/SNA service communication events over SDLC links are recorded in the service log files. The first sample shows the activation of an SDLC leased line. Comments are included in quotes in the sample. These comments do not appear in real log files.
Notice the INOP message logged at 14:17:41 with sense code 0x0000. This sense code generally indicates an error in the mode finite state machine. This means that the wrong SDLC request is received for the current state.
*** Thu Jan 14 14:17:18 1988
14:17:18 SNA Service sna@corp@Servers initializing
14:17:27 SDLCv2 Ready! (Issuing SO_CONNECT request)
"3270/SNA binding to ICA"
SDLCv2 SO_CONNECT normal completion "Binding was succuessful"
SDLCv2 posting CONFIGLS "3270/SNA configuring link"
SDLCv2 posting CONFIGALS "3270/SNA configuring link station"
SDLCv2 posting ACTLINK "Activates link (asserts DTR)"
SDLCv2 ACTLINK complete
SDLCv2 posting CONTACT "Ready to accept SNRM"
14:17:41 SDLCv2 received INOP sense: 0x0000 "Received something other than SNRM"
14:17:44 SDLCv2 Ready! (Issuing SO_CONNECT request)
SDLCv2 SO_CONNECT normal completion
SDLCv2 posting CONFIGLS
SDLCv2 posting CONFIGALS
SDLCv2 posting ACTLINK
SDLCv2 ACTLINK complete
SDLCv2 posting CONTACT
14:18:16 SDLCv2 received CONTACTD "Received a SNRM"
17:37:47 SDLCv2 received INOP sense: 0x00f8 "Lost DSR"
17:37:48 SDLCv2 Ready! (Issuing SO_CONNECT request)
SDLCv2 SO_CONNECT normal completion
SDLCv2 posting CONFIGLS
SDLCv2 posting CONFIGALS
SDLCv2 posting ACTLINK
SDLCv2 ACTLINK complete
SDLCv2 posting CONTACT
The second sample shows the activation of an SDLC switched line. Comments are included in quotes in the sample. These comments do not appear in real log files.
*** Tue Jan 19 09:07:23 1988
09:07:23 SNA Service sna@palm@Servers initializing
09:07:32 SDLCv2 Ready! (Issuing SO_CONNECT request)
SDLCv2 SO_CONNECT normal completion
SDLCv2 posting CONFIGLS
SDLCv2 posting CONFIGALS
SDLCv2 posting ACTLINK
SDLCv2 ACTLINK complete
SDLCv2 posting ACTCONIN "Switched activation connection request"
09:07:33 SDLCv2 ACTCONIN complete
09:07:34 SDLCv2 received CONINSUC "Indicates DSR was asserted"
09:08:24 SDLCv2 received XIDSIG "Primary request secondary's XID"
SDLCv2 posting CONTACT "3270/SNA service preparing for NRM"
SDLCv2 received CONTACTD "SNRM received by ICA SDLC"
09:08:42 SDLCv2 received INOP sense: 0x00f8 "DSR dropped"
SDLCv2 Ready! (Issuing SO_CONNECT request)
SDLCv2 SO_CONNECT normal completion
SDLCv2 posting CONFIGLS
SDLCv2 posting CONFIGALS
SDLCv2 posting ACTLINK
SDLCv2 ACTLINK complete
SDLCv2 posting ACTCONIN
09:08:43 SDLCv2 ACTCONIN complete
09:08:54 SDLCv2 received CONINSUC
09:08:55 SDLCv2 received XIDSIG
SDLCv2 posting CONTACT
SDLCv2 received CONTACTD
09:09:14 SDLCv2 received INOP sense: 0x00f8
SDLCv2 Ready! (Issuing SO_CONNECT request)
SDLCv2 SO_CONNECT normal completion
SDLCv2 posting CONFIGLS
SDLCv2 posting CONFIGALS
SDLCv2 posting ACTLINK
SDLCv2 ACTLINK complete
SDLCv2 posting ACTCONIN
09:09:15 SDLCv2 ACTCONIN complete
For display LUs, VINES 3270 emulation provides these 3270 data stream functions:
Commands:
WRITE,
ERASE/WRITE,
READ BUFFER,
READ MODIFIED,
READ MODIFIED ALL,
SHORT READ,
WRITE STRUCTURED FIELD (types include SET REPLY MODE, ERASE/RESET, OUTBOUND 3270DS, and READ PARTITION/QUERY)Orders:
START FIELD,
SET BUFFER ADDRESS,
INSERT CURSOR,
PROGRAM TAB,
REPEAT TO ADDRESS,
ERASE UNPROTECTED TO ADDRESS,
SET ATTRIBUTE,
MODIFY FIELD,
START FIELD EXTENDEDAttributes:
PROTECTED,
UNPROTECTED,
ALPHANUMERIC,
NUMERIC,
NONDISPLAY,
DISPLAY,
INTENSIFIEDExtended Attributes:
COLOR (red, white, blue, green, turquoise, yellow, pink),
HIGHLIGHT (normal, reverse, blinking, underline).
Supported keyboard functions include the following:
PF1-PF24,
PA1-PA3,
ATTENTION,
ALT CURSOR,
BACKSPACE,
FLIP,
HOTKEY (VINES enhancement),
LEFT,
LEFT 2,
NEXTLINE,
RIGHT,
RIGHT 2,
UP,
SYS REQ,
CLEAR,
ERASE INPUT,
ERASE EOF,
HOME,
BACKTAB,
NEWLINE,
INSERT MODE,
DELETE,
RESET,
DUP,
FM,
PRINT,
HELP,
PRINT REDIRECTION (VINES enhancement).
Supported print functions include the following:
Operator Initiated Print (through the PRINT key). Host Initiated Copy (through START PRINT in WCC). Host Initiated Print of DSC or SCS streams. The following SCS control codes: BS, BELL, CR, FF, HT, IRS, LF, NL, SHF, SVF, TRN, VT. Other control codes are accepted, but not interpreted. Each printer is associated with a particular display. The emulation provides Between Bracket Printer Sharing between the display and the printer logical units.
The following features are specific to the VINES implementation of 3270/SNA:
DOS application program interface - A list of supported calls is available in the document VINES Programmer's Interface (DOS). Logical unit access control - Based on VINES user names. Logical unit location security - Lets you restrict access to LUs to specific locations in the VINES network. Modifiable keyboard definitions - Creation and editing of special files loaded prior to entering emulation. Modifiable translation of extended attributes by PC adapters - Creation and editing of special files loaded prior to entering emulation. Disk capture of print data - As specified by the end user during emulation sessions.