Previous section.

Data Link Provider Interface (DLPI), Version 2
Copyright © 2000 The Open Group

NAME

DL_CONNECT_RES (dl_connect_res_t) - directs the DLS provider to accept a connect request from a remote (calling) DLS user on adesignated 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. The response contains the correlation number from the corresponding DL_CONNECT_IND, selected quality of service parameters, and an indication of the stream on which to accept the connection.

After issuing this primitive, the DLS user may immediately begin transferring data using the DL_DATA_REQ primitive. If the DLS provider receives one or more DL_DATA_REQ primitives from the local DLS user before it has completed connection establishment, however, it must queue the data transfer requests internally until the connection is successfully established.

SYNOPSIS

The message consists of one M_PROTO message block containing the structure shown below.


typedef struct {
    t_uscalar_t  dl_primitive;
    t_uscalar_t  dl_correlation;
    t_uscalar_t  dl_resp_token;
    t_uscalar_t  dl_qos_length;
    t_uscalar_t  dl_qos_offset;
    t_uscalar_t  dl_growth;
} dl_connect_res_t;


PARAMETERS

dl_primitive

conveys DL_CONNECT_RES.

dl_correlation

conveys the correlation number that was received with the DL_CONNECT_IND associated with the connection request. The DLS provider will use the correlation number to identify the connect indication to which the DLS user is responding.

dl_resp_token

if non-zero, conveys the token associated with the responding stream on which the DLS provider is to establish the connection; this stream must be in the state DL_IDLE. The token value for a stream can be obtained by issuing a DL_TOKEN_REQ on that stream. If the DLS user is accepting the connection on the stream where the connect indication arrived, this value must be zero. See Connection Establishment for a description of the connection response model.

dl_qos_length

conveys the length of the quality of service parameter values selected by the called DLS user. The selected QOS values are conveyed in the appropriate structure as defined in QOS Data Structures. A full specification of these QOS parameters and rules for negotiating their values is presented in Quality of Data Link Service. If the DLS user does not care which value is selected for a particular QOS parameter, the value DL_QOS_DONT_CARE may be specified. If the DLS user does not care which values are selected for all QOS parameters, this field may be set to zero.

dl_qos_offset

conveys the offset from the beginning of the M_PROTO message block where the quality of service parameters begin.

dl_growth

defines a growth field for future enhancements to this primitive. Its value must be set to zero.

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_resp_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.

ERRORS

DL_ACCESS

The DLS user did not have proper permission to use the responding stream.

DL_BADCORR

The correlation number specified in this primitive did not correspond to apending connect indication.

DL_BADTOKEN

The token for the responding stream was not associated with a currently open stream.

DL_BADQOSPARAM

The quality of service parameters contained invalid values.

DL_BADQOSTYPE

The quality of service structure type was not supported by the DLS provider.

DL_OUTSTATE

The primitive was issued from an invalid state, or the responding stream was not in a valid state for establishing aconnection.

DL_PENDING

Current stream and responding stream is the same and there is more than one outstanding connect indication.

DL_SYSERR

A system error has occurred and the UNIX system error is indicated in the DL_ERROR_ACK.

Contents Next section Index