X25ClearCall(3X25) — Subroutines
Digital
NAME
X25ClearCall − Clears an X.25 call
LIBRARY
X.25 Library (libx25.a)
SYNOPSIS
#include <netx25/x25.h>
int X25ClearCall(
int pd ,
unsigned char cause ,
unsigned char diagnostic ,
unsigned char ∗ epl ,
int eplLength );
PARAMETERS
pdIdentifies the port corresponding to the call that is to be cleared.
causeSpecifies the clearing cause code.
diagnosticSpecifies the clearing diagnostic code.
eplPoints to an Encoded Parameter List containing the X.25 clear facilities to be sent with the clear packet.
eplLengthSpecifies the size of the Encoded Parameter List epl.
DESCRIPTION
The X25ClearCall routine clears down an active X.25 connection. The port enters the X25S_CLEARING state until a clear confirm message is received. When this message is received the port state is set to X25S_CLEARED.
The optional epl parameter provides clear facilities and clear user data to accompany the clear request. The facilities and user data are provided in an encoded parameter list created using the X25Encode routine. For further information on encoded parameter lists, refer to the X.25 for Digital UNIX − Programmer’s Reference Manual.
The valid clear parameters are network and subscription dependent, but could include the following:
| Item Code | Description |
| X25I_CALLEDEXTISO | Called Address Extension |
| X25I_CALLEDEXTNONISO | Called Address Extension |
| X25I_USERDATA | User Data |
If no clear facilities and/or user data are required or they are not permitted by the network, a NULL pointer should be passed in the epl parameter.
RETURN VALUES
Upon successful completion, the X25ClearCall routine returns a value of 0. Otherwise, a (negative) error code is returned.
ERRORS
If the X25ClearCall routine fails, one of the following error codes is returned:
[X25RC_BADPD]
Invalid port descriptor specified.
[X25RC_CALLABORT]
An X.25 call arrived at the Digital UNIX host, but was cleared by the network or the remote DTE before the call was accepted with the X25AcceptCall routine. You may need to increase the Call Timer at the remote DTE if the transit delay through the network is greater than or comparable to the current setting of the timer.
[X25RC_INVALCAUSE]
The clear information specified is not valid for one of the following reasons:
•The cause parameter does not specify a valid X.25 cause code.
•The epl parameter contains an invalid clear parameter.
•The epl parameter is not a correctly formatted EPL.
•The request to clear the call was ignored, as the call is already being cleared.
[X25RC_INVALSTATE]
The port is not in a valid state to perform the requested operation. There is no connection established on the specified port.
[X25RC_LINKDOWN]
The X.25 call was aborted due to a LAPB or LLC2 link failure. Before attempting another call, ensure that the Link Service Provider of the DTE used to make the call is enabled and running, and that the DTE itself is in the Running state.
[X25RC_NETABORT]
The X.25 call was aborted due to a network-initiated restart of the DTE on which the call was established. Wait for the X25 Protocol DTE entity to return to the running state before making the call again.
[X25RC_NETMANCLR]
The call has been cleared by a network management command.
[X25RC_NOMEM]
There were insufficient system resources to perform the requested operation. The call was not cleared.
[X25RC_PORTABORT]
The X.25 call was aborted due to a failure in a module below X25 Access. Before attempting another call, ensure that the X25 Protocol DTE entity and its Link Service Provider are enabled and in the running state.
[X25RC_PORTCLR]
The operation could not be performed because the X.25 call has already been cleared. Clear information can be obtained using the X25ReadClear routine.
[X25RC_PROTOCOL]
The X.25 call was aborted due to an invalid packet received from the network. To further isolate this problem, use CTF to determine the packet in error.
[X25RC_SERVICEDOWN]
The X.25 service is not available because an entity is not in the correct state. Either the X25 Access entity is disabled, or the X25 Protocol entity does not exist.
[X25RC_SYSERR]
An operating system error occurred. The external variable errno is set to indicate the error.
[X25RC_TIMEOUT]
The X.25 call was aborted due to the remote DTE not responding to an interrupt or a reset within the required time.
RELATED INFORMATION
Functions: X25ClosePort(3X25), X25Encode(3X25), X25GetPortStatus(3X25), X25ReadClear(3X25).
CTF for Digital UNIX − CTF User’s Guide,
X.25 for Digital UNIX − Programmer’s Reference Manual.