Solstice X.25 9.2 Developer's Guide

11.1.8 DL_CONNECT_REQ--Establish a Connection

Used to establish a connection. When the user issues this primitive, a SABME or SABM frame is sent across the network to the destination.

Associated Structure

This message consists of one M_PROTO message block containing the following structure:

typedef struct {
        t_uscalar_t     dl_primitive;           /* DL_CONNECT_REQ */
        t_uscalar_t     dl_dest_addr_length;    /* len. of dlsap addr */
        t_uscalar_t     dl_dest_addr_offset;    /* offset */
        t_uscalar_t     dl_qos_length;          /* len. of QOS parm val */
        t_uscalar_t     dl_qos_offset;          /* offset */
        t_uscalar_t     dl_growth;              /* set to zero */
} dl_connect_req_t;

The members of the dl_connect_req_t structure are:

Table 11-15 Members of the dl_connect_req_t structure

Member 

Description 

dl_primitive

Should be set to the name of this primitive. 

dl_dest_addr_length

Set to 7 when working with LLC2 and 21 when working with LAPB. 

dl_dest_addr_offset

Offset, in bytes, from beginning of M_PROTO message block. The destination DLSAP address should be encoded as a struct llc_dladdr. This field and dl_dest_addr_length combined give the remote address if you are working with LLC2 and the PSTN address if you are working with dial-up LAPB. They are not used if you are working with non dial-up LAPB.

dl_qos_length

Will be ignored. 

dl_qos_offset

Will be ignored. 

This primitive is positively acknowledged with a DL_CONNECT_CON primitive. If there is a local error, this primitive is nack'ed with a DL_ERROR_ACK, with the possible error codes listed below. If the destination cannot be reached, this primitive is nack'ed with a DL_DISCONNECT_IND primitive.

Errors
Table 11-16 DL_CONNECT_REQ errors

Error 

Description 

DL_OUTSTATE

Primitive issued from an invalid state. 

DL_BADADDR

The destination DLSAP address was invalid, for one of the following reasons: dl_dest_addr_length is incorrect, zero or, odd SAP (when using LLC2) loopback connection to the same SAP

DL_ACCESS

Attempt to connect a second LLC2 stream, bound to the same SAP, to the same destination DLSAP (really need to return an "address already in use" error in this case, but no such error exists in DLPI). 

DL_SYSERR

Could not allocate memory.