This chapter describes the following connection tasks and the procedures for accomplishing these tasks:
These procedures illustrate the use of the ATM interfaces described in previous chapters.
Making outgoing connections consists of the following tasks:
Making the call for point-to-point and point-to-multipoint connections is identical except for one argument. When writing convergence modules, make sure the module performs the following tasks when making a call:
Note
You can apply reserved resources to point-to-point connections only.
If the reserve resources call returns ATM_CAUSE_GOOD, the atm_vc_services_t structure is considered to be backed by resources, which can be applied to a call.
If the reserve resources call returns any other error code, the convergence module should examine the lerrstat structure member of the atm_vc_services_t structure for additional error information. If the convergence module does not continue, it must free the memory allocated in the previous steps.
Note
If the module has reserved resources and they are not applied in time, they are revoked by an ATM_CME_RESV_EXPIRE exception notification.
For CBR and pacing connections that do not use resource reservation, there might be a failure to allocate the necessary resources. If the failure is due to an incorrectly set atm_vc_services_t structure, the lerrstat structure member contains local error information.
Section B.1 contains a sample routine that shows how to make a call for point-to-point connections and how to make the first call for point-to-multipoint connections.
Once the connect call returns, all subsequent activity on the VC is reported through the exception interface (xxx_except).
After the call is initiated, the convergence module can receive the following notifications:
The convergence module should extract the cause information from the endpoint's atm_addr structure and decide how to handle the error based on this information. The module should then delete all references to the atm_addr structure and the VC, but should not deallocate the structure memory. The CMM does this after removing all its references to the call. Once the convergence module returns from the exception notification routine, it can no longer access any nonprivate structures associated with the call.
When a connection is activated, the convergence module may check the atm_vc_services structure referenced in the atm_vc structure to determine if any of its connection service parameters were changed by the called party through negotiation.
For point-to-multipoint connections, after the call to the first party is successful, you can add parties to the VC associated with the first call and drop parties at any time. Note that since call placement is multithreaded, you can initiate calls to multiple endpoints sequentially. Convergence modules receive individual notifications for each endpoint that is connected. Thus, multiple connections can be in progress at any given time without the convergence module needing to handle synchronization issues.
The convergence module can receive exception notifications for exceptions affecting all parties on the VC or for single endpoints (an exception with a single party in the multipoint call). When writing a convergence module, you must ensure that the module can handle these exceptions properly so that it does not associate an endpoint exception affecting a specific party with all parties on a VC.
Section B.2 contains a code fragment that shows one method of adding parties to a point-to-multipoint connection.
When a remote host places a call to the local host, the following events occur on the local host:
If the CMM has allocated the resources needed to meet the requested level of service, the convergence module should return ATM_CAUSE_GOOD to the CMM to accept the call. If the CMM indicates that it cannot allocate the bandwidth and the convergence module does not apply a reserved resource to the incoming call, the convergence module should return an error indication to the CMM to reject the call.
If the convergence module supplies a reserved resource that cannot be applied to the call, the new VC is torn down, the supplied atm_vc_services structure and its underlying resources freed, and the convergence module sent an ATM_CME_EP_DEAD exception notification. The VC's cause log contains the reason why the connection was torn down.
Section B.3 contains a sample code fragment that shows how a convergence module processes an incoming call.
This section applies to switched virtual circuits (SVCs) only; permanent virtual circuits (PVCs) do not age. The Digital UNIX ATM subsystem provides for automatic detection and elimination of unused VCs when available resources are low. This prevents a hung protocol from continuing to hold resources and ensures that system resources are allocated fairly.
When a circuit is created, convergence modules specify an initial aging algorithm in an argument to the atm_cmm_connect routine. The CMM then performs all connection aging based on usage statistics it collects during the lifetime of a connection. If necessary, convergence modules can use the atm_cmm_vc_control routine to change the aging algorithm applied by the CMM at any time. When a connection has aged, the CMM uses the convergence module's xxx_except routine to notify the convergence module that a connection has aged and is about to be removed from the system. This gives the convergence module a chance to prevent the connection's removal.
If the convergence module does not prevent the connection's removal, the CMM uses the normal connection release mechanism to remove the connection; the signaling module sees the release request as coming from the convergence module and the convergence module sees the request as coming from the remote endpoint. See Section 7.4 for information on releasing a connection.
Table 7-1
contains values you can use for the aging parameters in the
atm_cmm_connect
and
atm_cmm_vc_control
routines.
Value | Meaning |
ATM_AGE_DEFAULT | Uses the system's default aging algorithm. The default is to remove all VCs that have been inactive for the longest period of time, that have the lowest utilization (compared to the expected utilization), and whose reconnection time is expected to be less than 5 percent of the idle time. |
ATM_AGE_LOW | Removes this VC when the system is low on free circuit identifiers and ignores its idle time and utilization. |
ATM_AGE_FOREVER | Specifies that the circuit is not eligible for aging. |
28-bit unsigned value | Specifies how long (in minutes) the circuit should be allowed to live. After the circuit is active for the specified number of minutes, it is aged from the system. |
28-bit unsigned value bitwise ORed with ATM_AGE_IDLE | Ages the circuit when it has been inactive the specified number of minutes. |
These circuit-aging algorithms provide sufficient flexibility so that individual convergence modules should not have to perform their own circuit aging. Also, centralizing circuit aging in the CMM allows aging algorithms to take affect only when the CMM detects that an interface is low on free VCs.
Either convergence modules or the network or an endpoint can release connections. The following sections describe what happens in either case.
When a convergence module no longer requires a connection to an endpoint, it should release the connection to free system resources. To release a connection, a convergence module calls either the atm_cmm_release or atm_cmm_drop function. The former releases a VC and all associated endpoints; the latter disconnects only a single endpoint, releasing the VC only if all endpoints have been dropped.
When a convergence module calls atm_cmm_release, the CMM initiates a disconnect of all endpoints associated with the VC.
For point-to-point VCs, this initiates a release operation on the VC. The convergence module receives an ATM_CME_EP_DEAD notification. This informs the convergence module that the release operation is in progress on the network and that no more data will be sent on the VC.
For multipoint VCs, this initiates the dropping of all endpoints and the release of the VC. As each endpoint is dropped, the convergence module receives an ATM_CME_EP_DEAD notification. The convergence module must delete all its references to the endpoint. Once all endpoints associated with a VC have been dropped, the VC is released. The CMM handles conditions where endpoints are in various stages of set or release when it receives this request.
When the ATM_CME_EP_DEAD notification is received for the last endpoint on the VC, convergence modules should delete all references to the VC. To accomplish this, Digital recommends that the module maintain a use count for any VC references it maintains.
When a VC is released, the CMM notifies the device driver to which the VC is attached so that the device driver can free any resources it has allocated to the VC.
When the network or an endpoint initiates a connection release, the signaling protocol module receives either a release or a drop message. At that point, the signaling module calls either the atm_cmm_con_release or atm_cmm_ep_dropped function.
When a signaling module calls the atm_cmm_con_release function, the CMM does the following:
When the signaling module calls the atm_cmm_ep_dropped function, the CMM calls the convergence module that owns the endpoint's VC and passes an ATM_CME_EP_DEAD notification. If this is the last endpoint associated with the VC, it initiates a release of the VC.
Although the ATM subsystem is designed primarily to use SVCs, you can also use PVCs. Before you create PVCs locally, the PVCs must already be set up on the network. You can use either of the following methods for setting up PVCs:
Either method creates a local reference to the PVC and allocates the resources necessary for the VC to function on the system. In either case, the convergence module's connection routine for the bind point to which the PVC is attached is called.
Note
You can create PVCs only on the PVC PPA. You cannot create a PVC on an SVC PPA.
When a convergence module sets up a PVC, the following events occur:
Once set up, the PVC remains in existence until explicitly torn down by the convergence module.
The ATM subsystem treats a PVC like an SVC, except that there is no signaling protocol associated with the PVC, and PVCs do not age. When a convergence module requests a PVC, it must specify all the VC service parameters as it does for an SVC. If the PVC is created successfully, this does not necessarily mean that the PVC exists. Even though a local reference for the PVC has been created, modules cannot check (due to the nature of PVCs) to determine if the PVC exists on the network.
Note
If you create a PVC before it is configured on the network, no invalid VCI errors are reported to the convergence module.
To release PVCs, use the atm_cmm_release function call. However, since PVCs require no signaling protocol exchange with the network, PVC release is synchronous. The return value from the release function call indicates success or failure of the teardown. The convergence module receives no other notifications.
Signaling VCs are well-known PVCs that signaling protocols use to communicate with the switches on the network. The switches and the end systems on an ATM network automatically set up signaling VCs. The ATM subsystem treats signaling VCs as ordinary PVCs and does not provide any special mechanisms for them. The signaling protocol module is responsible for managing the signaling VCs.
When signaling modules initialize, they register with the CMM as both a signaling module and as a convergence module. The signaling modules use the signaling module interface to field connection management requests from the CMM; they use the convergence module interface to send and receive signaling protocol packets on the network. Once registered as a convergence module, signaling modules must create all VCs required by their signaling protocol.
Once the signaling VCs are created, the CMM treats them like any other PVC. Like other convergence modules, the signaling module receives no notification whether a PVC exists on the network. Signaling modules receive notification of interfaces being brought up and interfaces going down. When an interface goes down, all signaling VCs on that interface are destroyed.