The synchronous data link control (SDLC) device manager (DLCSDLC) supports SDLC protocol and state tables.
DLCSDLC supports two station types:
DLCSDLC supports two modes of operation:
Single-PU mode allows a single open per port. In this mode, only one DLC_ENABLE_SAP ioctl operation is allowed per port. All additional DLC_ENABLE_SAP ioctl operations are rejected with an errno value of EINVAL. In addition, only one file descriptor can be used to issue read, write, and ioctl operations. When multiple applications wish to use the same port, only one application can obtain the file descriptor, making it difficult to share the port.
SDLC multiple-PU secondary support allows multiple secondary stations (up to 254) to occupy a single physical port, and operate concurrently by multiplexing on the single-byte link-station address field found in each receive packet. Multiple-PU support also allows multiple applications to issue opens and DLC_ENABLE_SAP and DLC_START_LS ioctl operations on the same physical port, independent of other applications on that port.
For migration purposes, multiple-PU support is activated only if the first open per port to the /dev/dlcsdlc file is extended with the dlc_open_ext structure and the maxsaps (maximum service access points) field is set to a value between 2 and 127, inclusive. This type of open operation allows DLCSDLC to switch from the original single-PU operation to multiple-PU operation. Only secondary link stations are allowed to be started in multiple-PU mode.
One channel owns the service access point (SAP) on a single port since a single network configuration is supported for each port. However, subsequent DCL_ENABLE_SAP ioctl operations issued when the port is already activated fail with an errno value of EBUSY instead of EINVAL. The current SAP correlator value (gdlc_sap_corr) is returned on these EBUSY conditions, enabling subsequent commands to be issued to DLCSDLC, even though a different user process may own the SAP.
Any address between 0x01 and 0xFE may be specified as the local secondary link station address. Secondary station address 0x00 is not valid. Station address 0xFF is reserved for broadcast communication. Any packets received with address 0xFF are passed to a single active link station for subsequent response on a port. Any additional active link stations on that port do not receive the packet.
All communication between the local and remote stations is accomplished by the transmission of frames. The SDLC frame format consists of:
|Unique flag sequence (B`01111110')||1 byte|
|Station link address field||1 byte|
|Control field||1 byte|
|Information field||n bytes|
|Frame check sequence||2 bytes|
|Unique flag sequence (B`01111110')||1 byte|
Three kinds of SDLC frames exist: information, supervisory, and unnumbered. Information frames transport sequenced user data between the local and remote stations. Supervisory frames carry control parameters relative to the sequenced data transfer. Unnumbered frames transport the controls relative to nonsequenced transfers.
Both normal disconnect mode (NDM) and normal response mode (NRM) are supported. NDM is entered by default whenever a session is initiated, and is switched to NRM only after completion of the set normal response mode/unnumbered acknowledge (SNRM/UA) command sequence. Once operating in NRM, information frames containing user data can be transferred. NRM then remains active until termination of the SDLC session, which occurs due to the disconnect/unnumbered acknowledge (DISC/UA) command sequence or a major link error. Once termination is complete, SDLC activity halts, and the NDM/NRM modes are not re-entered until another session is initiated.
The supported station link address field is nonextended and consists of either the all-stations (broadcast) address or a single unique 8-bit value other than the all-zeros (null) address. The secondary station's address can be any value from 1 through 254. Address value 255 (broadcast) is only used by the primary station for initial contact of a point-to-point secondary station type, where the secondary's address is unknown. Once contact has been made, the secondary station's returned address is used exclusively for the remainder of the session.
All commands are generated by the primary station for the secondary station. Each command carries the poll indicator to request immediate response, except when sending multiple information frames. Information frames that are concatenated have the poll indicator turned on in the last frame of the burst. The commands supported are:
|Information||Sends sequenced user data from the primary station to the secondary station, and acknowledges any received information frames.|
|Receive Ready||Indicates that receive storage is available and acknowledges any received information frames. This receive ready command is a supervisory command.|
|Receive Not Ready||Indicates receive storage is not available and acknowledges any received information frames. The receive not ready command is a supervisory command.|
|Disconnect||Requests the logical and physical disconnection of the link. The disconnect command is an unnumbered command.|
|Set Normal Response Mode||Requests entry into normal response mode and resets the information sequence counts. The setnormal response mode command is an unnumbered command.|
|Test||Solicits an echoed TEST response from the secondary station and can carry an optional information field. The test command is an unnumbered command.|
|Exchange Station Identification||Solicits an exchange identification (XID) response that contains either the station identification of the secondary station or link negotiation information that allows the alteration of the primary or secondary relationship by the user. The exchange station identification command is an unnumbered command.|
All responses are generated by the secondary station for the primary station. Each response carries the final indicator to specify send completion, except when sending multiple information frames. Information frames that are concatenated have the final indicator on in the last frame of the burst. The responses supported are:
|Information||Sends sequenced user data from the secondary station to the primary station. It also acknowledges any received information frames.|
|Receive Ready||Indicates receive storage is available and acknowledges any received information frames. The receive ready response is a supervisory response.|
|Receive Not Ready||Indicates receive storage is not available and acknowledges any received information frames. The receive not ready response is a supervisory response.|
|Frame Reject|| Indicates that the secondary station detects a problem in a command frame that otherwise had a valid frame check sequence in normal response mode. The frame reject response is an unnumbered response. The types of frame reject supported are:
|Disconnected Mode||Indicates that the secondary station is in normal disconnect mode. The disconnected mode response is an unnumbered response.|
|Unnumbered Acknowledge||Acknowledges receipt of the set normal response mode or disconnect commands that were sent by the primary station. The unnumbered acknowledge response is an unnumbered response.|
|Test||Echoes the TEST command frame sent by the primary station, and carries the information field received only if sufficient storage is available. The test response is an unnumbered response.|
|Exchange Station Identification||Contains the station identification of the secondary station. The exchange station identification response is an unnumbered response.|