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

X25_REJECT (Reject Call) x25sioctl Operation

Purpose

Provides the means to reject an incoming X.25 call.

Description

Note: A call can be rejected only by the process that called the CIO_START operation.

The X25_REJECT x25sioctl operation is used to reject an X.25 incoming call that was forwarded to a session of type SESSION_SVC_LISTEN. This operation causes a clear request to be issued in response to the incoming call.

The X25_REJECT operation returns immediately to the caller, before the command completes. If the immediate return indicates no error, the X.25 device handler builds a status block of type X25_REJECT_DONE on receipt of a clear confirm or clear indication. For kernel mode processes, the status block is passed to the associated status function. The status function is specified when the X.25 channel is opened. For user-mode processes, the block is placed in the associated status and exception queue.

The x25_reject_data Parameter Block

For the X25_REJECT call operation, the arg parameter points to a x25_reject_data structure. The sb.status field of this structure is meaningful on return only if the return code is EIO.

For the X25_REJECT operation, the ext parameter optionally points to a buffer containing the data required for a clear request packet. This data is in the form described in the mbuf structure. For a kernel-mode process, this parameter points to the mbuf structure. For a user-mode process, it points to a buffer of the same format in user space. If the pointer is a null character, the clear request is sent with default cause-and-diagnostic codes and no facilities or user data.

Execution Environment

The X25_REJECT operation can be called from the process environment only.

Return Values

A return code of -1 indicates an unsuccessful operation. If -1 is returned, the kernel sets the errno global variable to one of the following values:

EACCES Indicates the reject must be performed by the same process that called the X.25 CIO_START operation.
EFAULT Indicates an invalid address was specified.
EINVAL Indicates one of the following occurred:
  • A reject was issued on a session that was not started in SESSION_SVC_LISTEN mode.
  • The ext parameter points to a buffer that does not have a packet type of PKT_CLEAR_REQ.

    In addition, the arg->status field may return one of three X.25-specific codes:

    X25_BAD_CALL_ID The call_id field specified is invalid.
    X25_CLEAR Indicates the session has been cleared.
    X25_PROTOCOL Indicates a protocol error occurred.
EIO Indicates an error has occurred. The arg->status field in the x25_reject_data structure contains one of four exception codes
CIO_HARD_FAIL
                          Indicates that a hardware failure was detected.
CIO_NOMBUF
                          Indicates that the operation was unable to allocate mbuf structures.
CIO_NOT_STARTED
                          Indicates that the command could not be accepted because the device has not yet been started by the first call to CIO_START operation.
CIO_TIMEOUT
                          Indicates that a time out occurred.

Implementation Specifics

The X25_REJECT operation functions with an X.25 Interface Co-Processor/2 that has been correctly configured for use on a qualified network. Consult adapter specifications for more information on configuring the adapter and network qualifications.

Related Information

The CIO_START x25sioctl operation.

The x25sioctl entry point.

The X.25 mbuf structure in AIX Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Search ]