Platform Notes: The SunATM Driver Software

Setting up an ATM Connection Over a Switched Virtual Circuit (SVC)

After connecting to the Q.93B driver, either by directly calling the functions as a user application or by having a setup program connect your application driver as described in the preceding section, the Q.93B driver is available to your application to establish switched virtual circuits (SVCs) using the Q.2931 signalling protocol. The Q.2931 message set is displayed in Table A-1.

Table A-1 Messages Between the User and the Q.93B Driver

Message Type 

Direction* 

SETUP

BOTH 

SETUP_ACK

UP 

CALL_PROCEEDING

BOTH 

ALERTING

BOTH 

CONNECT

BOTH 

CONNECT_ACK

UP 

RELEASE

DOWN 

RELEASE_COMPLETE

BOTH 

STATUS_ENQUIRY

DOWN 

STATUS

UP 

NOTIFY

BOTH 

RESTART

BOTH 

RESTART_ACK

BOTH 

ADD_PARTY

BOTH 

ADD_PARTY_ACK

BOTH 

ADD_PARTY_REJECT

BOTH 

PARTY_ALERTING

BOTH 

DROP_PARTY

BOTH 

DROP_PARTY_ACK

BOTH 

LEAF_SETUP_FAIL

BOTH 

LEAF_SETUP_REQ

BOTH 

*UP is from Q.93B to user; 

DOWN is from user to Q.93B 

The Q.93B driver is an M-to-N mux STREAMS driver. Multiple application programs can be plumbed above the driver, and multiple physical interfaces can be connected below Q.93B. Applications can access any or all of the physical interfaces, and messages received on the physical interfaces can be directed to any of the applications. To direct messages through the Q.93B driver, messages from applications must include a physical interface name to identify the outgoing interface and a SAP to identify the application to which the message should be directed on the receiving host.

Send messages to Q.93B by applications according to the format illustrated in Figure A-1; kernel applications use putnext(9f) to send the mblocks shown and user applications send two corresponding strbufs using putmsg(2).

Figure A-2 Message Format

Graphic

Table A-2 Fields in the M_PROTO mblock

Message 

Explanation 

Ifname

Null-terminated string containing the device name 

Call_ID

Unique number from Q.93B for each interface. 

Type

Same as the Q.2931 message type except there is a local Non-Q.2931 message type SETUP_ACK. The SETUP_ACK message is used to provide the Call_ID to the user.

Error_Code

Error returned from Q.93B when an erroneous message is received from the user. The same mblock chain is returned to the user with the Error_Code field set. The user must always clear this field

Call_Tag

Number assigned by the calling application layer to a SETUP message. When a SETUP_ACK is received from Q.93B, the Call_ID has been set; use the Call_Tag field to identify the acknowledgment (ack) with the original request. From that point on, use the Call_ID value to identify the call.

The structure included in the M_PROTO mblock is defined as the qcc_hdr_t structure in the <atm/qcctypes.h> header file. In the second mblock, the Q.2931 header portion (9 bytes) of the Q.2931 message is blank and later filled in by the Q.93B driver. The application should also reserve 16 bytes at the end of the second mblock for the layer 2 (Q.SAAL) protocol performance. The qcc functions can be used to create messages in this format.

The following sections give a brief overview of Q.2931 signalling procedures, from the perspective of an application using the SunATM API. For more details on the procedures, refer to the ATM Forum's User Network Interface Specification, version 3.0, 3.1, or 4.0. For further information on the qcc functions, which are outlined in Table A-3, see the appropriate man pages in Section 3 (for user applications) or Section 9F (for kernel applications). You can find the man pages under the function group name or any specific function name. For example, the man page that documents the qcc_bld_* function group may be accessed by one of the following at a command prompt: man qcc_bld, man qcc_bld_setup, or man qcc_bld_connect. Figure A-3 illustrates the message flow during typical call setup and tear down.

Table A-3 qcc Functions

Name 

Functionality 

Input 

Output 

qcc_bld_*

Creates and encodes a message; enables customization of a limited set of values, depending on the message type. Configurable values are passed in as parameters. 

Parameter values 

Encoded Q.2931 message (in the format shown in Figure A-2)

qcc_parse_*

Extracts a defined set of values from an encoded message 

Encoded Q.2931 message (in the format shown in Figure A-2)

Parameter values 

 

qcc_len_*

Returns the maximum length of the buffer that should be allocated for the second strbuf in a Q.2931 message. Only applicable to user space applications; the kernel API allocates the buffers inside the qcc_bld/qcc_pack functions.

none 

Maximum length of the message 

 

qcc_create_*

Creates a message structure with the required values set. You can further customize the structure using qcc_set_ie.

Default parameter values 

Message structure (defined in <atm/qcctypes.h>)

qcc_set_ie

Updates or inserts values for an information element into a message structure. 

Message structure and IE structure (defined in <atm/qcctypes.h>)

Updated message structure 

qcc_pack_*

Takes a message structure and encodes it into an actual Q.2931 message, consisting of the two mblks (or strbufs) illustrated in Figure A-2.

Message structure (defined in <atm/qcctypes.h>)

Encoded Q.2931 message (in the format shown in Figure A-2)

qcc_unpack_*

The reverse of qcc_pack_*: takes an encoded message and decodes the data into a message structure.

Encoded Q.2931 message (in the format shown in Figure A-2)

Message structure (defined in <atm/qcctypes.h>)

Call Setup

To make a call, send a SETUP message down to Q.93B and wait for a SETUP_ACK from Q.93B. The SETUP message should include a Broadband Higher Layer Information (BHLI) information element that contains a four-octet SAP identified as User Specific Information. The SAP is used to identify the application on the receiving host to which the Q.93B should direct the message. After receiving a SETUP_ACK with a 0 error field, wait for either a CALL_PROCEEDING, ALERTING, CONNECT, or RELEASE_COMPLETE message from Q.93B (all other messages are ignored by Q.93B). After you receive the CONNECT message, you can use the virtual channel.

Respond to a SETUP message from Q.93B with either a CALL_PROCEEDING, ALERTING, CONNECT, or RELEASE_COMPLETE message to Q.93B. After yu receive the CONNECT_ACK message, you can use the virtual channel.

Release Procedure

To clear an active call or a call in progress, send a RELEASE message down to Q.93B and wait for a RELEASE_COMPLETE from Q.93B. Any time you receive a RELEASE_COMPLETE message from Q.93B, release the virtual channel if the call is active or in progress.

Q.93B never sends a RELEASE message to the end user; it will always send a RELEASE_COMPLETE. Only send the RELEASE_COMPLETE message when rejecting a call in response to a SETUP message from Q.93B. At any other time, to reject or tear down a call, send a RELEASE message to Q.93B.

Exception Conditions

If for any reason Q.93B cannot process a SETUP message received from an end user, the SETUP_ACK is returned with an error value set, and call setup is not continued. The error value will be one of the cause codes specified in the ATM Forum UNI standard.

Figure A-3 Message Flow for Normal Call Setup and Tear Down

Graphic