Solstice X.25 9.2 Developer's Guide

6.3 Generic Structures

The structures described in this section define addressing, facilities and QOS and are used by a number of the commands described in "6.4 NLI Commands".

6.3.1 xaddrf--Define Addressing

Addressing is defined by the xaddrf structure:


Example 6-2 xaddrf Structure

#define NSAPMAXSIZE 20

 struct xaddrf {
        uint32_t           link_id;
        unsigned char           aflags;
        struct lsapformat       DTE_MAC;
        unsigned char           nsap_len;
        unsigned char           NSAP[NSAPMAXSIZE];
}

The members in the xaddrf structure are:

Table 6-4 Members of xaddrf Structure

Member 

Description 

link_id

Holds the link number as an uint32_t. By default, link_id has a value of 0xFF. When link_id is 0xFF, Solstice X.25 attempts to match the called address with an entry in a routing configuration file. If it cannot find a match, it routes the call over the lowest numbered WAN link.

aflags

Specifies the options required or used by the subnetwork to encode and interpret addresses. Takes one of these values:

NSAP_ADDR 0x00 NSAP field contains OSI-encoded NSAP address

EXT_ADDR 0x01 NSAP field contains non-OSI-encoded extended address

PVC_LCI 0x02 NSAP field contains a PVC number.

DTE_MAC

The DTE address, or LSAP as two BCD digits per byte, right justified, or the PVC_LCI as three BCD digits with two digits per byte, right justified.

nsap_len

The length in semi-octets of the NSAP as two BCD digits per byte, right justified. 

NSAP

The NSAP or address extension (see aflags) as two BCD digits per byte, right justified.

6.3.2 lsapformat--Define an LSAP

The LSAP is defined by the lsapformat structure:


Example 6-3 lsapformat Structure

#define LSAPMAXSIZE 9

 struct lsapformat {
 			uint8						lsap_len;
 			uint8						lsap_add[LSAPMAXSIZE];
 }; 

The members of the lsapformat structure are:

Table 6-5 Members of lsapformat Structure

Member 

Description 

lsap_len

The length of the DTE address or LSAP as two BCD digits per byte, right justified. An LSAP is always 14 digits long. A DTE address can be up to 15 decimal digits unless X.25 (88) and TOA/NPI addressing is used, in which case it can be up to 17 decimal digits. A PVC_LCI is 3 digits long.

lsap_add

The DTE address, LSAP or PVC_LCI as two BCD digits per byte, right justified. 

6.3.3 extraformat--Define Standard X.25 Facilities

Standard X.25 facilities are defined by the extraformat structure:


Example 6-4 extraformat Structure

#define MAX_NUI_LEN   64
 #define MAX_RPOA_LEN  8
 #define MAX_CUG_LEN   2
 #define MAX_FAC_LEN   109
 #define MAX_TARIFFS   4
 #define MAX_CD_LEN    MAX_TARIFFS * 4
 #define MAX_SC_LEN    MAX_TARIFFS * 8
 #define MAX_MU_LEN    16

 struct extraformat {
 /* extraformat structure */
         unsigned char     fastselreq;
         unsigned char     restrictresponse;
         unsigned char     reversecharges
         unsigned char     pwoptions;
         unsigned char     locpacket, rempacket;
         unsigned char     locwsize , remwsize;
         int               nsdulimit;
         unsigned char     nui_len;
         unsigned char     nui_field[MAX_NUI_LEN];
         unsigned char     rpoa_len;
         unsigned char     rpoa_field[MAX_RPOA_LEN];
         unsigned char     cug_type;
         unsigned char     cug_field[MAX_CUG_LEN];
         unsigned char     reqcharging;
         unsigned char     chg_cd_len;
         unsigned char     chg_cd_field[MAX_CD_LEN];
         unsigned char     chg_sc_len;
         unsigned char     chg_sc_field[MAX_SC_LEN];
         unsigned char     chg_mu_len;
         unsigned char     chg_mu_field[MAX_MU_LEN];
         unsigned char     called_add_mod;
         unsigned char     call_redirect;
         struct lsapformat called;
         unsigned char     call_deflect;
         unsigned char     x_fac_len;
         unsigned char     cg_fac_len;
         unsigned char     cd_fac_len;
         unsigned char     fac_field[MAX_FAC_LEN];
 };

The members of this structure are defined as follows:

Table 6-6 Members of extraformat Structure

Member 

Description 

fastselreq

Applies only to non-OSI applications, for example X.29. A non-zero value means the X.25 facility fast select is to be requested or indicated.

restrictresponsee

Sets response to be a Clear Request. 

reversecharges

A non-zero value means that reverse charging is requested or indicated for this connection

pwoptions

Indicates per virtual-circuit options. The field is a bit map with the following interpretation: 

bit 0: 0 - Packet size negotiation NOT permitted.  

1 NEGOT_PKT - Packet size negotiation permitted.

bit 1: 0 - Window size negotiation NOT permitted.  

1 NEGOT_WIN - Window size negotiation permitted.

bit 2: 0 - No concatenation limit asserted.  

1 ASSERT_HWM - Assert concatenation limit.

This field is used for two reasons: 1) The X.25 software always indicates the values of the window and packet sizes operating on the virtual circuit. However, the field pwoptions for an incoming call indicates whether these values are negotiable. 2) In Call Requests and Call Responses the NLI user can set a limit value, nsdulimit, for packet concatenation by the X.25 level that differs from the limit in the subnetwork configuration database. It is not a negotiable option, so that whatever the user has requested is used.

locpacket

Contains the packet size for local-to-remote calls, using the following notation: the actual packet size is 2 to the power of the value specified. For example if the field locpacket is set to 7, the actual packet size is 27 or 128.

rempacket

Contains the packet size for remote-to-local calls, using the following notation: the actual packet size is 2 to the power of the value specified. For example if the field rempacket is set to 7, the actual packet size is 27 or 128.

locwsize

The window sizes for local-to-remote calls.  

remwsize

The window sizes for remote-to-local calls. 

nsdulimit

Specifies the packet concatenation limit. 

nui_len

The length of any Network User Identification used in Call Requests and Responses. 

nui_field

Network User Identification used in Call Requests and Responses. This is not available on X.25 (80) networks.

rpoa_len

The length of any RPOA DNIC information used in Call Requests. Valid values for rpoa_len are 0, 4, 8, 12 and 16.

rpoa_field

Any Recognized Private Operating Agency (RPOA) DNIC information. This is used in Call Requests only. It is stored as two BCD digits per byte, right justified. 

On X.25 (80) networks, this is restricted to one RPOA of 4 BCD digits. Basic format encoding is used.  

On X.25 (84) and X.25 (88) networks, there can be one or more RPOAs. Extended format encoding is used if there is more than one RPOA. The maximum number of RPOAs is 4.  

cug_type

Possible values are: 

CUG -- Closed User Group  

BCUG -- Bilateral CUG 

0--No CUG used 

cug_field

Any applicable CUG information, stored as two BCD digits per byte, right justified.

Note: Incoming Closed User Group facilities are assumed to have been validated by the network. No further checking is performed.  

reqcharging

Requests call charging in a Call Request or Connect Accept. 

chg_cd_len

Gives length of chg_cd_field.

chg_cd_field

Specifies duration of the call if call charging is in use. Used in a Disconnect Indication or Confirm. 

chg_sc_len

Gives length of chg_sc_field.

chg_sc_field

Specifies segment count if call charging is in use. Used in a Disconnect Indication or Confirm. 

chg_mu_len

Gives length of chg_mu_field.

chg_mu_field

Specifies monetary unit if call charging is in use. Used in a Disconnect Indication or Confirm. 

called_add_mod

A one byte field holding the reason for any address modification as defined in the X.25 Recommendation, encoded as follows: 

X0000001--Called DTE busy. Call redirected. X0000111--Call distribution within hunt group. X0001001--Called DTE out of order. Call redirected. X0001111--Called DTE has requested systematic redirection. 11000000--Called DTE deflected call.

11000001--Called DTE busy. Gateway redirected call. 11001001--Called DTE out of order. Gateway redirected call.

11001111--Called DTE has requested systematic redirection. Gateway redirected call.

X indicates that this bit is 0 if the address modification occurred in a public data network and 1 if it occurred in a private network.

call_redirect

A one byte field holding the reason for a call redirection as defined in the X.25 Recommendation, encoded as follows: 

00000001--Called DTE busy. Call redirected. 00000111--Call distribution within hunt group. 00001001--Called DTE out of order. Call redirected. 00001111--Called DTE has requested systematic redirection. 11000000--Called DTE deflected call.

11000001--Called DTE busy. Gateway redirected call. 11001001--Called DTE out of order. Gateway redirected call.

11001111--Called DTE has requested systematic redirection. Gateway redirected call.

called

Supplies the originally-called DTE address. 

call_deflect

A one byte field holding the reason for a call deflection as defined in the X.25 Recommendation, encoded as follows: 

11000000--Called DTE deflected call.

11000001--Called DTE busy. Gateway redirected call. 11001001--Called DTE out of order. Gateway redirected call.

11001111--Called DTE has requested systematic redirection. Gateway redirected call.

deflected

In a Clear Request, contains the DTE address, and if required, the NSAP that a call is to be deflected to. 

x_fac_len

Indicates the length of a fac_field relating to X.25 facilities.

cg_fac_len

Indicates the length of a fac_field relating to non-X.25 facilities for the calling network.

cd_fac_len

Indicates the length of a fac_field relating to non-X.25 facilities for the called network.

fac_field

This field is used in Call Requests and Connect Accepts only. It allows for the passing of explicit facility encoded strings for X.25 facilities, and non-X.25 facilities for calling and called networks.  


Note -

The contents of this field, are not validated or acted upon by the code. The X.25 facilities are inserted at the end of any other X.25 facilities which are passed in the Call Request/Accept (for example, packet/window sizes). If any non-X.25 facilities are supplied the appropriate marker is inserted before the supplied facilities. Take care not to duplicate any facilities.


6.3.4 qosformat--Define OSI CONS QOS Parameters

OSI CONS-related quality-of-service parameters are defined in the quosformat structure:

#define MAX_PROT 32
 struct qosformat {
 	unsigned char reqtclass;
 	unsigned char locthroughput, remthroughput;
 	unsigned char reqminthruput;
 	unsigned char locminthru, remminthru;
 	unsigned char reqtransitdelay;
 	unsigned short transitdelay;
 	unsigned char reqmaxtransitdelay;
 	unsigned short acceptable;
 	unsigned char reqpriority;
 	unsigned char reqprtygain;
 	unsigned char reqprtykeep;
 	unsigned char prtydata;
 	unsigned char prtygain;
 	unsigned char prtykeep;
 	unsigned char reqlowprtydata;
 	unsigned char reqlowprtygain;
 	unsigned char reqlowprtykeep;
 	unsigned char lowprtydata;
 	unsigned char lowprtygain;
 	unsigned char lowprtykeep;
 	unsigned char protection_type;
 	unsigned char prot_len;
 	unsigned char lowprot_len;
 	unsigned char protection[MAX_PROT];
 	unsigned char lowprotection[MAX_PROT];
 	unsigned char reqexpedited;
 	unsigned char reqackservice;
 	struct extraformat xtras;
 };

The members of the qosformat structure are defined as follows:

Table 6-7 QOS Parameters

Member 

Description 

reqtclass

Indicates whether the throughput negotiation parameter is selected. 0 indicates that it is not selected. 

locthroughput

Contains four-bit throughput encoding for local-to-remote calls. 

remthroughput

Contains four-bit throughput encoding for remote-to-local calls. 

reqminthruput

Indicates whether the minimum throughput negotiation parameter is selected.

locminthru

Contains four-bit throughput encoding for local to remote calls. 

remminthru

Contains four-bit throughput encoding for remote to local calls. 

reqtransitdelay

Indicates whether the transit delay parameter is selected. 0 indicates that it is not selected. 

transitdelay

Contains the transit delay parameter as a 16-bit value. It is used in Call Requests and Indications and Confirms. 

reqmaxtransitdelay

Indicates whether the calling NLI application specifies a maximum acceptable value for the transit delay parameter ("Lowest Quality Acceptable"). 

Note: The transit delay selection relates only to Call Requests and there is no transit delay QOS parameter in a Call Response primitive. The correct response when the indicated QOS is unattainable is to make a Clear Request. Also, in a Connect Confirm, the value of the selected transit delay will be placed in the transitdelay field when such negotiation takes place.

acceptable

Contains the maximum acceptable transit delay parameter, if this is specified by the calling NLI application.  

reqpriority

Requests or indicates priority on a connection. 0 indicates that priority is not used. 

prtydata

Contains the 8-bit value for the priority of data on the connection. 

reqprtygain

Indicates that the field prtygain is used.

reqprtykeep

Indicates that the field prtykeep is used.

prtygain

Contains an 8-bit value for the priority to gain a connection. 

prtykeep

Contains the 8-bit value priority to keep a connection. 

reqlowprtydata

Indicates the field lowprtydata is used.

reqlowprtygain

Indicates the field lowprtygain is used.

reqlowprtykeep

Indicates the field lowprtykeep is used.

lowprtydata

Contains the lowest acceptable priority value. Used on N-CONNECT requests by the calling NS_user.

lowprtygain

Indicates the priority of data on a connection. Used on N-CONNECT requests by the calling NS_user.

lowprtykeep

Indicates priority for gaining a connection. Used on N-CONNECT requests by the calling NS_user.

protection_type

Indicates the type of protection required. Values are: 

PRT_SRC Source address specific

PRT_DST Destination address specific

PRT_GLB Globally unique

0 indicates that protection is not required. 

On N-CONNECT requests the calling NS_user may optionally specify a lowest acceptable level of protection.

prot_len

The length of the target protection. 

protection

The value of target protection. 

lowprot_len

The length of the lowest acceptable level of protection. 

lowprotection

The lowest acceptable level of protection. 

reqexpedited

Indicates whether expedited data is required/selected. For Connect Indications, a value of 1 implies that the expedited data negotiation facility was present in the Incoming Call packet, and that its use was requested. 0 indicates that expedited data is not used. 

Note: Negotiation is an OSI CONS procedure. When the facility is present and indicates non-use, use cannot be negotiated by Connect responses. See "6.4.3 N_CI--Call Request/Indication"and "6.4.2 N_CC--Call Response/Confirmation"for a description of the use of the CONS_call field in Call Requests and Call Responses.

If the CONS_call flag is set to 0, Expedited Data Negotiation is not required--interrupt data is always available in X.25. This means that this field is ignored on Call Requests and Responses.

reqackservice

Indicates whether the acknowledgement service is to be used. Allowed values are:

0 indicates the service is not used. 

1 signifies acknowledgment confirmation by the remote DTE. In the case of acknowledgment confirmation by the remote application, there is a one-to-one correspondence between D-bit data and acknowledgments with one data acknowledgment being received/sent for each D-bit data packet sent/received over the X.25 interface. 

2 signifies acknowledgment confirmation by the remote application. In this case of acknowledgment confirmation by the remote DTE, no acknowledgments are expected or given over the X.25 interface.  

Any non-zero value causes negotiation in the call setup phase for use of the D-bit on the connection.