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

N_DATA_REQ Primitive

Purpose

Sends data to the remote application

Structure

The structure of the M_PROTO message block, if present, is as follows:

typedef struct {
   ulong PRIM_type;
   ulong DATA_xfer_flags;
} N_data_ind_t;

Description

The N_DATA_REQ primitive indicates that the message contains data. This primitive is user-originated and allows transfers of data between applications.

The NS user must send any integral number of octets of data greater than 0. If the size of the NSDU exceeds the network interface data unit (NIDU), the NSDU may be broken up into multiple NIDUs. When an NSDU is segmented into multiple NIDUs, the N_DATA_REQ primitive sets the N_MORE_DATA_FLAG flag on each NIDU except the last one. The N_RC_FLAG flag can only be set on the last NIDU. This is the standard method of working for the X.25 network.

The format of the message is one or more M_DATA blocks. Using a M_PROTO message block is optional but is used for for two reasons:

Parameters

PRIM_type Specifies the N_DATA_REQ primitive.
DATA_xfer_flags Specifies one of the following values:
N_MORE_DATA_FLAG Indicates that the next N_DATA_REQ message (NIDU) is also part of this NSDU. This uses the X.25 M bit.
N_RC_FLAG Allows the originating NS user to request confirmation of receipt of the N_DATA primitive. The N_DATACK primitives provide confirmation. The parameter can only be present if the NS users and provider agreed to use receipt confirmation during connection establishment. This uses the X.25 D bit.
N_Q_FLAG Indicates that the Qualifier bit (Q-bit) should be set by NPI in the X.25 data packet. This is used by applications that wish to indicate a difference between data and the applications internal command data.

Acknowledgments

This primitive does not require any acknowledgments. However, the primitive may generate a fatal error. The STREAMS M_ERROR message type notifies the application of an EPROTO error. As a result of the error, all system calls on that stream will fail.

Error Codes

EPROTO Indicates one of the following unrecoverable protocol conditions:
  • The network interface was in an incorrect state.
  • The amount of NS user data associated with the primitive is outside the range supported by the NS provider. The NIDU_size parameter of the N_INFO_ACK primitive determines the range.
  • The requested option is either not supported by the NS provider or was not specified with the N_CONN_REQ primitive.
  • The M_PROTO message block was not followed by one or more M_DATA message blocks.
  • The N_RC_FLAG and N_MORE_DATA_FLAG flags were both set in the primitive, or the flags parameter contained an unknown value.

Implementation Specifics

The N_DATA_REQ primitive is part of X.25 Licensed Program.


[ Previous | Next | Contents | Search ]