[ Previous | Next | Contents | Search ]
AIXLink/X.25 1.1 for AIX: Guide and Reference

x25_send Subroutine

Purpose

Sends a data packet.

Library

X.25 Communications Library (libx25s.a)

C Syntax

int x25_send(conn_id, cb_data)
int conn_id;
struct cb_data_struct *cb_data;

Description

The x25_send subroutine transfers the data packet to the adapter for transmission across the network. Control is returned to the calling application when the device driver indicates successful data transfer to the adapter. If there is no room for the packet in adapter memory, the x25_send subroutine waits until memory becomes available. The amount of memory available depends on the transmit packet window and the transmit packet size. More memory generally becomes available after the X.25 network sends a Receiver Ready signal for the connection identifier.

Parameters

conn_id Contains the connection identifier of the call.
cb_data Specifies a pointer to data structure, cb_data_struct.

Return Values

If successful, the x25_send subroutine returns a value of 0. If an error occurs, the x25_send subroutine returns a value of -1 and sets the x25_errno global variable to one of the error codes shown below.

Error Codes

On failure, the x25_errno global variable is set to one of the following:

X25BADCONNID

X25NOACKREQ

X25NOCARD

X25NOLINK

X25NOTINIT

X25PROTOCOL

X25RESETCLEAR

X25SYSERR

X25TRUNCTX

If the x25_errno global variable is set to a X25SYSERR value, the errno global variable is set to one of the following values:

EFAULT

EINTR

EIO

ENOSPC

Examples

  1. For code st at ements that send data without the D-bit set; see the example program svcxmit.
  2. For code statements that send data with the D-bit set to request acknowledgment, see the example program svcxmit.

Implementation Specifics

This subroutine is part of X.25 Application in Base Operating System (BOS) Extensions 2.

Related Information

The x25_ack subroutine, x25_receive subroutine.

Processing Calls with the X.25 API, Using the X.25 Structures and Flags, in AIX Version 4.3 Communications Programming Concepts.


[ Previous | Next | Contents | Search ]