Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ X25ReadClear(3X25) — DECnet WAN Support 3.0A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

X25Decode(3X25)

X25GetItemList(3X25)

X25GetPortStatus(3X25)

X25ReadClear(3X25)  —  Subroutines

Digital

NAME

X25ReadClear − Reads clear information for calls cleared by remote DTE

LIBRARY

X.25 Library (libx25.a)

SYNOPSIS

#include <netx25/x25.h>
int X25ReadClear(

int pd ,
unsigned char ∗ cause ,
unsigned char ∗ diagnostic ,
unsigned char ∗ originator ,
unsigned char ∗ epl ,
int ∗ eplLength );

 

PARAMETERS

pdIdentifies the port on which the call has been cleared. 

causePoints to the clearing cause code. 

diagnosticPoints to the clearing diagnostic code. 

originatorPoints to an optional parameter returned when using CONS.  It defines the origin of the clear as either due to Clear or Restart of either DTE by the network or due to Clear by the remote DTE. 

eplPoints to an Encoded Parameter List in which the X.25 clear facilities are returned. 

eplLengthPoints to the size of the parameter list epl.  On return this is set to the length of the encoded facilities written to epl. 
 

DESCRIPTION

A user ascertains that an X.25 virtual circuit has been cleared when the state returned by the X25GetPortStatus routine is X25S_CLEARED.  The user may then wish to obtain the cause code, the diagnostic code and any clear data using the X25ReadClear routine.  Any clear facilities are returned in the encoded parameter list epl and can be interpreted using the X25GetItemList and X25Decode routines. 

If the buffer supplied by the user is not big enough to hold the clear details, X25RC_EPLSIZE is returned, and as many of the clear details as possible are returned in the epl. 

Any pointer passed to the routine that has a NULL value is ignored and no value is returned for this parameter. 
 

RETURN VALUES

Upon successful completion, the X25ReadClear routine returns a value of 0.  Otherwise, a (negative) error code is returned. 
 

ERRORS

 
If the X25ReadClear routine fails, one of the following error codes is returned:

[X25RC_BADPD]
Invalid port descriptor specified.

[X25RC_EPLSIZE]
The specified EPL is too small to contain the clear detail items.  As many of the items as will fit are returned in epl. 

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

[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_NOCLRDATA]
There is no clear information available for the specified port.

[X25RC_NOMEM]
There were insufficient system resources to perform the requested operation.  The clear information was not retrieved.

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

RELATED INFORMATION

Functions: X25Decode(3X25), X25GetItemList(3X25), X25GetPortStatus(3X25). 

CTF for Digital UNIX − CTF User’s Guide,
X.25 for Digital UNIX − Programmer’s Reference Manual. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026