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

CALL REQUEST/INDICATION Packet

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

A client process sends a CALL REQUEST packet to establish an SVC with a remote host. This packet is transmitted when a connect() system call is issued. When the X.25 subsystem receives a CALL INDICATION packet and locates a socket whose bind address matches the specified called address, it allows the associated listen socket to unblock an accept() system call or select readable.

Figure A-1 CALL REQUEST Packet

[CALL REQUEST Packet]

The access to the fields in the CALL REQUEST/INDICATION packet is described below:

General Format Identifier

Indicates D bit 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 applica tion. The packet sequence count (X.25 supports only modulo 8) is set at con figuration time and cannot be read or written by the application. However, the configuration 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 700/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 of packets can be effected or detected.

To read this field on an incoming packet: Use the listen() and accept() system calls to detect the arrival of a CALL REQUEST packet.

To write this field on an outgoing packet: Use the connect() system call to transmit a CALL REQUEST packet.

Calling DTE Address (Length)

Indicates the source of the packet.

To read this field on an incoming packet: These fields can be obtained through the accept() system call, which returns an x25addrstr structure containing the calling DTE address of the incoming CALL REQUEST packet.

To write this field on an outgoing packet:The subsystem computes this field. If the local machine has multiple X.25 interfaces connected to it, the client can select which interface (each with a unique X.121 address) to use by specifying the x25ifname field in the x25addrstr structure. The address is the X.121 configuration packet address, plus the subaddress specified with ioctl(X25_WR_CALLING_SUBADDR) call.

Called DTE Address (Length)

Indicates the destination of the packet. This field is accessed through the x25addrstr structure.

To read this field on an incoming packet:These fields can be read using the getsockname() system call after the connection has been established.

To write this field on an outgoing packet: The subsystem computes this field from the x25addrstr supplied in the connect() system call.

Facilities (Length)

Optional. Indicates the facilities used for this SVC.

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

To write this field on an outgoing packet: These fields can be written with the ioctl(X25_WR_FACILITIES).

Call User Data

Optional. Contains a protocol ID and/or user defined data.

To read this field on an incoming packet:The entire user data field including the protocol ID can be read with the ioctl(X25_RD_USER_DATA).

To write this field on an outgoing packet: The entire user data field including the protocol ID can be written with the ioctl(X25_WR_USER_DATA).