HPlogo X25/9000: X.25/9000 Programmer's Guide > Chapter 6 Extended Features

Using Facilities

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

X.25 permits the negotiation of Facilities that can be implemented when calls are connected or cleared.

Facilities are specified in the following packet types:

  • CALL REQUEST/CALL INDICATION,

  • CALL ACCEPTED/CALL CONNECTED,

  • CLEAR REQUEST/CLEAR INDICATION,

  • CLEAR CONF IRMATION.

X.2 5 includes the default Facility settings specified at configuration time for CALL REQUEST packets. The packet's Facility field is read and written with the ioctl: X25_RD_FACILITIES and the X25_WR_FACILITIES calls, respectively.

Consult your system administrator for the X.25 configuration constraints, and the documentation supplied by your network provider for more information about the Facilities permitted on the network.

The ioctl(X25_RD_FACILITIES) Call

The ioctl(X25_RD_FACILITIES) call returns the contents of the Facilities field contained in the last inbound packet containing a Facilities field. New inbound Facilities data overwrites preceding data. Inbound Facilities data can only be read once and storage resources are freed after the data is read. If the process tries to read inbound Facilities data that has already been read, or if no Facilities data is available, the ioctl() call returns a data length of 0.

The ioctl(X25_RD_FACILITIES) call:

  • only reads Facilities data from inbound packets

  • can read Facilities data from a CLEAR INDICATION packet (useful with Fast Select described below)

A process cannot use the ioctl(X25_RD_FACILITIES) call to read Facilities data that it has just written with the ioctl(X25_WR_FACILITIES) call.

Facilities may be added, deleted, rearranged or modified by the X.25 subsystem, the packet switching equipment, or the network provider.

Flow control negotiation, throughput class negotiation, and fast select/reverse charging are subject to X.25 configuration constraints. Some network providers also place further constraints on the Facilities that may be used.

The Facilities supported for ioctl(X25_RD_FACILITIES) are those described in the CCITT X.25 Recommendation (1988). These include:

  • Flow Control Parameter Negotiation—(Packet size and Window size). When a flow control parameter negotiation facility is received and after the Packet Layer finishes the negotiation, the values are such that no further negotiation can take place. The facilities are not available with the ioctl(X25_RD_FACILITIES), for example 0x430302 with a configured window size of 2 2 is not reported by the ioctl, since the final values are 2 and 2 which is the Standard default.

  • Closed User Group Selection—When either a closed user group selection basic or extended format, or a closed user group with outgoing access basic or extended format facility is received, it is always reported as a Closed user group selection extended format.

  • Transit Delay Selection—There is no way to know if the Transit delay selection is received.

  • End-to-end Transit Delay Selection—The cumulative end-to-end transit delay as well as the maximum acceptable end-to-end transit delay is forwarded. The requested end-to-end transit delay is not available and replaced with the unknown transit delay (0xffff).

Syntax for ioctl(X25_RD_FACILITIES)

The ioctl(X25_RD_FACILITIES) and its parameters are described below.

#include <x25/x25ioctls.h>
#include <x25/x25str.h>
/* define X25_MAX_FACILITIES_LEN 109
* struct x25_facilities {
* u_char x25_fac_len; /* length of facilities field */
* u_char x25_fac[X25_MAX_FACILITIES_LEN]
* /* facilities field, exactly as in packet */
* }
*/
int err;
int sd;
struct x25_facilities fac_data;
err = ioctl(sd, X25_RD_FACILITIES, &fac_data);
sd

A socket descriptor for an SVC socket that has just received a CALL INDICATION, CALL CONNECTED, or CLEAR INDICATION packet.

X25_RD_FACILITIES

The definition for the request.

fac_data

Indicates the Facilities from the packet received. The x25_fac[] field contains the Facilities in the format that is required by the X.25 recommendations.

NOTE: If the ioctl(X25_ RD_ FACILITIES) call is issued before the connection is initiated, the ioctl() system call will fail, -1 is returned and errno contains an indication of the cause of the error.

The ioctl (X25_WR_FACILITIES) Call

When the ioctl(X25_WR_FACILITIES) call is issued it writes the contents of the Facilities field for the next transmitted CALL REQUEST and CALL ACCEPTED packets. For a call to be accepted on the server side of a connection with the ioctl() call, call acceptance approval must be in effect. On the client side of the connection, you must issue the ioctl(X25_WR_FACILITIES) call prior to the connect() call.

When you use the ioctl(X25_WR_FACILITIES)call, you:

  • can only write Facilities data for the next outbound CALL REQUEST, CALL ACCEPTED or CLEAR REQUEST packet,

    override any inbound Facilities data that has not already been read,

  • must specify all of the default settings in order to modify any of the default Facilities.

I f no Facilities are specified with the ioctl(X25_WR_FACILITIES) call, the default configuration is set.

The ioctl(X25_WR_FACILITIES) call will overwrite any inbound Facilities data that have not already been read.

It is possible to modify Facilities such as negotiated parameters. Facilities may be added, deleted, or rearranged by the network provider or packet switching equipment.

The Facilities supported for ioctl(X25_WR_FACILITIE S), are those specified in the CCITT and X.25 (1988) recommendation. These include:

  • Flow Control Parameter Negotiation—If your configuration specifies that flow control negotiation is ON and Flow Control Facilities are not requested with the ioctl(X25_WR_FACILITIES) call, your default values for Packet Size and Window Size Facilities are inserted in the packet.

  • Throughput class negotiation—not inserted in the packet unless it is requested, and there is no default configured.

  • Fast Select / Reverse Charging—not inserted in the call or call accepted packet if 0x0100 is requested (neither fast select or reverse charging is requested).

  • Charging information requesting service—if 0x0400 is requested, no charging information is inserted in the call or call accepted packet.

  • RPOA Selection extended format—If only one DNIC is specified, the ioctl (X25_WR_FACILITIES) returns an error (errno EINVAL=22). Use the basic format instead. The extended format is only available if more than one DNIC is specified.

  • Transit Delay Selection—this Facility is used to request a specific end-to-end transit delay (a Packet Layer Protocol function). If present, the value is based on the actual end-to-end transit time (minus the system processing time).

  • End-to-End Transit Delay Selection—this Facility overrides the Transit Delay Selection parameter (above) with a constant corresponding to the system's data processing time. The requested end-to-end transit delay and maximum acceptable end-to-end transit delay values are sent without modification to packets. If this is the only parameter provided and the Transit Delay Selection parameter is not requested, no information is inserted in the packet.

  • Expedited Data Negotiation—not inserted in the packet if requested after a 0x0b00 marker.

  • Network Facilities—these facilities must have a Facility marker just before them.

Network Facilities

Network Facilities are the facilities that need a Facility marker just before them. The only legal Facility markers are those described in the 1988 CCITT X.25 Recommendations and in the 1987 ISO 8208 Standard.

Legal Facilities markers are:

  • 0x000f —for CCITT specified DTE Facilities used to support the OSI Network service.

  • 0x0000 —for non-X.25 Facilities supported by the local network for an internal network call, or for non-X.25 Facilities supported by the network of the calling DTE for an internetwork call.

  • 0x00ff— for non-X.25 Facilities supported by the network of the called DTE for an internetwork call.

NOTE: Network Facilities entries must be provided in the above order with the X.25 Facilities first. The length of the Network Facility entry is limited to 32 Bytes. Illegal Facility codes return the EINVAL(22) error condition.

Syntax for ioctl(X25_WR_FACILITIES)

The ioctl(X25_WR_FACILITIES) call and its parameters are described below.

#include <x25/x25ioctls.h>
#include <x25/x25str.h>
/* define X25_MAX_FACILITIES_LEN 109
* struct x25_facilities {
* u_char x25_fac_len;
* u_char x25_fac[X25_MAX_FACILITIES_LEN];
* }
*/
int err;
int sd;
struct x25_facilities fac_data;
err = ioctl(sd, X25_WR_FACILITIES, &fac_data);
sd

A socket descriptor for an SVC socket that has not yet been connected.

X25_WR_ FACILITIES

The definition for the request.

fac_data

Indicates the Facilities to be included in the CALL REQUEST, CALL ACCEPTED, or CLEAR REQUEST packet. The x25_fac[] field contains the Facilities in the exact format that is required by the X.25 recommendations.