DataMuseum.dk

Presents historical artifacts from the history of:

DANOSI

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DANOSI

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦399c0116d⟧ TextFile

    Length: 17964 (0x462c)
    Types: TextFile
    Names: »CS.ENV«

Derivation

└─⟦5bf9983c6⟧ Bits:30010496 DANOSI SW50070 Disk 2/2 MegaSwitch Development Toolset Rel. 1.1 PN: 798-66-79 DVBS1.SW50070.rel.1.1.2/2
    └─⟦this⟧ »PAXENV\CS.ENV« 
└─⟦623820077⟧ Bits:30010493 DVBS1.SW50070.rel.1.0-2 SW500700 MegaSwitch Development Toolset Rel 1.0 DISK 2/2
    └─⟦this⟧ »PAXENV\CS.ENV« 

TextFile

csenv;

(************************************************************)
(*                                                          *)
(*     The internal environment of the                      *)
(*                                                          *)
(*        PAXNET/RC3502 COMMUNICATION SERVICE (CS)          *)
(*       --------------------------------------------       *)
(*                                                          *)
(*     This environment contains decalrations of            *)
(*       constants,                                         *)
(*       types,                                             *)
(*       routines                                           *)
(*     for the CS message communication.                    *)
(*                                                          *)
(* -------------------------------------------------------- *)
(*                                                          *)
(* The PAXNET/RC3502 Communication Service (CS) forms a     *)
(* general service, which will exist as a supporting sub-   *)
(* service to a wide range of specific PAXNET communica-    *)
(* tion services.                                           *)
(*                                                          *)
(* The PAXNET/RC3502 CS contains constants, types and rou-  *)
(* tines for handling                                       *)
(*                                                          *)
(*    1) the process to process communication between       *)
(*       a user-process and a server-process, and           *)
(*                                                          *)
(*    2) the general administration of Service Access       *)
(*       Points (SAPs) within the PAXNET environment.       *)
(*                                                          *)
(* The handling of connection-specific actions is outside   *)
(* the scope of the PAXNET CS.                              *)
(*                                                          *)
(* Specific PAXNET communication services will to some ex-  *)
(* tend (and maybe completely) encapsulate the CS with      *)
(* service-specific constant, type and routine definitions. *)
(* In this way, only a subset of the CS definitions will be *)
(* referred directly by the user-process, while the encap-  *)
(* sulated part of the CS definitions will be referred di-  *)
(* rectly by the server.                                    *)
(*                                                          *)
(************************************************************)

(************************************************************

Revision history:

date    init     description
-------------------------------------------------------------
840104  uh/tsg   first version
840106  tsg      minor changes (cs-incl-t, cs-pool-ctr-t, sap-std-ia-t)
840111  tsg      name-change in sap_act_om_t.
840124  tsg      type-lengths moved to xcsenv, exc.codes inserted,
------  ---      type definitions for sap-buffers changed.
840207  uh       changes in cs_incl_t and cs_pool_ctr_t.
840213  tsg      sap-std-ia-t and cause-definitions changed.
850328  uh       'cs_inv_pr_id' inserted.
850603  uh       op_u_gr_prms, cl_u_gr_prms, incl_prms from SLENV.
850603  uh       SCC reason codes from XSCCENV
851206  tsg      Routines supporting message comm. declared.
870604  tsg/skb  Parameter removed from procedures 'form-sap-ac'
------  -------  and 'form-sap-acano'


**************************************************************)


const

(*-------------------------------------------*)
(* u1 values  (cs defined functions)         *)
(*-------------------------------------------*)

(* control functions *)

cs_incl_sh      = 140;  (* include sharing user *)
cs_incl_pr      = 144;  (* include private user *)
cs_pool_ctr     = 148;  (* pool function *)
sap_activate    = 200;  (* activate SAP *)
sap_passivate   = 208;  (* passivate SAP *)

(* input functions *)

cs_inp_head     = 105;  (* header for input *)

(* output functions *)

cs_err_disc     = 58;   (* internal disconnect *)

(*------------------------------------------*)
(* Exception code definitions               *)
(*------------------------------------------*)

ex_inv_csz        = #hf2;    (* invalid cszone var. states *)
ex_inv_cnst       = #hf3;    (* invalid connection state *)
ex_inv_sapst      = #hf4;    (* invalid sap state *)
ex_inv_qntine     = #hf5;    (* quarantine value invalid *)
ex_inv_dtsz       = #hf6;    (* data size invalid *)
ex_dtt_viol       = #hf7;    (* data turn violation *)
ex_synt_viol      = #hf8;    (* synchron. turn violation *)
ex_relt_viol      = #hf9;    (* release turn violation *)
ex_subs_viol      = #hfa;    (* primitive not part of subset *)
ex_pool_param     = #hfb;    (* pool param. error *)





type

(*----------------------------------------------*)
(* cs buffer format definitions                 *)
(*----------------------------------------------*)

(* cs include user buffer format *)

cs_incl_t = record
fln         : drvbuftype;
csuix       : byte;
ugid        : integer;
no_ctr_bufs : byte;
maxpools    : byte;
end;

incl_prms = record
cs_prms      : cs_incl_t;
usapix,
cssapix      : integer;
sap_prms     : sap_act_prms;
end;

(* User group primitives buffer format *)

op_u_gr_prms = record
fln          : drvbuftype;
ugid         : integer;
max_pools    : integer;
end;

cl_u_gr_prms = record
fln          : drvbuftype;
ugid         : integer;
end;
(* CS pool function buffer format *)

cs_pool_ctr_t = record
fln         : drvbuftype;
csuix       : byte;
ugid        : integer;
poolno      : byte;
poolfunc    : pool_func_t;
noofbufs    : integer;
sdusize     : integer;
end;

(* cs output buffer format *)

cs_om_t = record
fln         : drvbuftype;
csuix       : byte;
ucid,
cscid       : integer;
end;

(* cs input answer buffer format *)

cs_ia_t = record
fln         : drvbuftype;
csuix       : byte;
poolno      : byte;
indic       : byte;
ucid,
cscid       : integer;
end;

(* SAP activate buffer format *)

sap_act_om_t = record
o_prms      : cs_om_t;
sapprms     : sap_act_prms;
end;

(* SAP input answer buffer format *)

sap_std_ia_t = record
i_prms      : cs_ia_t;
sev         : severity_t;
reason      : integer;
minconn,
maxconn     : integer;
end;


const

(*--------------------------------------------*)
(* cs reason definitions                      *)
(*--------------------------------------------*)

cs_no_reason    = 0;    (* no reason *)
cs_rem_disc     = 1;    (* remote user disconnect *)
cs_sys_disc     = 2;    (* service system initiated disconnect *)
cs_insuff_qos   = 3;    (* insufficient qos caused disconnect *)
cs_sys_busy     = 40;   (* establ. rej. caused by no resources *)
cs_unkn_addr    = 41;   (* establ. rej. caused by addr unknown *)
cs_inv_pr_id    = 42;   (* Invalid protocol id. in conn req. or SAP act*)
cs_id_n_fo      = 50;   (* Logic identifier not found in directory *)
cs_dir_n_fo     = 51;   (* Directory identifier not found *)
cs_id_inv       = 52;   (* Invalid identifier format *)
cs_acc_inv      = 53;   (* Access control violation *)
cs_prm_err      = 54;   (* Parameter error. Internal error *)
cs_ownid_inv    = 55;   (* Owner id invalid or not found *)
cs_subs_fail    = 56;   (* Subscribtion failed. *)
cs_sys_err      = 57;   (* Internal system error *)

(* tl reason definitions offset *)

ts_reas_offset  = 400;

(* sl reason definitions offset *)

sl_reas_offset  = 500;

(* pl reason definitions offset *)

pl_reas_offset  = 600;

(* al reason definitions offset *)

al_reas_offset  = 700;


(*--------------------------------------------------*)
(*                                                  *)
(* Routines supporting the CS message communication *)
(*                                                  *)
(* These routines may assist the user program in    *)
(* encoding and decoding CS interface messages.     *)
(*                                                  *)
(*--------------------------------------------------*)


(*-----------------------------------*)
(* Routines for CS user inclusion    *)
(*-----------------------------------*)

(*-------------------------------------------*)
(* form-cs-inclreq                           *)
(*  Prepares 'buf' for a user inclusion re-  *)
(*  quest (not using 'usergroup').           *)
(* Call parameters:                          *)
(*  n-ctr-bufs    cf. CSI manual             *)
(*  n-pools       cf. CSI manual             *)
(*  stream-u4     u4 field value             *)
(* Return parameters:                        *)
(*  buf           formatted (u-fields and    *)
(*                parameters excl. usergr.)  *)
(*-------------------------------------------*)

procedure form_cs_inclreq (
var buf         : reference;
n_ctr_bufs      : byte;
n_pools         : byte;
stream_u4       : byte);
external;

(*-------------------------------------------*)
(* read-cs-inclans                           *)
(*  Reads the parameters of a user include   *)
(*  answer.                                  *)
(* Call parameters:                          *)
(*  buf           the incl. answer buffer    *)
(* Return parameters:                        *)
(*  cs-user-ix    cf. CSI manual             *)
(*  n-ctr-bufs    cf. CSI manual             *)
(*  n-pools       cf. CSI manual             *)
(*-------------------------------------------*)

procedure read_cs_inclans (
var buf         : reference;
var cs_user_ix  : byte;
var n_ctr_bufs  : byte;
var n_pools     : byte);
external;


(*-----------------------------------*)
(* Routines for CS pool operations   *)
(*-----------------------------------*)

(*-----------------------------------------------*)
(* form-cs-poolreq                               *)
(*  Prepares 'buf' for a pool operation.         *)
(* Call parameters:                              *)
(*  poolfunc      cf. CSI manual                 *)
(*  cs-user-ix    cf. CSI manual                 *)
(*  poolno        cf. CSI manual                 *)
(*  n-bufs        cf. CSI manual                 *)
(*  sdusize       cf. CSI manual                 *)
(*  stream-u4     u4 field value                 *)
(* Return parameters:                            *)
(*  buf           formatted (u-fields and        *)
(*                parameters)                    *)
(*-----------------------------------------------*)

procedure form_cs_poolreq (
var buf         : reference;
poolfunc        : pool_func_t;
cs_user_ix      : byte;
poolno          : byte;
n_bufs          : integer;
sdusize         : integer;
stream_u4       : byte);
external;

(*-----------------------------------------------*)
(* read-cs-poolans                               *)
(*  Reads the parameters of a poll operation     *)
(*  answer.                                      *)
(* Call parameters:                              *)
(*  buf           The pool oper. answer buffer   *)
(* Return parameters:                            *)
(*  n-bufs        cf. CSI manual                 *)
(*  sdusize       cf. CSI manual                 *)
(*-----------------------------------------------*)

procedure read_cs_poolans (
var buf         : reference;
var n_bufs      : integer;
var sdusize     : integer);
external;


(*-----------------------------------*)
(* Routines for normal CS operations *)
(*-----------------------------------*)

(*----------------------------------------------*)
(* form-cs-req                                  *)
(*  Prepares 'buf' for a normal CS operation    *)
(*  (connection specific functions etc.).       *)
(* Call parameters:                             *)
(*  cs-user-ix    cf. CSI manual                *)
(*  u-conn-id     cf. CSI manual                *)
(*  cs-conn-id    cf. CSI manual                *)
(*  func-u1       function (u1 field value)     *)
(*  stream-u4     u4 field value                *)
(* Return parameters:                           *)
(*  buf           formatted (u-fields and       *)
(*                parameters)                   *)
(*----------------------------------------------*)

procedure form_cs_req (
var buf         : reference;
cs_user_ix      : byte;
u_conn_id       : integer;
cs_conn_id      : integer;
func_u1         : byte;
stream_u4       : byte);
external;

(*----------------------------------------------*)
(* read-cs-reqans                               *)
(*  Reads cs-request answer parameters. Only    *)
(*  'cs' specific parameters are read (i.e.     *)
(*  those specified in 'cs_om_t').              *)
(* Call parameters:                             *)
(*  buf           The indication buffer         *)
(* Return parameters:                           *)
(*  cs_user_ix    cf. CSI manual                *)
(*  u_conn_id     cf. CSI manual                *)
(*  cs_conn_id    cf. CSI manual                *)
(*----------------------------------------------*)
 
procedure read_cs_reqans(
var buf        : reference;
var cs_user_ix : byte;
var u_conn_id  : integer;
var cs_conn_id : integer);
external;

(*----------------------------------------------*)
(* read-cs-indic                                *)
(*  Reads the basic parameters of a CS indica-  *)   
(*  tion.                                       *)
(* Call parameters:                             *)
(*  buf           The indication buffer.        *)
(* Return parameters:                           *)
(*  fln           bufferfields: first,last,next *)
(*  cs-user-ix    cf. CSI manual                *)
(*  indic         service specific (cf. manuals)*)
(*  poolno        cf. CSI manual                *)
(*  u-conn-id     cf. CSI manual                *)
(*  cs-conn-id    cf. CSI manual                *)
(*----------------------------------------------*)

procedure read_cs_indic (
var buf         : reference;
var fln         : drvbuftype;
var cs_user_ix  : byte;
var indic       : byte;
var poolno      : byte;
var u_conn_id   : integer;
var cs_conn_id  : integer);
external;


(*----------------------------------*)
(* Routines for SAP operations      *)
(*----------------------------------*)

(*------------------------------------------------*)
(* form-sap-ac                                    *)
(*  Prepares 'buf' for a SAP activate request     *)
(*  for SAPs with logical titles.                 *)
(* Call parameters:                               *)
(*  cs-user-ix    cf. CSI manual                  *)
(*  u-sap-id      cf. CSI manual                  *)
(*  min-n-conn    cf. CSI manual                  *)
(*  max-n-conn    cf. CSI manual                  *)
(*  qos-frame     cf. CSI manual                  *)
(*  access-prms   cf. CSI manual                  *)
(*  no-prot-ids   cf. CSI manual                  *)
(*  prot-ids      cf. CSI manual                  *)
(*  log-id-title  cf. CSI manual                  *)
(*  fixedadr      cf  CSI manual                  *)
(*  sapadr        cf  CSI manual                  *)
(*  stream-u4     u4 field value                  *)
(* Return parameters:                             *)
(*  buf           formatted (u-fields and         *)
(*                parameters)                     *)
(*------------------------------------------------*)

procedure form_sap_ac (
var buf         : reference;
cs_user_ix      : byte;
u_sap_id        : integer;
min_n_conn      : integer;
max_n_conn      : integer;
qos_frame       : qos_fr_t;
access_prms     : access_ctr_t;
no_prot_ids     : byte;
prot_ids        : pr_id_array_t;
log_id_title    : logic_id_t;
fixedadr        : boolean;
sapadr          : sap_adr_t;
stream_u4       : byte);
external;

(*------------------------------------------------*)
(* form-sap-acano                                 *)
(*  Prepares 'buf' for a SAP activate request     *)
(*  for anonymous SAPs.                           *)
(* Call parameters:                               *)
(*  cs-user-ix    cf. CSI manual                  *)
(*  u-sap-id      cf. CSI manual                  *)
(*  min-n-conn    cf. CSI manual                  *)
(*  max-n-conn    cf. CSI manual                  *)
(*  qos-frame     cf. CSI manual                  *)
(*  access-prms   cf. CSI manual                  *)
(*  no-prot-ids   cf. CSI manual                  *)
(*  prot-ids      cf. CSI manual                  *)
(*  fixedadr      cf. CSI manual                  *)
(*  sapadr        cf. CSI manual                  *)
(* Return parameters:                             *)
(*  buf           formatted (u-fields and         *)
(*                parameters)                     *)
(*------------------------------------------------*)

procedure form_sap_acano (
var buf         : reference;
cs_user_ix      : byte;
u_sap_id        : integer;
min_n_conn      : integer;
max_n_conn      : integer;
qos_frame       : qos_fr_t;
access_prms     : access_ctr_t;
no_prot_ids     : byte;
prot_ids        : pr_id_array_t;
fixedadr        : boolean;
sapadr          : sap_adr_t;
stream_u4       : byte);
external;

(*------------------------------------------------*)
(* read-sap-indic                                 *)
(*  Reads the SAP indication parameters of a SAP  *)
(*  indication.                                   *)
(* Call parameters:                               *)
(*  buf           the SAP indication buffer       *)
(*  sapstate      the SAP state before the indic. *)
(* Return parameters:                             *)
(*  sapstate      the SAP state after the indic.  *)
(*  sev           cf. CSI manual                  *)
(*  reason        cf. CSI manual                  *)
(*  min-n-conn    cf. CSI manual                  *)
(*  max-n-conn    cf. CSI manual                  *)
(*------------------------------------------------*)

procedure read_sap_indic (
var buf         : reference;
var sapstate    : sap_states;
var sev         : severity_t;
var reason      : integer;
var min_n_conn  : integer;
var max_n_conn  : integer);
external;

.