| United States-English |
|
|
|
![]() |
HP DLPI Programmer's Guide: HP-UX 11i v2 > Chapter 2 DLPI
PrimitivesConnection-mode Service Primitives |
|
This section describes the service primitives that support the connection-mode service of the data link layer. These primitives support the establishment of connections, connection-mode data transfer, and connection release services. In the connection establishment model, the caller initiates a request for a connection, and the callee receives each request and either accepts or rejects it. In the simplest form, the callee is passed a connect indication and the DLS provider holds any subsequent indications until a response for the current outstanding indication is received. At most one connect indication is outstanding at any time. DLPI also enables a callee to multi-thread connect indications and responses. The DLS provider will pass all connect indications to the callee (up to some pre-established limit as set by DL_BIND_REQ and DL_BIND_ACK). The callee may then respond to the requests in any order. To support multi-threading, a correlation value is needed to associate responses with the appropriate connect indication. A correlation value is contained in each DL_CONNECT_IND, and the DLS user must use this value in the DL_CONNECT_RES or DL_DISCONNECT_REQ primitive used to accept or reject the connect request. Once a connection has been accepted or rejected, the correlation value has no meaning to a DLS user. The DLS provider may reuse the correlation value in another DL_CONNECT_IND. These primitives are only valid on connection-oriented DLPI STREAMS. Connection-oriented DLPI streams are those on which a DL_BIND_REQ with dl_service_mode set to DL_CODLS has been done. Requests the DLS provider to provide information on the state of the connection on a DLPI stream. Format typedef struct { Parameters dl_primitive
State The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and DL_PROV_RESET_PENDING. New State The resulting state is unchanged. Response If the primitive is issued from a valid state, the DLS provider responds with a DL_HP_INFO_ACK. Otherwise a DL_ERROR_ACK is returned. Reasons for Failure DL_OUTSTATE
This message is sent in response to a DL_HP_INFO_REQ; it conveys information on the state of the connection on a DLPI stream. Format typedef struct { Parameters dl_primitive
dl_mem_fails
dl_queue_fails
dl_ack_to
dl_p_to
dl_rej_to
dl_busy_to
dl_send_ack_timeout
dl_ack_to_cnt
dl_p_to_cnt
dl_rej_to_cnt
dl_busy_to_cnt
dl_local_win
dl_remote_win
dl_i_pkts_in
dl_i_pkts_in_oos
dl_i_pkts_in_drop
dl_i_pkts_out
dl_i_pkts_retrans
dl_s_pkts_in
dl_s_pkts_out
dl_u_pkts_in
dl_u_pkts_out
dl_bad_pkts
dl_retry_cnt
dl_max_retry_cnt
dl_max_retries
dl_ack_thresh
dl_remote_busy_cnt
dl_hw_req_fails
State The message is valid in any state in response to a DL_HP_INFO_REQ. New State The resulting state is unchanged. Requests the DLS provider to set the ACK timeout to the specified value. Format typedef struct { Parameters dl_primitive
dl_ack_to
State The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and Dl_PROV_RESET_PENDING. New State The resulting state is unchanged. Response If the primitive is issued from a valid state, the DLS provider responds with a DL_OK_ACK. Otherwise a DL_ERROR_ACK is returned. Reasons for Failure DL_OUTSTATE
Requests the DLS provider to set the P timeout to the specified value. Format typedef struct { dl_primitive
dl_p_to
State The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and DL_PROV_RESET_PENDING. New State The resulting state is unchanged. Response If the primitive is issued from a valid state, the DLS provider responds with a DL_OK_ACK. Otherwise a DL_ERROR_ACK is returned. Reasons for Failure DL_OUTSTATE
Requests the DLS provider to set the REJ timeout to the specified value. Format typedef struct { Parameters dl_primitive
dl_rej_to
State The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and DL_PROV_RESET_PENDING. New State The resulting state is unchanged. Response If the primitive is issued from a valid state, the DLS provider responds with a DL_OK_ACK. Otherwise a DL_ERROR_ACK is returned. Reasons for Failure DL_OUTSTATE
Requests the DLS provider to set the BUSY timeout to the specified value. Format typedef struct { Parameters dl_primitive
dl_busy_to
State The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and DL_PROV_RESET_PENDING. New State The resulting state is unchanged. Response If the primitive is issued from a valid state, the DLS provider responds with a DL_OK_ACK. Otherwise a DL_ERROR_ACK is returned. Reasons for Failure DL_OUTSTATE
Requests the DLS provider to set the SEND_ACK timeout to the specified value. Format typedef struct { Parameters dl_primitive
dl_send_ack_to
State The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and DL_PROV_RESET_PENDING. New State The resulting state is unchanged. Response If the primitive is issued from a valid state, the DLS provider responds with a DL_OK_ACK. Otherwise a DL_ERROR_ACK is returned. Reasons for Failure DL_OUTSTATE
Requests the DLS provider to set the maximum allowed number of retries to the specified value. Format typedef struct { Parameters dl_primitive
dl_max_retries
The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and DL_PROV_RESET_PENDING. New State The resulting state is unchanged. Response If the primitive is issued from a valid state, the DLS provider responds with a DL_OK_ACK. Otherwise a DL_ERROR_ACK is returned. Reasons for Failure DL_OUTSTATE
Requests the DLS provider to set the acknowledgment threshold to the specified value.
Format typedef struct { Parameters dl_primitive
dl_ack_thresh
State The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and DL_PROV_RESET_PENDING. New State The resulting state is unchanged. Response If the specified dl_ack_thresh is valid and the primitive was issued from a valid state, the DLS provider responds with a DL_OK_ACK. Otherwise a DL_ERROR_ACK is returned. Reasons for Failure DL_OUTSTATE
DL_SYSERR
Requests the DLS provider to set the local window size to the specified value.
Format typedef struct { Parameters dl_primitive
dl_local_win
State The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and DL_PROV_RESET_PENDING. New State The resulting state is unchanged. Response If the specified dl_local_win is valid and the primitive was issued from a valid state, the DLS provider responds with a DL_OK_ACK. Otherwise a DL_ERROR_ACK is returned. Reasons for Failure DL_OUTSTATE
DL_SYSERR
Requests the DLS provider to set the remote window size to the specified value.
Format typedef struct { Parameters dl_primitive
dl_remote_win
State The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and DL_PROV_RESET_PENDING. New State The resulting state is unchanged. Response If the specified dl_remote_win is valid and the primitive was issued from a valid state, the DLS provider responds with a DL_OK_ACK. Otherwise a DL_ERROR_ACK is returned. Reasons for Failure DL_OUTSTATE
DL_SYSERR
Requests the DLS provider to zero the mem_fails, queue_fails, ack_to_cnt, p_to_cnt, rej_to_cnt, busy_to_cnt, i_pkts_in, i_pkts_in_oos, i_pkts_in_drop, i_pkts_out, i_pkts_retrans, s_pkts_in, s_pkts_out, u_pkts_in, u_pkts_out, bad_pkts, max_retry_cnt, remote_busy_cnt, and hw_req_fails statistics which are reported in the DL_HP_INFO_ACK primitive. Format typedef struct { Parameters dl_primitive
State The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and DL_PROV_RESET_PENDING. New State The resulting state is unchanged. Response If the primitive is issued from a valid state, the DLS provider responds with a DL_OK_ACK. Otherwise a DL_ERROR_ACK is returned. Reasons for Failure DL_OUTSTATE
Requests that the DLS provider inform the remote system that the local system is busy and cannot accept new data packets. Format typedef struct { Parameters dl_primitive
State The message is valid in state IDLE. New State The resulting state is unchanged. Response If the primitive is issued from a valid state, the DLS provider responds with a DL_OK_ACK. Otherwise a DL_ERROR_ACK is returned. Reasons for Failure DL_OUTSTATE
Requests that the DLS provider inform the remote system that the local system is no longer busy and is again able to accept new data packets. Format typedef struct { Parameters dl_primitive
State The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and DL_PROV_RESET_PENDING after a DL_HP_SET_LOCAL_BUSY_REQ message. New State The resulting state is unchanged. Response If the primitive is issued from a valid state, the DLS provider responds with a DL_OK_ACK. Otherwise a DL_ERROR_ACK is returned. Reasons for Failure DL_OUTSTATE
Requests the DLS provider to establish a data link connection with a remote DLS user. Format The message consists of one M_PROTO message block containing the structure shown below. typedef struct { Parameters dl_primitive
dl_dest_addr_length
dl_dest_addr_offset
dl_qos_length
dl_qos_offset
dl_growth
State The primitive is valid in state DL_IDLE. New State The resulting state is DL_OUTCON_PENDING. Response There is no immediate response to the connect request. However, if the connect request is accepted by the callee, DL_CONNECT_CON is sent to the caller, resulting in state DL_DATAXFER. If the request is erroneous, DL_ERROR_ACK is returned and the resulting state is unchanged. Reasons for Failure DL_BADADDR
DL_BADQOSPARAM
DL_BADQOSTYPE
DL_ACCESS
DL_SYSERR
Conveys to the local DLS user that a remote (calling) DLS user wishes to establish a data link connection. Format The message consists of one M_PROTO message block containing the structure shown below. typedef struct { Parameters dl_primitive
dl_correlation
dl_called_addr_length
dl_called_addr_offset
dl_calling_addr_length
dl_calling_addr_offset
dl_qos_length
dl_qos_offset
dl_growth
State The message is valid in state DL_IDLE, or state DL_INCON_PENDING when the maximum number of outstanding DL_CONNECT_IND primitives has not been reached on this stream. New State The resulting state is DL_INCON_PENDING, regardless of the current state. Response The DLS user must eventually send either DL_CONNECT_RES to accept the connect request or DL_DISCONNECT_REQ to reject the connect request. In either case, the responding message must convey the correlation number received in the DL_CONNECT_IND. The DLS provider will use the correlation number to identify the connect request to which the DLS user is responding. Directs the DLS provider to accept a connect request from a remote (calling) DLS user on a designated stream. The DLS user may accept the connection on the same stream where the connect indication arrived, or on a different stream that has been previously bound. Format The message consists of one M_PROTO message block containing the structure shown below. typedef struct { Parameters dl_primitive
dl_correlation
dl_resp_token
dl_qos_length
dl_qos_offset
dl_growth
State The primitive is valid in state DL_INCON_PENDING. New State The resulting state is DL_CONN_RES_PENDING. Response If the connect response is successful, DL_OK_ACK is sent to the DLS user. If no outstanding connect indications remain, the resulting state for the current stream is DL_IDLE; otherwise, it remains DL_INCON_PENDING. For the responding stream (designated by the parameter dl_res_token), the resulting state is DL_DATAXFER. If the current stream and responding stream are the same, the resulting state of that stream is DL_DATAXFER. These streams may only be the same when the response corresponds to the only outstanding connect indication. If the request fails, DL_ERROR_ACK is returned on the stream where the DL_CONNECT_RES primitive was received, and the resulting state of that stream and the responding stream is unchanged. Reasons for Failure DL_BADTOKEN
DL_BADQOSPARAM
DL_BADQOSTYPE
DL_BADCORR
DL_ACCESS
DL_OUTSTATE
DL_SYSERR
DL_PENDING
Informs the local DLS user that the requested data link connection has been established. Format The message consists of one M_PROTO message block containing the structure shown below. typedef struct { Parameters dl_primitive
dl_resp_addr_length
dl_resp_addr_offset
dl_qos_length
dl_qos_offset
dl_growth
State The message is valid in state DL_OUTCON_PENDING. New State The resulting state is DL_DATAXFER. Requests that a connection response token be assigned to the stream and returned to the DLS user. This token can be supplied in the DL_CONNECT_RES primitive to indicate the stream on which a connection will be established. Format The message consists of one M_PROTO message block containing the structure shown below. typedef struct { Parameters dl_primitive
State The message is valid in any state in which a local acknowledgement is not pending, as described in Appendix B, Allowable Sequence of DLPI Primitives, of the DLPI 2.0 specification. New State The resulting state is unchanged. Response The DLS provider responds to the information request with a DL_TOKEN_ACK. This message is sent in response to DL_TOKEN_REQ; it conveys the connection response token assigned to the stream. Format The message consists of one M_PROTO message block containing the structure shown below. typedef struct { Parameters dl_primitive
dl_token
State The message is valid in any state in response to a DL_TOKEN_REQ. New State The resulting state is unchanged. Conveys a complete DLS Data Unit (DLSDU) from the DLS user to the DLS provider for transmission over the data link connection. Format The message consists of one or more M_DATA message blocks containing at least one byte of data. State The message is valid in state DL_DATAXFER. If it is received in state DL_IDLE or DL_PROV_RESET_PENDING, it should be discarded without generating an error. New State The resulting state is unchanged. Response If the request is valid, no response is generated. If the request is erroneous, a STREAMS M_ERROR message should be issued to the DLS user specifying an errno value of EPROTO. This action should be interpreted as a fatal, unrecoverable, protocol error. A request is considered erroneous under the following conditions.
Conveys a DLSDU from the DLS provider to the DLS user. Format The message consists of one or more M_DATA message blocks containing at least one byte of data. State The message is valid in state DL_DATAXFER. New State The resulting state is unchanged. Requests the DLS provider to disconnect an active data link connection or one that was in the process of activation, either outgoing or incoming, as a result of an earlier DL_CONNECT_IND or DL_CONNECT_REQ. If an incoming DL_CONNECT_IND is being refused, the correlation number associated with that connect indication must be supplied. The message indicates the reason for the disconnection. Format The message consists of one M_PROTO message block containing the structure shown below. typedef struct { Parameters dl_primitive
dl_reason
dl_correlation
State The message is valid in any of the states: DL_DATAXFER, DL_INCON_PENDING, DL_OUTCON_PENDING, DL_PROV_RESET_PENDING, DL_USER_RESET_PENDING. New State The resulting state is one of the disconnect pending states, as defined in Appendix B, Allowable Sequence of DLPI Primitives, of the DLPI 2.0 specification. Response If the disconnect is successful, DL_OK_ACK is sent to the DLS user resulting in state DL_IDLE. If the request fails, DL_ERROR_ACK is returned, and the resulting state is unchanged. Reasons for Failure DL_BADCORR
DL_OUTSTATE
DL_SYSERR
Informs the DLS user that the data link connection on this stream has been disconnected, or that a pending connection (either DL_CONNECT_REQ or DL_CONNECT_IND) has been aborted. This primitive indicates the origin and the cause of the disconnect. Format The message consists of one M_PROTO message block containing the structure shown below. typedef struct { Parameters dl_primitive
dl_originator
dl_reason
dl_correlation
State The message is valid in any of the states: DL_DATAXFER, DL_INCON_PENDING, DL_OUTCON_PENDING, DL_PROV_RESET_PENDING, DL_USER_RESET_PENDING. New State The resulting state is DL_IDLE. Requests that the DLS provider initiate the re-synchronization of a data link connection. This service is abortive, so no guarantee of delivery can be assumed about data that is in transit when the reset request is initiated. Format The message consists of one M_PROTO message block containing the structure shown below. typedef struct { Parameters dl_primitive
State The message is valid in state DL_DATAXFER. New State The resulting state is DL_USER_RESET_PENDING. Response If the disconnect is successful, DL_OK_ACK is sent to the DLS user resulting in state DL_IDLE. If the request fails, DL_ERROR_ACK is returned, and the resulting state is unchanged. Reasons for Failure DL_OUTSTATE
DL_SYSERR
Informs the DLS user that either the remote DLS user is re-synchronizing the data link connection, or the DLS provider is reporting loss of data for which it can not recover. The indication conveys the reason for the reset. Format The message consists of one M_PROTO message block containing the structure shown below. typedef struct { Parameters dl_primitive
dl_originator
dl_reason
State The message is valid in state DL_DATAXFER. New State The resulting state is DL_PROV_RESET_PENDING. Response The DLS user should issue a DL_RESET_RES primitive to continue the resynchronization procedure. Directs the DLS provider to complete re-synchronizing the data link connection. Format The message consists of one M_PROTO message block containing the structure shown below. typedef struct { Parameters dl_primitive
State The primitive is valid in state DL_PROV_RESET_PENDING. New State The resulting state is DL_RESET_RES_PENDING. Response If the reset response is successful, DL_OK_ACK is sent to the DLS user resulting in state DL_DATAXFER. If the reset response is erroneous, DL_ERROR_ACK is returned, and the resulting state is unchanged. Reasons for Failure DL_OUTSTATE
DL_SYSERR
Informs the reset-initiating DLS user that the reset has completed. Format The message consists of one M_PROTO message block containing the structure shown below. typedef struct { Parameters dl_primitive
State The message is valid in state DL_USER_RESET_PENDING. New State The resulting state is DL_DATAXFER. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||