HPlogo X25/9000: X.25/9000 Programmer's Guide > Appendix A  X.25 Packet Formats

CALL ACCEPTED/CONNECTED Packet

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

A CALL ACCEPTED/CONNECTED packet establishes an SVC with a remote host. A CALL ACCEPTED packet is sent in response to a CALL INDICATION packet. Typically, the X.25 subsystem sends a CALL ACCEPTED packet imme diately in response to a CALL INDICATION packet when an accept system call is issued on a listen socket. However, if the ioctl(X25_CALL_ACPT_APPROVAL) has been issued on the listen socket, X.25 waits for the ioctl(X25_SEND_CALL_ACEPT) to be issued on the socket descriptor returned in the accept() system call.

The access to the fields in the CALL ACCEPTED/CONNECTED packet is described below:

Figure A-2 CALL ACCEPTED Packet

[CALL ACCEPTED Packet]

General Format Identifier

Indicates D bit usage and packet sequence count. This field cannot be read by an X.25 application. The D bit cannot be read or written by an X.25/300 application. The packet sequence count (modulo 8) is set at configuration time and cannot be read or written by the application. However, the configu ration file can be read by the application.

To read this field on an incoming packet:This field cannot be read by the application.

To write this field on an outgoing packet:X.25/800 applications use the ioctl(X25_SEND_TYPE) to set the D bit.

Logical Channel Identifier

Associates a logical channel number with the SVC. This field is controlled by the X.25 subsystem. It can be read with the ioctl(X25_RD_LCI) after the call has been established.

Packet Type Identifier

Indicates the kind of packet. It cannot be read or written directly, but through system calls, the transmission and arrival can be effected or detected.

To read this field on an incoming packet:The application can detect the arrival of this packet when the connect() system call unblocks or selects writable.

To write this field on an outgoing packet:The subsystem automatically sends this packet when an accept() system call has been issued, unless the application is controlling call acceptance. In that case this packet is sent only after an ioctl(X25_SEND_CALL_ACCEPT) is issued on a socket that had ioctl(X25_ACPT_APPROVAL) issued on the listen socket.

Calling DTE Address (Length)

Indicates the source of the packet.

To read this field on an incoming packet: These fields cannot be read by the application.

To write this field on an outgoing packet: The X.25 subsystem computes this field.

Called DTE Address (Length)

Indicates the destination of the packet. They are accessed through the x25addrstr structure.

To read this field on an incoming packet: These fields cannot be read by the application.

To write this field on an outgoing packet: The X.25 subsystem computes this field from the information supplied in the CALL REQUEST packet.

Facilities (Length)

Optional. Indicates the facilities used for this SVC.

To read this field on an incoming packet:These fields can be read with the ioctl(X25_RD_FACILITIES).

To write this field on an outgoing packet: Use the ioctl(X25_WR_FACILITIES) prior to issuing the ioctl(X25_SEND_CALL_ACEPT). The ioctl(X25_ACPT_APPROVAL) must first be issued on the listen socket. Applications cannot control the access to the facilities field, if the call accept packet is generated using the accept() system call.

Call User Data

Optional. Contains application defined data.

To read this field on an incoming packet:These fields can be read with the ioctl(X25_RD_USER_DATA).

To write this field on an outgoing packet: The application must be controlling call acceptance. Use the ioctl(X25_WR_USER_DATA) prior to issuing the ioctl(X25_SEND_CALL_ACEPT) the ioctl(X25_ACPT_APPROVAL) must first be issued on the listen socket. Applications cannot control the access to the call user data field, if the call accept packet is generated using the accept() system call.