Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

X25SendInterrupt(3X25)

X25SendInterruptConf(3X25)

X25SendReset(3X25)

X25ReadOOB(3X25)  —  Subroutines

Digital

NAME

X25ReadOOB − Reads an interrupt or reset message from an X.25 port

LIBRARY

X.25 Library (libx25.a)

SYNOPSIS

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

int pd ,
unsigned char ∗ cause ,
unsigned char ∗ diagnostic ,
unsigned char ∗ originator ,
unsigned char ∗ interrupt ,
int ∗ interruptLength );

 

PARAMETERS

pdIdentifies the port from which the out-of-band data is to be read. 

causePoints to the reset cause code.  Only valid if the return value is X25U_RESET. 

diagnosticPoints to the reset diagnostic code.  Only valid if the return value is X25U_RESET. 

originatorPoints to the origin of the reset (either network initiated or from the remote DTE).  For use in CONS.  Only valid if the return value is X25U_RESET. 

interruptPoints to a buffer in which the interrupt user data is returned.  Only valid if the return value is X25U_INTERRUPT. 

interruptLength
Points to the size of the interrrupt data.  On calling, indicates the size of interrupt.  On return, indicates the number of bytes of interrupt data returned. 
 

DESCRIPTION

The X25ReadOOB routine reads X.25 reset and interrupt messages.  These messages are received as out-of-band data on an X.25 port.  The following message types are returned:

Message Type Description
X25U_INTERRUPT Incoming interrupt data
X25U_INTERRUPTCONF Interrupt confirmation
X25U_RESET Reset message
X25U_RESETCONF Reset confirmation

If there is no out-of-band data waiting to be read but there is normal data waiting on the port, the X25ReadOOB routine returns X25RC_NOOOB, informing the user to read the normal data. 

If there is no incoming data waiting to be read, the X25ReadOOB routine blocks waiting for either normal data or out-of-band data to arrive.  If normal data arrives before a reset or interrupt then X25RC_NOOOB is returned. 

In the case of an interrupt, if the interrupt data is too large to fit into the buffer supplied by the user, then as much interrupt data as can fit into the buffer is returned. 

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

RETURN VALUES

Upon successful completion, the X25ReadOOB routine returns the type of out-of-band message received.  Otherwise a (negative) error code is returned. 
 

ERRORS

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

[X25RC_BADPD]
Invalid port descriptor specified.

[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_NETMANCLR]
The call has been cleared by a network management command.

[X25RC_NOMEM]
There were insufficient system resources to perform the requested operation.  No out-of-band data was read.

[X25RC_NOOOB]
The read was not performed, because there is no out-of-band data waiting to be read.  Use the X25ReadData or X25ReadDataQM routine to read the normal data. 

[X25RC_OOBTYPE]
Unrecognized out-of-band message read.  Please submit a Software Performance Report (SPR) to your Digital representative.

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

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

[X25RC_WOULDBLOCK]
The specified port is operating in non-blocking mode, and there is no out-of-band data available to be read at this time.
 

RELATED INFORMATION

Functions: X25SendInterrupt(3X25), X25SendInterruptConf(3X25), X25SendReset(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