X25SendDataQM(3X25) — Subroutines
Digital
NAME
X25SendDataQM − Transmits data to an X.25 port in Manual Mode
LIBRARY
X.25 Library (libx25.a)
SYNOPSIS
#include <netx25/x25.h>
int X25SendDataQM(
int pd ,
unsigned char ∗ buf ,
int bufLength ,
X25DataFlags dataFlags );
PARAMETERS
pdIdentifies the port to which the data is to be sent.
bufPoints to the buffer containing the data to be sent.
bufLengthSpecifies the number of bytes to be written to the port, from buf.
dataFlagsSpecifies a bit map of packet flags to set on data packet. This parameter is formed by the logical OR of the following values:
X25P_MDATA
set more-data bit
X25P_QDATA
set qualified-data bit.
DESCRIPTION
The X25SendDataQM routine attempts to write a packet of data to an X.25 port that is operating in Manual Mode. The size of the buffer must be less than or equal to the negotiated packet size and the more data and qualified data bits must be set according to X.25 protocol specifications.
The more data and qualified data bits are set in the dataFlags using the masks X25P_MDATA and X25P_QDATA defined in the x25.h include file.
RETURN VALUES
Upon successful completion, the X25SendDataQM routine returns a value of 0. Otherwise, a (negative) error code is returned.
ERRORS
If the X25SendDataQM routine fails, one of the following error codes is returned:
[X25RC_BADPD]
Invalid port descriptor specified.
[X25RC_DATASIZE]
The size of the specified data is greater than the packet size.
[X25RC_INSUFDATA]
The M bit is set and the specified data does not occupy a full packet.
[X25RC_INVALMODE]
The data mode of the port is not valid for the requested operation. The port is operating in Automatic Mode − use the X25SendData routine.
[X25RC_INVALQ]
The Q bit was modified during a sequence of packets with the M bit set.
[X25RC_INVALSTATE]
The port is not in a valid state to perform the requested operation. Either there is no connection established on the specified port, or the port is currently unable to accept data because it is processing a reset.
[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 data was sent.
[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_WOULDBLOCK]
The specified port is operating in non-blocking mode, and the data cannot be sent at this time.
RELATED INFORMATION
Functions: X25OpenPort(3X25), X25ReadDataQM(3X25), X25SendData(3X25).
CTF for Digital UNIX − CTF User’s Guide,
X.25 for Digital UNIX − Programmer’s Reference Manual.