X25ReadAccept(3X25) — Subroutines
Digital
NAME
X25ReadAccept − Obtains negotiated outgoing call details
LIBRARY
X.25 Library (libx25.a)
SYNOPSIS
#include <netx25/x25.h>
int X25ReadAccept(
int pd ,
unsigned char ∗ epl ,
int ∗ eplLength );
PARAMETERS
pdIdentifies the port on which the outgoing call was made.
eplPoints to an Encoded Parameter List in which the negotiated call details are returned.
eplLengthPoints to the size of the buffer pointed to by epl. On return, eplLength indicates the length of the encoded parameters.
DESCRIPTION
A user ascertains that a call has been accepted via the X25GetPortStatus routine or upon successful completion of an X25MakeCall as the port state should be X25S_RUNNING. The negotiated packet and window sizes for the port, accept data and other facilities negotiated with the called DTE are returned in the encoded parameter list epl.
Based on the negotiated facilities, the user can choose to proceed with the call or clear down the virtual circuit using the X25ClearCall routine.
The encoded parameter list epl can be interpreted using the X25GetItemList and X25Decode routines. For more information on EPLs, refer to the X.25 for Digital UNIX − Programmer’s Reference Manual.
If the buffer supplied by the user is not big enough to hold the accept details, X25RC_EPLSIZE is returned and as much of the accept details as possible are returned in the epl.
RETURN VALUES
Upon successful completion, the X25ReadAccept routine returns a value of 0. Otherwise, a (negative) error code is returned.
ERRORS
If the X25ReadAccept 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 accept 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_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 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.
RELATED INFORMATION
Functions: X25AcceptCall(3X25), X25Decode(3X25), X25Encode(3X25), X25GetItemList(3X25), X25MakeCall(3X25), X25OpenPort(3X25).
CTF for Digital UNIX − CTF User’s Guide,
X.25 for Digital UNIX − Programmer’s Reference Manual.