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:
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: