[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4 Files Reference

cb_fac_struct Structure for X.25

Purpose

Used by the x25_call and x25_call_accept subroutines to pass facilities information.

Syntax

#define X25FLG_RPOA     
        0x00000001

#define X25FLG_PSIZ         
    0x00000002

#define X25FLG_WSIZ         
    0x00000004

#define X25FLG_TCLS         
    0x00000008

#define X25FLG_REV_CHRG        
 0x00000010
#define X25FLG_FASTSEL        
  0x000000
20
#define X25FLG_FASTSEL_RSP      0x00000040
#define X25FLG_CUG         
     0x00000080

#define X25FLG_OA_CUG           0x0
0000100
#define X25FLG_BI_CUG           0x0
0000200
#define X25FLG_NUI_DATA         0x00000400
#define X25FLG_CI_SEG_CNT       0x00000800
#define X25FLG_CI_MON_UNT       0x00001000
#define X25FLG_CI_CALL_DUR      0x00002000
#define X25FLG_CI_REQUEST       0x00004000
#define X25FLG_CLAMN         
   0x00008000

#define X25FLG_CALL_REDR        0x00010000
#define X25FLG_TRAN_DEL         0x00020000
#define X25FLG_CALLING_ADDR_EXT 0x00040000
#define X25FLG_CALLED_ADDR_EXT  0x00080000
#define X25FLG_MIN_TCLS         0x00100000
#define X25FLG_END_TO_END_DEL   0x00200000
#define X25FLG_EXP_DATA         0x00400000
#define X25FLG_FACEXT           0x0
0800000
struct cb_fac_struct
{
  u_long flags ;
  unsigned fac_ext_len;
  u_char *fac_ext;        /* 
for non-X.25 facilities */
  u_char psiz_clg;
  u_char psiz_cld;
  u_char wsiz_clg;
  u_char wsiz_cld;
  u_char tcls_clg;
  u_char tcls_cld;
  unsigned rpoa_id_len;
  ushort *rpoa_id;
  ushort cug_id;
  unsigned nui_data_len;
  u_char *nui_data;
  unsigned ci_seg_cnt_len;
  u_char *ci_seg_cnt;
  unsigned ci_mon_unt_len;
  u_char *ci_mon_unt;
  unsigned ci_cal_dur_len;
  u_char *ci_cal_dur;
  u_char call_redr_addr[X25_MAX_ASCII_ADDRESS_LENGTH];
  u_char call_redr_reason;
  short tran_del;
  u_char calling_addr_ext_use;
  char calling_addr_ext[X25_MAX_EXT_ADDR_DIGITS+1];
  u_char called_addr_ext_use;
  char called_addr_ext[X25_MAX_EXT_ADDR_DIGITS+1];
  u_char clamn;
  u_char min_tcls_clg;
  u_char min_tcls_cld;
  unsigned end_to_end_del_len;
  ushort end_to_end_del[3];
};
Note: The example shows how to code the cb_fac_struct structure.

Flags

X25FLG_RPOA Recognized private operating agency selection required (rpoa_id).
X25FLG_PSIZ Packet size selection (psiz_clg, psiz_cld).
X25FLG_WSIZ Window size selection (wsiz_clg, wsiz_cld).
X25FLG_TCLS Throughput class required (tcls_clg, tcls_cld).
X25FLG_REV_CHRG Reverse Charge required (no corresponding field).
X25FLG_FASTSEL Fast select (no corresponding field).
X25FLG_FASTSEL_RSP Indicates whether a restricted response is required when the X25FLG_FASTSEL flag is also requested (no corresponding field).
X25FLG_CUG Closed user group selection required (cug_id).
X25FLG_OA_CUG Closed user group with outgoing access (basic format) selection required (cug_id).
X25FLG_BI_CUG Bilateral closed user group selection required (cug_id).
X25FLG_NUI_DATA Network user identification (nui_data).
X25FLG_CI_SEG_CNT Charging information: segment count (ci_seg_cnt).
X25FLG_CI_MON_UNT Charging information: monetary unit (ci_mon_unt).
X25FLG_CI_CAL_DUR Charging information: call duration (ci_cal_dur).
X25FLG_CI_REQUEST Charging information is required (no corresponding field).
X25FLG_CLAMN Called line address modified notification (clamn).
X25FLG_CALL_REDR Call redirection notification (call_redr_addr, call_redr_reason).
X25FLG_TRAN_DEL Transit delay selection and notification (tran_del).
X25FLG_CALLING_ADDR_EXT Calling address extension (calling_addr_ext_use, calling_addr_ext).
X25FLG_CALLED_ADDR_EXT Called address extension (called_addr_ext_use, called_addr_ext).
X25FLG_MIN_TCLS Quality of service negotiation: minimum throughput class (min_tcls_clg, min_tcls_cld).
X25FLG_END_TO_END_DEL Quality of service negotiation: end-to-end transit delay (end_to_end_del).
X25FLG_EXP_DATA Expedited data negotiation (no corresponding field).
X25FLG_FACEXT Facilities extension: for all other facilities, including national options (fac_ext).

Fields

The meanings of the structure fields are as follows, but the lengths associated with individual pointer fields are not explained:

flags Notification to the API that the associated field has been used.
fac_ext Pointer to the facilities extension array (extra facility information provided by the user or network). No checking is made on the validity of this information. It allows extra facilities that the main cb_fac structure does not include. The elements of the fac_ext field are copied directly into the facility field.

When the information is provided by the X.25 network or by the remote data terminal equipment (DTE), it is the responsibility of the application to interpret the field.

Only elements up to the first non-X.25 facility are decoded by the API. Facility markers must be used in the fac_ext field if such facilities are required.

psiz_clg Indicates the requested size for packets transmitted from the calling DTE. Supported values are:

Examples

This is a simple example of the use of the cb_fac_struct structure:

/*         
             
             
             
           &
     */
struct cb_call_struct cb_call;
struct cb_fac_struct fac_struct;
u_char facilities_extension[10],facilities_extension[8];
ushort rpoa_ext_id[3] = {7,8,9};
char extended_calling_addr[]= "1234567890";  /* extension */
/* Initialize flags        
             
             
             */
fac_struct.flags = 0;
/* Use of RPOAE        
             
             
             
    */
fac_struct.rpoa_id = rpoa_ext_id;
fac_struct.rpoa_id_len = 3;
fac_struct.flags |= X25FLG_RPOA;
/* Use of extended addressing     
             
             
      */
fac_struct.calling_addr_ext = extended_calling_addr;
fac_struct.flags |= X25FLG_CALLING_ADDR_EXT;
/* Use of extended facilities     
             
             
      */
facilities_extension[0] = 0x00;     /* 
start of a Facility Marker */
facilities_extension[1] = 0x00;     /* 
non_X25 facility supported */
             
             
          /* by 
calling DTE          
   */
facilities_extension[2] = 0x55;     /* 
a facility          
       */
facilities_extension[3] = 0x66;     /* 
a facility          
      
 */facilities_extension[4] = 0x00;     
/* start of a Facility Marker */
facilities_extension[5] = 0xFF;     /* 
non_X25 facility supported */
             
             
          /* by 
called DTE          
    */
facilities_extension[6] = 0x88;     /* 
a facility          
       */
facilities_extension[7] = 0x99;     /* 
a facility          
       */
strcpy(fac_struct.fac_ext, facilities_extension);
fac_struct.fac_ext_len = 8;
fac_struct.flags |= X25FLG_FACEXT;
/*****************************************************************/
/* In this example a cb_call structure 
is initialized          
  */
/* with a cb_fac structure.     
             
             
       */
/*****************************************************************/
cb_call.cb_fac = &fac_struct;
cb_call.flags = X25FLG_CB_FAC;

Related Information

The x25sdefs.h file.

The cb_call_struct structure, cb_clear_struct structure.


[ Previous | Next | Contents | Glossary | Home | Search ]