| OpenSS7 SS7 for the Common Man | © Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. Last modified: Sun, 05 Mar 2006 08:34:07 GMT | ||||||||||||||||
| |||||||||||||||||
| DLPI DocumentationDescription: OpenSS7 Project Library Transport DLPIA PDF version of this document is available here. OpenSS7 XNS NetworkingData Link Provider Interface1 IntroductionThis document specifies a STREAMS kernel-level instantiation of the ISO Data Link Service Definition DIS 88861 and Logical Link Control DIS 8802/2 (LLC)2. Where the two standards do not conform, DIS 8886 prevails. The Data Link Provider Interface (DLPI) enables a data link service user to access and use any of a variety of conforming data link service providers without special knowledge of the provider's protocol. Specifically, the interface is intended to support X.25 LAPB, BX.25 level 2, SDLC, ISDN LAPD, Ethernet(TM), CSMA/CD, FDDI, token ring, token bus, and Bisync. Among the expected data link service users are implementations of the OSI network layer and SNA path control. The interface specifies access to data link service providers, and does not define a specific protocol implementation. Thus, issues of network management, protocol performance, and performance analysis tools are beyond the scope of this document and should be addressed by specific implementations of a data link provider. However, accompanying each provider implementation should be information that describes the protocol-specific behavior of that provider. Currently, there are plans to come up with a set of implementor's agreements/guidelines for common data link providers. These agreements will address issues such as DLSAP address space, subsequent addresses, PPA access and control, QOS, supported services etc. This specification assumes the reader is familiar with OSI Reference Model[4] terminology, OSI Data Link Services, and STREAMS. 1.1 Document OrganizationThis specification is organized as follows: * Model of the Data Link Layer, presents background on the structure of the data link layer of the OSI Reference Model, and explains the intended architecture in the STREAMS environment. Data link addressing concepts are also presented. * DLPI Services, presents an overview of the services provided by DLPI. * DLPI Primitives, describes the detailed syntax and semantics of each DLPI primitive that crosses the data link interface. * Quality of Data Link Service, describes the quality-of-service parameters supported by DLPI and the rules for negotiating/selecting the values of those parameters. * Optional Primitives to perform Essential Management Functions, optional primitives to perform certain essential management functions. * Allowable Sequence of DLPI Primitives, describes the allowable sequence of DLPI primitives that may be issued across the interface. * Precedence of DLPI Primitives, presents a summary of the precedence of DLPI primitives as they are queued by the DLS provider and/or DLS user. * Glossary of DLPI Terms and Acronyms, presents a Glossary of DLPI Terms and Acronyms. * Guidelines for Protocol Independent DLS Users, summarizes guidelines a DLS user implementation must follow to be fully protocol-independent. * Required Information for DLS Provider-Specific Addenda, presents the information that should be documented for each DLS provider implementation. * DLPI Header File, presents the header file containing DLPI structure and constant definitions needed by a DLS user or provider implemented to use the interface. 2 Model of the Data Link LayerThe data link layer (layer 2 in the OSI Reference Model) is responsible for the transmission and error-free delivery of bits of information over a physical communications medium. The model of the data link layer is presented here to describe concepts that are used throughout the specification of DLPI. It is described in terms of an interface architecture, as well as addressing concepts needed to identify different components of that architecture. The description of the model assumes familiarity with the OSI Reference Model. 2.1 Model of the Service InterfaceEach layer of the OSI Reference Model has two standards:
DLPI is an implementation of the first type of standard. It specifies an interface to the services of the data link layer. The following figure depicts the abstract view of DLPI. ![]() Figure 1. Abstract View of DLPI
The data link interface is the boundary between the network and data link layers of the OSI Reference Model. The network layer entity is the user of the services of the data link interface (DLS user), and the data link layer entity is the provider of those services (DLS provider). This interface consists of a set of primitives that provide access to the data link layer services, plus the rules for using those primitives (state transition rules). A data link interface service primitive might request a particular service or indicate a pending event. To provide uniformity among the various UNIX system networking products, an effort is underway to develop service interfaces that map to the OSI Reference Model. A set of kernel-level interfaces, based on the STREAMS development environment, constitute a major portion of this effort. The service primitives that make up these interfaces are defined as STREAMS messages that are transferred between the user and provider of the service. DLPI is one such kernel-level interface, and is targeted for STREAMS protocol modules that either use or provide data link services. In addition, user programs that wish to access a STREAMS-based data link provider directly may do so using the putmsg(2) and getmsg(2) system calls. Referring to the abstract view of DLPI (Figure 1), the DLS provider is configured as a STREAMS driver, and the DLS user accesses the provider using open(2) to establish a stream to the DLS provider. The stream acts as a communication endpoint between a DLS user and the DLS provider. After the stream is created, the DLS user and DLS provider communicate via the messages presented later in this specification. DLPI is intended to free data link users from specific knowledge of the characteristics of the data link provider. Specifically, the definition of DLPI hopes to achieve the goal of allowing a DLS user to be implemented independent of a specific communications medium. Any data link provider (supporting any communications medium) that conforms to the DLPI specification may be substituted beneath the DLS user to provide the data link services. Support of a new DLS provider should not require any changes to the implementation of the DLS user. 2.2 Modes of CommunicationThe data link provider interface supports three modes of communication: connection, connectionless and acknowledged connectionless. The connection mode is circuit-oriented and enables data to be transferred over a pre-established connection in a sequenced manner. Data may be lost or corrupted in this service mode, however, due to provider-initiated resynchronization or connection aborts. The connectionless mode is message-oriented and supports data transfer in self-contained units with no logical relationship required between units. Because there is no acknowledgment of each data unit transmission, this service mode can be unreliable in the most general case. However, a specific DLS provider can provide assurance that messages will not be lost, duplicated, or reordered. The acknowledged connectionless mode provides the means by which a data link user can send data and request the return of data at the same time. Although the exchange service is connectionless, in-sequence delivery is guaranteed for data sent by the initiating station. The data unit transfer is point-to-point. 2.2.1 Connection-mode ServiceThe connection-mode service is characterized by four phases of communication: local management, connection establishment, data transfer, and connection release. 2.2.1.1 Local ManagementThis phase enables a DLS user to initialize a stream for use in communication and establish an identity with the DLS provider. 2.2.1.2 Connection EstablishmentThis phase enables two DLS users to establish a data link connection between them to exchange data. One user (the calling DLS user) initiates the connection establishment procedures, while another user (the called DLS user) waits for incoming connect requests. The called DLS user is identified by an address associated with its stream (as will be discussed shortly). A called DLS user may either accept or deny a request for a data link connection. If the request is accepted, a connection is established between the DLS users and they enter the data transfer phase. For both the calling and called DLS users, only one connection may be established per stream. Thus, the stream is the communication endpoint for a data link connection. The called DLS user may choose to accept a connection on the stream where it received the connect request, or it may open a new stream to the DLS provider and accept the connection on this new, responding stream. By accepting the connection on a separate stream, the initial stream can be designated as a listening stream through which all connect requests will be processed. As each request arrives, a new stream (communication endpoint) can be opened to handle the connection, enabling subsequent requests to be queued on a single stream until they can be processed. 2.2.1.3 Data TransferIn this phase, the DLS users are considered peers and may exchange data simultaneously in both directions over an established data link connection. Either DLS user may send data to its peer DLS user at any time. Data sent by a DLS user is guaranteed to be delivered to the remote user in the order in which it was sent. 2.2.1.4 Connection ReleaseThis phase enables either the DLS user, or the DLS provider, to break an established connection. The release procedure is considered abortive, so any data that has not reached the destination user when the connection is released may be discarded by the DLS provider. 2.2.2 Connectionless-mode ServiceThe connectionless mode service does not use the connection establishment and release phases of the connection-mode service. The local management phase is still required to initialize a stream. Once initialized, however, the connectionless data transfer phase is immediately entered. Because there is no established connection, however, the connectionless data transfer phase requires the DLS user to identify the destination of each data unit to be transferred. The destination DLS user is identified by the address associated with that user (as will be discussed shortly). Connectionless data transfer does not guarantee that data units will be delivered to the destination user in the order in which they were sent. Furthermore, it does not guarantee that a given data unit will reach the destination DLS user, although a given DLS provider may provide assurance that data will not be lost. 2.2.3 Acknowledged Connectionless-mode ServiceThe acknowledged connectionless mode service also does not use the connection establishment and release phases of the connection-mode service. The local management phase is still required to initialize a stream. Once initialized, the acknowledged connectionless data transfer phase is immediately entered. Acknowledged connectionless data transfer guarantees that data units will be delivered to the destination user in the order in which they were sent. A data link user entity can send a data unit to the destination DLS User, request a previously prepared data unit from the destination DLS User, or exchange data units. 2.3 DLPI AddressingEach user of DLPI must establish an identity to communicate with other data link users. This identity consists of two pieces. First, the DLS user must somehow identify the physical medium over which it will communicate. This is particularly evident on systems that are attached to multiple physical media. Second, the DLS user must register itself with the DLS provider so that the provider can deliver protocol data units destined for that user. The following figure illustrates the components of this identification approach, which are explained below. ![]() Figure 2. Data Link Addressing Components
2.3.1 Physical Attachment IdentificationThe physical point of attachment (PPA in Figure 2) is the point at which a system attaches itself to a physical communications medium. All communication on that physical medium funnels through the PPA. On systems where a DLS provider supports more than one physical medium, the DLS user must identify which medium it will communicate through. A PPA is identified by a unique PPA identifier . For media that support physical layer multiplexing of multiple channels over a single physical medium (such as the B and D channels of ISDN), the PPA identifier must identify the specific channel over which communication will occur. Two styles of DLS provider are defined by DLPI, distinguished by the way they enable a DLS user to choose a particular PPA. The style 1 provider assigns a PPA based on the major/minor device the DLS user opened. One possible implementation of a style 1 driver would reserve a major device for each PPA the data link driver would support. This would allow the STREAMS clone open feature to be used for each PPA configured. This style of provider is appropriate when few PPAs will be supported. If the number of PPAs a DLS provider will support is large, a style 2 provider implementation is more suitable. The style 2 provider requires a DLS user to explicitly identify the desired PPA using a special attach service primitive. For a style 2 driver, the open(2) creates a stream between the DLS user and DLS provider, and the attach primitive then associates a particular PPA with that stream. The format of the PPA identifier is specific to the DLS provider, and should be described in the provider-specific addendum documentation. DLPI provides a mechanism to get and/or modify the physical address. The primitives to handle these functions are described in Optional Primitives to perform Essential Management Functions. The physical address value can be modified in a post-attached state. This would modify the value for all streams for that provider for a particular PPA. The physical address cannot be modified if even a single stream for that PPA is in the bound state. The DLS User uses the supported primitives (DL_ATTACH_REQ, DL_BIND_REQ, DL_ENABMULTI_REQ, DL_PROMISCON_REQ) to define a set of enabled physical and SAP address components on a per Stream basis. It is invalid for a DLS Provider to ever send upstream a data message for which the DLS User on that stream has not requested. The burden is on the provider to enforce by any means that it chooses, the isolation of SAP and physical address space effects on a per-stream basis. 2.3.2 Data Link User IdentificationA data link user's identity is established by associating it with a data link service access point (DLSAP), which is the point through which the user will communicate with the data link provider. A DLSAP is identified by a DLSAP address. The DLSAP address identifies a particular data link service access point that is associated with a stream (communication endpoint). A bind service primitive enables a DLS user to either choose a specific DLSAP by specifying its DLSAP address, or to determine the DLSAP associated with a stream by retrieving the bound DLSAP address. This DLSAP address can then be used by other DLS users to access a specific DLS user. The format of the DLSAP address is specific to the DLS provider, and should be described in the provider-specific addendum documentation. However, DLPI provides a mechanism for decomposing the DLSAP address into component pieces. The DL_INFO_ACK primitive returns the length of the SAP component of the DLSAP address, along with the total length of the DLSAP address. Certain DLS Providers require the capability of binding on multiple DLSAP addresses. This can be achieved through subsequent binding of DLSAP addresses. DLPI supports peer and hierarchical binding of DLSAPs. When the User requests peer addressing, the DLSAP specified in a subsequent bind may be used in lieu of the DLSAP bound in the DL_BIND_REQ. This will allow for a choice to be made between a number of DLSAPs on a stream when determining traffic based on DLSAP values. An example of this would be to specify various ether_type values as DLSAPs. The DL_BIND_REQ, for example, could be issued with ether_type value of IP, and a subsequent bind could be issued with ether type value of ARP. The Provider may now multiplex off of the ether_type field and allow for either IP or ARP traffic to be sent up this stream. When the DLS User requests hierarchical binding, the subsequent bind will specify a DLSAP that will be used in addition to the DLSAP bound using a DL_BIND_REQ. This will allow additional information to be specified, that will be used in a header or used for de-multiplexing. An example of this would be to use hierarchical bind to specify the OUI (Organizationally Unique Identifier) to be used by SNAP. If a DLS Provider supports peer subsequent bind operations, the first SAP that is bound is used as the source SAP when there is ambiguity. DLPI supports the ability to associate several streams with a single DLSAP, where each stream may be a unique data link connection endpoint. However, not all DLS providers can support such configurations because some DLS providers may have no mechanism beyond the DLSAP address for distinguishing multiple connections. In such cases, the provider will restrict the DLS user to one stream per DLSAP. 2.4 The Connection Management StreamThe earlier description of the connection-mode service assumed that a DLS user bound a DLSAP to the stream it would use to receive connect requests. In some instances, however, it is expected that a given service may be accessed through any one of several DLSAPs. To handle this scenario, a separate stream would be required for each possible destination DLSAP, regardless of whether any DLS user actually requested a connection to that DLSAP. Obvious resource problems can result in this scenario. To obviate the need for tying up system resources for all possible destination DLSAPs, a "connection management stream" utility is defined in DLPI. A connection management stream is one that receives any connect requests that are not destined for currently bound DLSAPs capable of receiving connect indications. With this mechanism, a special listener can handle incoming connect requests intended for a set of DLSAPs by opening a connection management stream to the DLS provider that will retrieve all connect requests arriving through a particular PPA. In the model, then, there may be a connection management stream per PPA. 3 DLPI ServicesThe various features of the DLPI interface are defined in terms of the services provided by the DLS provider, and the individual primitives that may flow between the DLS user and DLS provider. The data link provider interface supports three modes of service: connection, connectionless and acknowledged connectionless. The connection mode is circuit-oriented and enables data to be transferred over an established connection in a sequenced manner. The connectionless mode is message-oriented and supports data transfer in self-contained units with no logical relationship required between units. The acknowledged connectionless mode is message-oriented and guarantees that data units will be delivered to the destination user in the order in which they were sent. This specification also defines a set of local management functions that apply to all modes of service. The XID and TEST services that are supported by DLPI are listed below. The DLS User can issue an XID or TEST request to the DLS Provider. The Provider will transmit an XID or TEST frame to the peer DLS Provider. On receiving a response, the DLS Provider sends a confirmation primitive to the DLS User. On receiving an XID or TEST frame from the peer DLS Provider, the local DLS Provider sends up an XID or TEST indication primitive to the DLS User. The User must respond with an XID or TEST response frame to the Provider. The services are tabulated below and described more fully in the remainder of this section. ![]() Table 1a. Cross-Reference of DLS Services and Primitives
![]() Table 1b. Cross-Reference of DLS Services and Primitives
![]() Table 1c. Cross-Reference of DLS Services and Primitives
3.1 Local Management ServicesThe local management services apply to the connection, connectionless and acknowledged connectionless modes of transmission. These services, which fall outside the scope of standards specifications, define the method for initializing a stream that is connected to a DLS provider. DLS provider information reporting services are also supported by the local management facilities. 3.1.1 Information Reporting ServiceThis service provides information about the DLPI stream to the DLS user. The message DL_INFO_REQ requests the DLS provider to return operating information about the stream. The DLS provider returns the information in a DL_INFO_ACK message. ![]() Figure 3. Message Flow: Information Reporting
3.1.2 Attach ServiceThe attach service assigns a physical point of attachment (PPA) to a stream. This service is required for style 2 DLS providers (see Physical Attachment Identification) to specify the physical medium over which communication will occur. The DLS provider indicates success with a DL_OK_ACK; failure with a DL_ERROR_ACK. The normal message sequence is illustrated in the following figure. ![]() Figure 4. Message Flow: Attaching a Stream to a Physical Line
A PPA may be disassociated with a stream using the DL_DETACH_REQ. The normal message sequence is illustrated in the following figure. ![]() Figure 5. Message Flow: Detaching a Stream from a Physical Line
3.1.3 Bind ServiceThe bind service associates a data link service access point (DLSAP) with a stream. The DLSAP is identified by a DLSAP address. DL_BIND_REQ requests that the DLS provider bind a DLSAP to a stream. It also notifies the DLS provider to make the stream active with respect to the DLSAP for processing connectionless and acknowledged connectionless data transfer and connection establishment requests. Protocol-specific actions taken during activation should be described in DLS provider-specific addenda. The DLS provider indicates success with a DL_BIND_ACK; failure with a DL_ERROR_ACK. Certain DLS providers require the capability of binding on multiple DLSAP addresses. DL_SUBS_BIND_REQ provides that added capability. The DLS provider indicates success with a DL_SUBS_BIND_ACK; failure with a DL_ERROR_ACK. The normal flow of messages is illustrated in the following figure. ![]() Figure 6. Message Flow: Binding a Stream to a DLSAP
DL_UNBIND_REQ requests the DLS provider to unbind all DLSAP(s) from a stream. The DL_UNBIND_REQ also unbinds all the subsequently bound DLSAPs that have not been unbound. The DLS provider indicates success with a DL_OK_ACK; failure with a DL_ERROR_ACK. DL_SUBS_UNBIND_REQ requests the DLS Provider to unbind the subsequently bound DLSAP. The DLS Provider indicates success with a DL_OK_ACK; failure with a DL_ERROR_ACK. ![]() Figure 7. Message Flow: Unbinding a Stream from a DLSAP
DL_ENABMULTI_REQ requests the DLS Provider to enable specific multicast addresses on a per stream basis. The Provider indicates success with a DL_OK_ACK; failure with a DL_ERROR_ACK. ![]() Figure 8. Message Flow: Enabling a specific multicast address on a Stream
DL_DISABMULTI_REQ requests the DLS Provider to disable specific multicast addresses on a per Stream basis. The Provider indicates success with a DL_OK_ACK; failure with a DL_ERROR_ACK. ![]() Figure 9. Message Flow: Disabling a specific multicast address on a Stream
DL_PROMISCON_REQ requests the DLS Provider to enable promiscuous mode on a per Stream basis, either at the physical level or at the SAP level. The Provider indicates success with a DL_OK_ACK; failure with a DL_ERROR_ACK. ![]() Figure 10. Message Flow: Enabling promiscuous mode on a Stream
DL_PROMISCOFF_REQ requests the DLS Provider to disable promiscuous mode on a per Stream basis, either at the physical level or at the SAP level. The Provider indicates success with a DL_OK_ACK; failure with a DL_ERROR_ACK. ![]() Figure 11. Message Flow: Disabling promiscuous mode on a Stream
3.2 Connection-mode ServicesThe connection-mode services enable a DLS user to establish a data link connection, transfer data over that connection, reset the link, and release the connection when the conversation has terminated. 3.2.1 Connection Establishment ServiceThe connection establishment service establishes a data link connection between a local DLS user and a remote DLS user for the purpose of sending data. Only one data link connection is allowed on each stream. 3.2.1.1 Normal Connection EstablishmentIn the connection establishment model, the calling DLS user initiates connection establishment, while the called DLS user waits for incoming requests. DL_CONNECT_REQ requests that the DLS provider establish a connection. DL_CONNECT_IND informs the called DLS user of the request, which may be accepted using DL_CONNECT_RES. DL_CONNECT_CON informs the calling DLS user that the connection has been established. The normal sequence of messages is illustrated in the following figure. ![]() Figure 12. Message Flow: Successful Connection Establishment
Once the connection is established, the DLS users may exchange user data using DL_DATA_REQ and DL_DATA_IND. The DLS user may accept an incoming connect request on either the stream where the connect indication arrived or an alternate, responding stream. The responding stream is indicated by a token in the DL_CONNECT_RES. This token is a value associated with the responding stream, and is obtained by issuing a DL_TOKEN_REQ on that stream. The DLS provider responds to this request by generating a token for the stream and returning it to the DLS user in a DL_TOKEN_ACK. The normal sequence of messages for obtaining a token is illustrated in the following figure. ![]() Figure 13. Message Flow: Token Retrieval
In the typical connection establishment scenario, the called DLS user processes one connect indication at a time, accepting the connection on another stream. Once the user responds to the current connect indication, the next connect indication (if any) can be processed. DLPI also enables the called DLS user to multi-thread incoming connect indications. The user can receive multiple connect indications before responding to any of them. This enables the DLS user to establish priority schemes on incoming connect requests. 3.2.1.2 Connection Establishment RejectionsIn certain situations, the connection establishment request cannot be completed. The following paragraphs describe the occasions under which DL_DISCONNECT_REQ and DL_DISCONNECT_IND primitives will flow during connection establishment, causing the connect request to be aborted. The following figure illustrates the situation where the called DLS user chooses to reject the connect request by issuing DL_DISCONNECT_REQ instead of DL_CONNECT_RES. ![]() Figure 14. Message Flow: Called DLS User Rejection of Connection Establishment Attempt
The following figure illustrates the situation where the DLS provider rejects a connect request for lack of resources or other reason. The DLS provider sends DL_DISCONNECT_IND in response to DL_CONNECT_REQ. ![]() Figure 15. Message Flow: DLS Provider Rejection of a Connection Establishment Attempt
The following figures illustrate the situation where the calling DLS user chooses to abort a previous connection attempt. The DLS user issues DL_DISCONNECT_REQ at some point following a DL_CONNECT_REQ. The resulting sequence of primitives depends on the relative timing of the primitives involved, as defined in the following time sequence diagrams. ![]() Figure 16. Message Flow: Both Primitives are Destroyed by Provider
![]() Figure 17. Message Flow: DL_DISCONNECT Indication Arrives before DL_CONNECT Response is Sent
![]() Figure 18. Message Flow: DL_DISCONNECT Indication Arrives after DL_CONNECT Response is Sent
3.2.2 Data Transfer ServiceThe connection-mode data transfer service provides for the exchange of user data in either direction or in both directions simultaneously between DLS users. Data is transmitted in logical groups called data link service data units (DLSDUs). The DLS provider preserves both the sequence and boundaries of DLSDUs as they are transmitted. Normal data transfer is neither acknowledged nor confirmed. It is up to the DLS users, if they so choose, to implement a confirmation protocol. Each DL_DATA_REQ primitive conveys a DLSDU from the local DLS user to the DLS provider. Similarly, each DL_DATA_IND primitive conveys a DLSDU from the DLS provider to the remote DLS user. The normal flow of messages is illustrated in the figure below. ![]() Figure 19. Message Flow: Normal Data Transfer
3.2.3 Connection Release ServiceThe connection release service provides for the DLS users or the DLS provider to initiate the connection release. Connection release is an abortive operation, and any data in transit (has not been delivered to the DLS user) may be discarded. DL_DISCONNECT_REQ requests that a connection be released. DL_DISCONNECT_IND informs the DLS user that a connection has been released. Normally, one DLS user requests disconnection and the DLS provider issues an indication of the ensuing release to the other DLS user, as illustrated by the message flow in the following figure. ![]() Figure 20. Message Flow: DLS User-Invoked Connection Release
The next figure illustrates that when two DLS users independently invoke the connection release service, neither receives a DL_DISCONNECT_IND. ![]() Figure 21. Message Flow: Simultaneous DLS User Invoked Connection Release
The next figure illustrates that when the DLS provider initiates the connection release service, each DLS user receives a DL_DISCONNECT_IND. ![]() Figure 22. Message Flow: DLS Provider Invoked Connection Release
The next figure illustrates that when the DLS provider and the local DLS user simultaneously invoke the connection release service, the remote DLS user receives a DL_DISCONNECT_IND. ![]() Figure 23. Message Flow: Simultaneous DLS User & DLS Provider Invoked Connection Release
3.2.4 Reset ServiceThe reset service may be used by the DLS user to resynchronize the use of a data link connection, or by the DLS provider to report detected loss of data unrecoverable within the data link service. Invocation of the reset service will unblock the flow of DLSDUs if the data link connection is congested; DLSDUs may be discarded by the DLS provider. The DLS user or users that did not invoke the reset will be notified that a reset has occurred. A reset may require a recovery procedure to be performed by the DLS users. The interaction between each DLS user and the DLS provider will be one of the following:
The DL_RESET_REQ acts as a synchronization mark in the stream of DLSDUs that are transmitted by the issuing DLS user; the DL_RESET_IND acts as a synchronization mark in the stream of DLSDUs that are received by the peer DLS user. Similarly, the DL_RESET_RES acts as a synchronization mark in the stream of DLSDUs that are transmitted by the responding DLS user; the DL_RESET_CON acts as a synchronization mark in the stream of DLSDUs that are received by the DLS user which originally issued the reset. The resynchronizing properties of the reset service are that:
The complete message flow depends on the origin of the reset, which may be the DLS provider or either DLS user. The following figure illustrates the message flow for a reset invoked by one DLS user. ![]() Figure 24. Message Flow: DLS User-Invoked Connection Reset
The following figure illustrates the message flow for a reset invoked by both DLS users simultaneously. ![]() Figure 25. Message Flow: Simultaneous DLS User-Invoked Connection Reset
The following figure illustrates the message flow for a reset invoked by the DLS provider. ![]() Figure 26. Message Flow: DLS Provider-Invoked Connection Reset
The following figure illustrates the message flow for a reset invoked simultaneously by one DLS user and the DLS provider. ![]() Figure 27. Message Flow: Simultaneous DLS User & DLS Provider Invoked Connection Reset
3.3 Connectionless-mode ServicesThe connectionless-mode services enable a DLS user to transfer units of data to peer DLS users without incurring the overhead of establishing and releasing a connection. The connectionless service does not, however, guarantee reliable delivery of data units between peer DLS users (e.g. lack of flow control may cause buffer resource shortages that result in data being discarded). Once a stream has been initialized via the local management services, it may be used to send and receive connectionless data units. 3.3.1 Connectionless Data Transfer ServiceThe connectionless data transfer service provides for the exchange of user data (DLSDUs) in either direction or in both directions simultaneously without having to establish a data link connection. Data transfer is neither acknowledged nor confirmed, and there is no end-to-end flow control provided. As such, the connectionless data transfer service cannot guarantee reliable delivery of data. However, a specific DLS provider can provide assurance that messages will not be lost, duplicated, or reordered. DL_UNITDATA_REQ conveys one DLSDU to the DLS provider. DL_UNITDATA_IND conveys one DLSDU to the DLS user. The normal flow of messages is illustrated in the figure below. ![]() Figure 28. Message Flow: Connectionless Data Transfer
3.3.2 QOS Management ServiceThe QOS (Quality of Service) management service enables a DLS user to specify the quality of service it can expect for each invocation of the connectionless data transfer service. The DL_UDQOS_REQ directs the DLS provider to set the QOS parameters to the specified values. The normal flow of messages is illustrated in the figure below. ![]() Figure 29. Message Flow: Connectionless Data Transfer
3.3.3 Error Reporting ServiceThe connectionless-mode error reporting service may be used to notify a DLS user that a previously sent data unit either produced an error or could not be delivered. This service does not, however, guarantee that an error indication will be issued for every undeliverable data unit. ![]() Figure 29b. -
3.3.4 XID and TEST ServiceThe XID and TEST service enables the DLS User to issue an XID or TEST request to the DLS Provider. On receiving a response for the XID or TEST frame transmitted to the peer DLS Provider, the DLS Provider sends up an XID or TEST confirmation primitive to the DLS User. On receiving an XID or TEST frame from the peer DLS Provider, the local DLS Provider sends up an XID or TEST indication respectively to the DLS User. The DLS User must respond with an XID or TEST response primitive. If the DLS User requested automatic handling of the XID or TEST response, at bind time, the DLS Provider will send up an error acknowledgment on receiving an XID or TEST request. Also, no indications will be generated to the DLS User on receiving XID or TEST frames from the remote side. The normal flow of messages is illustrated in the figure below. ![]() Figure 30. Message Flow: XID Service
![]() Figure 31. Message Flow: TEST Service
3.4 Acknowledged Connectionless-mode ServicesThe acknowledged connectionless-mode services are designed for general use for the reliable transfer of informations between peer DLS Users. These services are intended for applications that require acknowledgment of cross-LAN data unit transfer, but wish to avoid the complexity that is viewed as being associated with the connection-mode services. Although the exchange service is connectionless, in sequence delivery is guaranteed for data sent by the initiating station. 3.4.1 Acknowledged Connectionless-mode Data Transfer ServicesThe acknowledged connectionless-mode data transfer services provide the means by which the DLS User scan exchange DLSDUs which are acknowledged at the LLC sublayer, without the establishment of a Data Link connection. The services provide a means by which a local DLS User can send a data unit to the peer DLS User, request a previously prepared data unit, or exchange data units with the peer DLS User. ![]() Figure 32. Message Flow: Acknowledged Connectionless-Mode Data Unit Transmission service
The next figure illustrates the acknowledged connectionless-mode data unit exchange service. ![]() Figure 33. Message Flow: Acknowledged Connectionless-Mode Data Unit Exchange service
The next figure illustrates the Reply Data Unit Preparation service. ![]() Figure 34. Message Flow: Acknowledged Connectionless-Mode Reply Data Unit Preparation Service
3.4.2 QOS Management ServiceThe Quality of Service (QOS) management service enables a DLS User to specify the quality of service it can expect for each invocation of the acknowledged connectionless data transfer service. The DL_UDQOS_REQ directs the DLS provider to set the QOS parameters to the specified values. The normal flow of messages is illustrated in Connectionless-mode Services. 3.4.3 Error Reporting ServiceThe acknowledged connectionless mode error reporting service is the same as the unacknowledged connectionless-mode error reporting service. For the message flow, refer to Error Reporting Service (1). 3.5 An ExampleTo bring it all together, the following example illustrates the primitives that flow during a complete, connection-mode sequence between stream open and stream close. ![]() Figure 35. Message Flow: A Connection-mode Example
4 DLPI PrimitivesThe kernel-level interface to the data link layer defines a STREAMS-based message interface between the provider of the data link service (DLS provider) and the consumer of the data link service (DLS user). STREAMS provides the mechanism in which DLPI primitives may be passed between the DLS user and DLS provider. Before DLPI primitives can be passed between the DLS user and the DLS provider, the DLS user must establish a stream to the DLS provider using open(2). The DLS provider must therefore be configured as a STREAMS driver. When interactions between the DLS user and DLS provider have completed, the stream may be closed. The STREAMS messages used to transport data link service primitives across the interface have one of the following formats:
The information contained in the M_PROTO or M_PCPROTO message blocks must begin on a byte boundary that is appropriate for structure alignment (e.g. word-aligned on the AT&T 3B2 Computer). STREAMS will allocate buffers that begin on such a boundary. However, these message blocks may contain information whose representation is described by a length and an offset within the block. An example is the DLSAP address (dl_addr_length and dl_addr_offset) in the DL_BIND_ACK primitive. The offset of such information within the message block is not guaranteed to be properly aligned for casting the appropriate data type (such as an int or a structure). Allowable Sequence of DLPI Primitives, defines the sequence in which DLPI primitives can be passed between DLS user and DLS provider, and Precedence of DLPI Primitives, summarizes the precedence rules associated with each primitive for ordering the primitives on the DLS provider and DLS user queues. The following sections describe the format of the primitives that support the services described in the previous section. The primitives are grouped into four general categories for presentation:
4.1 Local Management Service PrimitivesThis section describes the local management service primitives that are common to the connection, connectionless and acknowledged connectionless service modes. These primitives support the Information Reporting, Attach, Bind, enabling/disabling of multicast addresses and turning on/off the promiscuous mode. Once a stream has been opened by a DLS user, these primitives initialize the stream, preparing it for use. 4.1.1 PPA Initialization / De-initializationThe PPA associated with each stream must be initialized before the DLS provider can transfer data over the medium. The initialization and de-initialization of the PPA is a network management issue, but DLPI must address the issue because of the impact such actions will have on a DLS user. More specifically, DLPI requires the DLS provider to initialize the PPA associated with a stream at some point before it completes the processing of the DL_BIND_REQ. Guidelines for initialization and de-initialization of a PPA by a DLS provider are presented here. A DLS provider may initialize a PPA using the following methods:
A specific DLS provider may support either of these methods, or possibly some combination of the two, but the method implemented has no impact on the DLS user. From the DLS user's viewpoint, the PPA is guaranteed to be initialized on receipt of a DL_BIND_ACK. For automatic initialization, this implies that the DL_BIND_ACK may not be issued until the initialization has completed. If pre-initialization has not been performed and/or automatic initialization fails, the DLS provider will fail the DL_BIND_REQ. Two errors, DL_INITFAILED and DL_NOTINIT, may be returned in the DL_ERROR_ACK response to a DL_BIND_REQ if PPA initialization fails. DL_INITFAILED is returned when a DLS provider supports automatic PPA initialization, but the initialization attempt failed. DL_NOTINIT is returned when the DLS provider requires pre-initialization, but the PPA is not initialized before the DL_BIND_REQ is received. A DLS provider may handle PPA de-initialization using the following methods:
A specific DLS provider may support any of these methods, or possibly some combination of them, but the method implemented has no impact on the DLS user. From the DLS user's viewpoint, the PPA is guaranteed to be initialized and available for transmission until it closes or unbinds the stream associated with the PPA. DLS provider-specific addendum documentation should describe the method chosen for PPA initialization and de-initialization. 4.1.2 Message DL_INFO_REQ (dl_info_req_t)Requests information of the DLS provider about the DLPI stream. This information includes a set of provider-specific parameters, as well as the current state of the interface. Message FormatThe message consists of one M_PCPROTO message block, which contains the following structure. typedef struct {
ulong dl_primitive;
} dl_info_req_t;
ParametersStateThe message is valid in any state in which a local acknowledgment is not pending, as described in Allowable Sequence of DLPI Primitives. New StateThe resulting state is unchanged. ResponseThe DLS provider responds to the information request with a DL_INFO_ACK. 4.1.3 Message DL_INFO_ACK (dl_info_ack_t)This message is sent in response to DL_INFO_REQ; it conveys information about the DLPI stream to the DLS user. Message FormatThe message consists of one M_PCPROTO message block, which contains the following structure. typedef struct {
ulong dl_primitive;
ulong dl_max_sdu;
ulong dl_min_sdu;
ulong dl_addr_length;
ulong dl_mac_type;
ulong dl_reserved;
ulong dl_current_state;
long dl_sap_length;
ulong dl_service_mode;
ulong dl_qos_length;
ulong dl_qos_offset;
ulong dl_qos_range_length;
ulong dl_qos_range_offset;
ulong dl_provider_style;
ulong dl_addr_offset;
ulong dl_version;
ulong dl_brdcst_addr_length;
ulong dl_brdcst_addr_offset;
ulong dl_growth;
} dl_info_ack_t;
Parameters
StateThe message is valid in any state in response to a DL_INFO_REQ. New StateThe resulting state is unchanged. 4.1.4 Message DL_ATTACH_REQ (dl_attach_req_t)Requests the DLS provider associate a physical point of attachment (PPA) with a stream. DL_ATTACH_REQ is needed for style 2 DLS providers to identify the physical medium over which communication will transpire. The request may not be issued to a style 1 DLS provider; doing so may cause errors. The DLS provider may initialize the physical line on receipt of this primitive or the DL_BIND_REQ. Otherwise, the line must be initialized through some management mechanism before this request is issued by the DLS user. Either way, the physical link must be initialized and ready for use on successful completion of the DL_BIND_REQ. Message FormatThe message consists of one M_PROTO message block, which contains the following structure. typedef struct {
ulong dl_primitive;
ulong dl_ppa;
} dl_attach_req_t;
Parameters
StateThe message is valid in state DL_UNATTACHED. New StateThe resulting state is DL_ATTACH_PENDING. ResponseIf the attach request is successful, DL_OK_ACK is sent to the DLS user resulting in state DL_UNBOUND. If the request fails, message DL_ERROR_ACK is returned and the resulting state is unchanged. Reasons for Failure
4.1.5 Message DL_DETACH_REQ (dl_detach_req_t)For style 2 DLS providers, this requests the DLS provider detach a physical point of attachment (PPA)from a stream. The request may not be issued to a style 1 DLS provider; doing so may cause errors. Message FormatThe message consists of one M_PROTO message block, which contains the following structure. typedef struct {
ulong dl_primitive;
} dl_detach_req_t;
ParametersStateThe message is valid in state DL_UNBOUND. New StateThe resulting state is DL_DETACH_PENDING. ResponseIf the detach request is successful, DL_OK_ACK is sent to the DLS user resulting in state DL_UNATTACHED. If the request fails, message DL_ERROR_ACK is returned and the resulting state is unchanged. Reasons for Failure
4.1.6 Message DL_BIND_REQ (dl_bind_req_t)Requests the DLS provider bind a DLSAP to the stream. The DLS user must identify the address of the DLSAP to be bound to the stream. For connection-mode service, the DLS user also indicates whether it will accept incoming connection requests on the stream. Finally, the request directs the DLS provider to activate the stream associated with the DLSAP. A stream is viewed as active when the DLS provider may transmit and receive protocol data units destined to or originating from the stream. The PPA associated with each stream must be initialized upon completion of the processing of the DL_BIND_REQ (see PPA Initialization / De-initialization). More specifically, the DLS user is ensured that the PPA is initialized when the DL_BIND_ACK is received. If the PPA cannot be initialized, the DL_BIND_REQ will fail. A stream may be bound as a "connection management" stream, such that it will receive all connect requests that arrive through a given PPA (see The Connection Management Stream). In this case, the dl_sap will be ignored. Message FormatThe message consists of one M_PROTO message block, which contains the following structure. typedef struct {
ulong dl_primitive;
ulong dl_sap;
ulong dl_max_conind;
ushort dl_service_mode;
ushort dl_conn_mgmt;
ulong dl_xidtest_flg;
} dl_bind_req_t;
Parameters
StateThe message is valid in state DL_UNBOUND. New StateThe resulting state is DL_BIND_PENDING. ResponseIf the bind request is successful, DL_BIND_ACK is sent to the DLS user resulting in state DL_IDLE. If the request fails, message DL_ERROR_ACK is returned and the resulting state is unchanged. Reasons for Failure
4.1.7 Message DL_BIND_ACK (dl_bind_ack_t)Reports the successful bind of a DLSAP to a stream, and returns the bound DLSAP address to the DLS user. This primitive is generated in response to a DL_BIND_REQ. Message FormatThe message consists of one M_PCPROTO message block, which contains the following structure. typedef struct {
ulong dl_primitive;
ulong dl_sap;
ulong dl_addr_length;
ulong dl_addr_offset;
ulong dl_max_conind;
ulong dl_xidtest_flg;
} dl_bind_ack_t;
Parameters
StateThe message is valid in state DL_BIND_PENDING. New StateThe resulting state is DL_IDLE. 4.1.8 Message DL_UNBIND_REQ (dl_unbind_req_t)Requests the DLS provider to unbind the DLSAP that had been bound by a previous DL_BIND_REQ from this stream. If one or more DLSAPs were bound to the stream using a DL_SUBS_BIND_REQ, and have not been unbound using a DL_SUBS_UNBIND_REQ, the DL_UNBIND_REQ will unbind all the subsequent DLSAPs for that stream along with the DLSAP bound using the previous DL_BIND_REQ. At the successful completion of the request, the DLS user may issue a new DL_BIND_REQ for a potentially new DLSAP. Message FormatThe message consists of one M_PROTO message block, which contains the following structure. typedef struct {
ulong dl_primitive;
} dl_unbind_req_t;
ParametersStateThe message is valid in state DL_IDLE. New StateThe resulting state is DL_UNBIND_PENDING. ResponseIf the unbind request is successful, DL_OK_ACK is sent to the DLS user resulting in state DL_UNBOUND. If the request fails, message DL_ERROR_ACK is returned and the resulting state is unchanged. Reasons for Failure
4.1.9 Message DL_SUBS_BIND_REQ (dl_subs_bind_req_t)Requests the DLS provider bind a subsequent DLSAP to the stream. The DLS user must identify the address of the subsequent DLSAP to be bound to the stream. Message FormatThe message consists of one M_PROTO message block, which contains the following structure. typedef struct {
ulong dl_primitive;
ulong dl_subs_sap_offset;
ulong dl_subs_sap_length;
ulong dl_subs_bind_class;
} dl_subs_bind_req_t;
Parameters
StateThe message is valid in state DL_IDLE. New StateThe resulting state is DL_SUBS_BIND_PND. ResponseIf the subsequent bind request is successful, DL_SUBS_BIND_ACK is sent to the DLS user resulting instate DL_IDLE. If the request fails, message DL_ERROR_ACK is returned and the resulting state is unchanged. Reasons for Failure
4.1.10 Message DL_SUBS_BIND_ACK (dl_subs_bind_ack_t)Reports the successful bind of a subsequent DLSAP to a stream, and returns the bound DLSAP address to the DLS user. This primitive is generated in response to a DL_SUBS_BIND_REQ. Message FormatThe message consists of one M_PCPROTO message block, which contains the following structure. typedef struct {
ulong dl_primitive;
ulong dl_subs_sap_offset;
ulong dl_subs_sap_length;
} dl_subs_bind_ack_t;
Parameters
StateThe message is valid in state DL_SUBS_BIND_PND New StateThe resulting state is DL_IDLE. 4.1.11 Message DL_SUBS_UNBIND_REQ (dl_subs_unbind_req_t)Requests the DLS Provider to unbind the DLSAP that had been bound by a previous DL_SUBS_BIND_REQ from this stream. Message FormatThe message consists of one M_PROTO message block, which contains the following structure: typedef struct {
ulong dl_primitive;
ulong dl_subs_sap_offset;
ulong dl_subs_sap_length;
} dl_subs_unbind_req_t;
Parameters
StateThe message is valid in state DL_IDLE. New StateThe resulting state is DL_SUBS_UNBIND_PND. ResponseIf the unbind request is successful, a DL_OK_ACK is sent to the DLS User. The resulting state is DL_IDLE. If the request fails, message DL_ERROR_ACK is returned and the resulting state is unchanged. Reasons for failure
4.1.12 Message DL_ENABMULTI_REQ (dl_enabmulti_req_t) |