|
|
DataMuseum.dkPresents historical artifacts from the history of: DANOSI |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DANOSI Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 22942 (0x599e)
Types: TextFile
Names: »NET.ENV«
└─⟦623820077⟧ Bits:30010493 DVBS1.SW50070.rel.1.0-2 SW500700 MegaSwitch Development Toolset Rel 1.0 DISK 2/2
└─⟦this⟧ »PAXENV\NET.ENV«
netenv;
(**********************************************************************)
(* *)
(* netenv *)
(* *)
(* common netnet environment *)
(* *)
(* description: *)
(* This environment contain constants and types, relevant for most of *)
(* the PAXNET modules. *)
(* Furthermore it contains some of the very important configuration *)
(* parameters for a PAXNET node. *)
(* *)
(* This environment is intented to be used by all PAXNET modules. *)
(* *)
(* date init changes *)
(* ---------------------------------------------------------------- *)
(* 820730 chh first released version *)
(* 82.... ??? various changes *)
(* 821104 tsg head_lgt_rout changed (paxnet router head lgt) *)
(* rlmax changed to 3 (no. of routing levels) *)
(* 821119 jbf dok_indent_type inserted *)
(* f_l_n_type changed *)
(* 821119 peho ts_conf_type inserted *)
(* 830304 peho ts_conf_type changed *)
(* 830526 chh new hdlc driver interface (hdlc2). *)
(* 830621 jli new ph_type(pool handler) *)
(* 840101 uh SL buffer parameters inserted. *)
(* 840323 chh dnic_type and net_addr_type inserted. *)
(* 840331 UH min_inp_ctr_f_sl, min_inp_dt_f_sl from slenv *)
(* 840528 tsg stdpriority ch. to minpriority (from -3) *)
(* 841011 tsg exchange-lcp operation defined (u1, u2, type) *)
(* 870923 phk inserted paxopsys_zone declarations *)
(* 870924 phk inserted the new paxopsys process families *)
(* 880302 phk inserted declaration af hdlc_line_type and the *)
(* get_hdlc_line function *)
(* 880808 kgj lic_max_window defined *)
(* 880628 bb inserted idte declarations *)
(* 890524 bb paxsem_type extended with net_addr_modifier *)
(* paxsem access routines included *)
(* 890524 bb tofrom included *)
(* stdpriority and releasepool removed *)
(* 911111 inb mini/midi/maxi param type extended to Mega *)
(* *)
(**********************************************************************)
const
(****************************)
(**** version number ****)
(****************************)
vers_netenv = 0; (* version number *)
rel_netenv = 0; (* release number *)
(******************************************************)
(**** important PAXNET configuration constants ****)
(******************************************************)
x25_packet_size = 256; (* length in bytes of data part of x25 packet *)
(*************************************)
(**** u1 values (function) ****)
(*************************************)
exch_lcp_u1 = 155; (* exchange lcp values (requester/server) *)
(********************************)
(**** u2 values (result) ****)
(********************************)
(* basic function 0 *)
ab_term = 16; (* abnormal termination/disconnection *)
ab_user_term = 24; (* -"- -"- upon user request *)
ok = 0; (* processed successfully *)
rem_ass_req = 8; (* connection/setup/establish request received *)
(* basic function 1 *)
sys_not_process = 1; (* not processed from basis system *)
not_processed = 9; (* not processed *)
rejected = 17; (* messages rejected by module or remote user *)
(* basic function 2 *)
busy = 2; (* no internal resources, module busy *)
net_not_accs = 18; (* network not accessible *)
timeout = 10; (* timeout has occured *)
(* basic function 3 *)
no_user_res = 11; (* the user has not delivered the needed resource *)
retr_exh = 27; (* number of retries exhausted *)
rem_user_term = 19; (* disconnection/clear by remote user *)
user_term = 3; (* local user has closed/cleared/disconnected the data path *)
(* basic function 4 *)
buf_lgth_err = 28; (* buffer length error *)
fct_not_allw = 12; (* function not allowed *)
format_err = 20; (* format error in message *)
ill_opcode = 4; (* illegal ( unknown ) opcode *)
not_mess = 44; (* value in u2 of message header <> 7 *)
rec_unkw = 36; (* receiver unknown *)
(* basic function 7 *)
message = 7; (* message *)
(*******************************)
(**** general constants ****)
(*******************************)
forever = false;
$if fln > 0
drv_param_lgt = 6; (* length of drvbuftype *)
$else
drv_param_lgt = 0;
$endif
pax_break_code = 80; (* break code, when a process is breaked *)
type
(***************************)
(**** general types ****)
(***************************)
sempointer = ^mailbox;
tap_pointer = record
s: sempointer;
w: sempointer;
end;
int32 = record
msp: integer;
lsp: integer;
end;
relation = (ls, eq, gr);
drvbuftype = record
$if fln > 0
first: integer;
last: integer;
next: integer;
$endif
end;
f_l_n_type = record
$if fln > 0
first,
last,
next : integer;
$endif
end;
exch_lcp_type = record (* for exchange lcp function *)
fln : drvbuftype;
user_index : integer;
user_lcpid : integer;
server_lcpid : integer;
end;
(*********************************)
(**** configuration types ****)
(*********************************)
dnic_type = packed3502 array(1..4) of 0..15;
net_addr_type = record
dnic: dnic_type;
net: byte;
region_: byte;
node: byte;
end;
(******************************)
(**** hdlc parameters *****)
(******************************)
const
max_hdlc_lines = 64; (* maximum number of hdlc lines. must be even *)
type
hdlc_semaphores = record
hl_control: tap_pointer;
hl_input: tap_pointer;
hl_output: tap_pointer;
hl_reserve: tap_pointer;
end;
hdlc_table_type = array(0..max_hdlc_lines - 1) of record
hdlc_sems: hdlc_semaphores;
user: integer;
?: array(1..4) of integer;
end;
hdlc_line_type = record
input, output, control,
reserve : ^mailbox
end;
(*******************************)
(**** router parameters ****)
(*******************************)
const
cmax = 9; (* max number of connectors *)
rlmax = 3; (* number of routing levels *)
cparam_max = 10; (* max. number of parameters in connector create *)
rparam_lgt = 4*typesize(integer); (* length of rparams *)
head_lgt_rout = 22; (* max. length of router headers *)
min_f_rout = drv_param_lgt + rparam_lgt + head_lgt_rout; (* min. value of first *)
type
nwadr = array(1..rlmax) of integer;
ltsmarray = array(1..cmax) of tap_pointer;
conn_typ = (none, typ_locon, typ_hlcon, typ_dtecon, typ_lancon); (* connector types *)
cparams_type = array(1..cparam_max) of integer;
conn_desc_type = record
ctyp: conn_typ;
cparams: cparams_type;
end;
conn_desc_array = array(1..cmax) of conn_desc_type;
(****************************)
(**** LIC parameters ****)
(****************************)
const
head_lgt_lic = 10; (* max. length of lic headers *)
min_f_lic = min_f_rout + head_lgt_lic; (* min. value of first *)
lic_max_window = 16; (* max possible window size *)
(* constants used for stack size computing (words) *)
bst_lic = 400; (* basic stack *)
licdescsz = 31; (* size of lic descriptor per lic port *)
linksz = 8; (* size of ???? *)
(* formula for computing stack size:
stacksize = bst_lic +
no_of_lics * (licdescsz + lic_max_window * linksz) *)
(****************************)
(**** DCE parameters ****)
(****************************)
(*************************************)
(**** internal DTE parameters ****)
(*************************************)
const
head_lgt_idte = 3; (* max. length of x25 headers *)
min_f_idte = min_f_lic + head_lgt_idte; (* min. value of first *)
dte_addr_lgt = 14; (* DTE address length *)
(*********************************)
(**** x.21 dte parameters ****)
(*********************************)
type
charge_type = (yes,no);
allowed_type = (allowed,not_allowed);
x21_call_type = (normal,direct,sel_direct,abbreviated);
(***************************)
(**** TS parameters ****)
(***************************)
const
ctr_lgt_ts = 40; (* maximum length of control parameters *)
dt_lgt_ts = 4; (* maximum length of data parameters *)
ctr_dt_ts = 128; (* maximun length of user data in control packets *)
min_f_ctr_ts = drv_param_lgt + ctr_lgt_ts; (* min. value of first in control primitives *)
min_f_dt_ts = drv_param_lgt + dt_lgt_ts; (* min. value of first in data transfer primitives *)
min_rctr_ts = min_f_ctr_ts + ctr_dt_ts; (* min. length of receive control buffer (bytes) *)
tsap_id_length = 3; (* length of tsap identifier *)
ts_pool_id_length= 3;
type
nuid_type = array(1..dte_addr_lgt) of char;
tsap_id_type = array(1..tsap_id_length) of char;
ts_pool_id_type= array(1..ts_pool_id_length) of char;
nuid_mask = record
nuid_signf : byte;
nuid : nuid_type;
end;
tsap_id_mask = record
tsap_id_signf : byte;
tsap_id : tsap_id_type;
end;
ts_pool_id_mask = record
pool_id_signf : byte;
pool_id : ts_pool_id_type;
end;
ts_conf_type = record
tsa_max,
tcep_id_max,
pool_no_max: byte;
tc_max: integer;
nc_max,
xdte_maxstream,
idte_maxstream,
gen_number,
dedic_number,
recv_tsi_no,
no_event_buffers,
dedic_input_no,
xdte_gen_no,
idte_gen_no,
t_low_no_tc_pr_nc,
t_high_no_tc_pr_nc,
t_sup_high_no_tc_pr_nc,
t_low_credit,
t_high_credit,
t_sup_high_credit,
t_low_min_credit,
t_high_min_credit,
t_sup_high_min_credit,
ack_mins,
ack_secs,
ack_msecs,
tick_mins,
tick_secs,
tick_msecs,
cr_ticks,
dt_ticks,
dr_ticks,
ed_ticks,
pr_ticks,
err_ticks,
crd_ticks : byte;
end;
(*****************************)
(* SL parameters *)
(*****************************)
const
head_lgt_sl = 52;
min_ctr_f_sl = 140;
max_ctr_dt_sl = ctr_dt_ts - head_lgt_sl; (* max data in sl control output*)
min_dt_f_sl = 20;
inp_ctr_f_sl =min_f_ctr_ts; (* the value of first in input control buffers*)
inp_dt_f_sl = 22;
min_inp_ctr_l_sl = inp_ctr_f_sl + ctr_dt_ts -1;
min_inp_dt_l_sl = inp_dt_f_sl + head_lgt_sl + 64;
(* SAP address type *)
const
sap_adr_suf = 4;
sap_adr_lgt = dte_addr_lgt + sap_adr_suf;
type
hex_digit = 0 .. 15;
sap_adr_t = packed array (1 .. sap_adr_lgt) of hex_digit;
(* Logic id types *)
const
logic_id_lgt = 63;
type
logic_id_arr = string( logic_id_lgt ); -- RC5000 change
logic_id_t = record
lgt : byte;
id : logic_id_arr;
end;
restart_type = ( runs_restart, poll_restart);
paxsem_type = record
restarted : boolean;
net_addr : net_addr_type;
restart_kind : restart_type;
poll_restart_count : integer;
poll_restart_limit : integer;
runs_restart_count : integer;
nmc_ssap : sap_adr_t;
nmc_luid : logic_id_t;
no_of_files : byte;
net_addr_modifier : alfa;
end;
const
paxsem_type_size = typesize (paxsem_type); -- bytes
init_paxsem_value =
paxsem_type(:
false,
(: (: 4 *** 0 :), 0, 0, 0 :),
runs_restart,
0,
0,
0,
(: sap_adr_lgt *** 0:),
(: 0, (: logic_id_lgt *** nul :) :),
7, -- will never be changed when loading from fpa
" ":);
(**** TSAT parameters ****)
(******************************)
const
max_tsat_tcep_id = 4; (* max. tcep_id for one tsat incarnation *)
type
tr_sem_type = array(1..max_tsat_tcep_id) of tap_pointer;
(*****************************)
(**** POBOX parameters ****)
(*****************************)
const
ss_pool_id_length = 3;
doc_ident_length = 12;
type
doc_ident_type = array(1..doc_ident_length) of char;
ss_pool_id_type = array(1..ss_pool_id_length) of char;
ss_pool_id_mask = record
pool_id_signf: byte;
pool_id: ss_pool_id_type;
end;
(*****************)
(**** com ****)
(*****************)
const
com_sem_max = 5; (* max. number of command children *)
com_number_max = 30; (* max. number of commands in command field *)
com_index_max = 40; (* max. number of commands used *)
type
com_index_type = array(1..com_index_max) of integer;
alfa36 = array(1..36) of char;
com_type = array(1..com_number_max) of alfa36;
com_sem_type = array(1..com_sem_max) of mailbox;
(***********************)
(* ISO TEST PARAMETERS *)
(***********************)
netsem_array = array (61..62) of tap_pointer;
(*************************************)
(**** pool handler parameters ****)
(*************************************)
type
stat = record
req, (* total no of requests *)
wreq, (* waiting requests *)
mwreq, (* max waiting requests *)
twreq, (* total no of waits *)
tmout: integer; (* no of timeouts *)
end;
bst = record
buffer_size, (* buffer size in words *)
buf, (* total no of buffers *)
wait_for_dealloc,
freebuf, (* no of free buffers *)
maxfree, (* max no of free buffers *)
minfree: integer; (* min no of free buffers *)
end;
prelement = record
st: stat;
sem: mailbox;
end;
prtable = array(0..3) of prelement;
pst = record
wreq: integer;
stb: bst;
end;
ph_type = record
key: mailbox; (* semaphore to protect ph *)
mess_sem:mailbox;
answ_sem:mailbox;
buffer_sem: mailbox;
bpool: pst;
prio: prtable;
end;
(********************************)
(**** snooper parameters ****)
(********************************)
const
max_pickups = 20; (* max. number of pickups *)
type
snoop_semp_type = array(1..max_pickups) of tap_pointer;
(************************************)
(*** paxopsys zone parameters ***)
(************************************)
const
sync_pax_message = 1;
pax_create_semaphore = 2;
pax_free_semaphore = 3;
pax_get_hdlc_line = 4;
type
paxopsys_type = record
name1 : alfa;
name2 : alfa;
aux : integer
end;
paxopsys_zone = record
? :^mailbox;
? : pool;
? : mailbox;
? : reference
end;
(*************************************)
(*** paxopsys process families ***)
(*************************************)
type
$if target <> rc5000
mini_param_type = array(1.. 8) of byte;
midi_param_type = array(1.. 32) of byte;
maxi_param_type = array(1..128) of byte;
$else
mini_param_type = array(1.. 16) of byte;
midi_param_type = array(1.. 64) of byte;
maxi_param_type = array(1..256) of byte;
$endif
(************************************************************)
(* address parameters and types *)
(*************************************************ktas/87****)
const
nl_addr_length = 40;
afi_length = 2;
idi_length = 14;
type
afi_type = array (1..afi_length) of '0'..'9';
idi_type = array (1..idi_length) of '0'..'9';
dsp_type = array (1..nl_addr_length
- afi_length
- idi_length) of '0'..'9';
const
x121_afi = afi_type(:'3','6':);
type
osi_net_addr_type =
record
afi : afi_type;
idi : idi_type;
dsp : dsp_type;
end;
nsap_addr_type =
record
net_act_lg : byte;
net_addr : osi_net_addr_type;
end;
(*****************************************)
(**** general external procedures ****)
(*****************************************)
procedure inc15(var i:integer);
external;
procedure inc32(var i:int32);
external;
function comp32(i,j: int32) : relation;
external;
procedure increment_mod_64k(var i: integer);
external;
<* this comment is inserted 900221 by BB
procedure moveg(
count: integer;
var frombyte: byte;
fromindex: integer;
var tobyte: byte;
toindex: integer);
external;
procedure tofrom(
var toref : reference; toindex : integer;
var fromref : reference; fromindex : integer;
bytes : integer);
external;
*>
procedure nameinit(
var name: alfa;
a: alfa;
pos,incno: integer);
external;
<* this comment is inserted 900221 by BB
function initpool(
var p: pool;
number: integer;
size_in_word: integer): integer;
external;
function initsem(
var s: mailbox;
number,
size_in_words: integer): integer;
external;
*>
procedure panic(code: integer);
external;
procedure init_pax_name(var paxname : alfa; procname : string; inc : byte);
external;
function sync_paxopsys(var z : paxopsys_zone; cause : integer) : integer;
external;
function get_pax_sem(var z : paxopsys_zone; name : alfa) : ^mailbox;
external;
function free_pax_sem(var z : paxopsys_zone; name : alfa) : integer;
external;
function get_hdlc_line(var z : paxopsys_zone; var l : hdlc_line_type) : integer;
external;
CONST
paxsem_ok_done = 0;
paxsem_ok_done_bad = 1;
paxsem_no_message = 2;
paxsem_no_paxsem = 3;
paxsem_ok_not_done = 4;
paxsem_ok_already_done = 5;
paxsem_no_adam = 6;
paxsem_no_resource1 = 7;
paxsem_no_resource2 = 8;
paxsem_adam_error_low = 9;
paxsem_adam_error_high = 29;
paxsem_not_done = 30;
TYPE
nmc_address = RECORD
ssap : sap_adr_t;
luid : logic_id_t;
END;
FUNCTION net_addr_legal( net_addr : net_addr_type): boolean;
-- net_addr expressed as 10 bcd-digits fulfills the following:
-- 1st digit in (. 2..7 .)
-- 2nd..10th digit in (. 0..9 .)
EXTERNAL;
FUNCTION create_paxsem( timer_onoff : boolean): integer;
-- paxsem_ok_done <= new paxsem-message created
-- paxsem_ok_already_done <= existing paxsem-message not changed
-- paxsem_no_paxsem <= couldn't find paxsem-semaphore
-- paxsem_no_resource1 <= lack of intermediate resources
-- paxsem_no_resource2 <= lack of allocator resources
EXTERNAL;
FUNCTION read_paxsem( VAR msg : reference;
offset : integer;
max_bytecount : integer;
VAR bytecount : integer): integer;
-- paxsem_ok_done <= paxsem-message read
-- paxsem_ok_done_bad <= only part of paxsem-message read
-- paxsem_no_paxsem <= couldn't find paxsem-semaphore
EXTERNAL;
FUNCTION set_no_of_bls_files( no_of_files : byte): integer;
-- paxsem_ok_done <= paxsem.no_of_files := no_of_files
-- paxsem_no_paxsem <= couldn't find paxsem-semaphore
EXTERNAL;
FUNCTION get_no_of_bls_files( VAR no_of_files : byte): integer;
-- paxsem_ok_done <= no_of_files := paxsem.no_of_files
-- paxsem_ok_done_bad <= as above, but no_of_files = 0
-- paxsem_no_paxsem <= couldn't find paxsem-semaphore
EXTERNAL;
FUNCTION set_init_load_done: integer;
-- paxsem_ok_done <= paxsem.restarted := true
-- paxsem_no_paxsem <= couldn't find paxsem-semaphore
EXTERNAL;
FUNCTION get_init_load_done: integer;
-- paxsem_ok_done <= paxsem.restarted = true
-- paxsem_ok_not_done <= paxsem.restarted = false
-- paxsem_no_paxsem <= couldn't find paxsem-semaphore
EXTERNAL;
FUNCTION set_net_addr( net_addr : net_addr_type): integer;
-- paxsem_ok_done <= paxsem.net_addr := net_addr
-- paxsem_not_done <= net_addr illegal and saved net_addr legal
-- paxsem_ok_done_bad <= net_addr illegal, but so is saved net_addr
-- paxsem_no_paxsem <= couldn't find paxsem-semaphore
EXTERNAL;
FUNCTION get_net_addr( VAR net_addr : net_addr_type): integer;
-- paxsem_ok_done <= net_addr := paxsem.net_addr
-- paxsem_ok_done_bad <= as above, but net_addr not legal
-- paxsem_no_paxsem <= couldn't find paxsem-semaphore
EXTERNAL;
FUNCTION get_addr_modifier( VAR modifier : alfa): integer;
-- paxsem_ok_done <= modifier := paxsem.net_addr_modifier
-- paxsem_ok_not_done <= net_addr never modified
-- paxsem_no_paxsem <= couldn't find paxsem-semaphore
EXTERNAL;
FUNCTION set_restart_nmc( restart_nmc : nmc_address): integer;
-- paxsem_ok_done <= paxsem.ssap/luid := restart_nmc
-- paxsem_no_paxsem <= couldn't find paxsem-semaphore
EXTERNAL;
FUNCTION get_restart_nmc( VAR restart_nmc : nmc_address): integer;
-- paxsem_ok_done <= restart_nmc := paxsem.ssap/luid
-- paxsem_no_paxsem <= couldn't find paxsem-semaphore
EXTERNAL;
FUNCTION set_poll_restart_limit( restart_limit : integer): integer;
-- paxsem_ok_done <= paxsem.poll_restart_limit := restart_limit
-- paxsem_ok_done_bad <= as above, but count now exceeds limit
-- paxsem_no_paxsem <= couldn't find paxsem-semaphore
EXTERNAL;
FUNCTION restart_s( restart_kind : restart_type): integer;
-- paxsem_ok_done <= ok, attempt to restart s done
-- paxsem_no_adam <= couldn't find adam-semaphore
-- paxsem_no_resource1 <= lack of intermediate resources
-- paxsem_no_resource2 <= lack of allocator resources
-- paxsem_adam_error_low ..
-- paxsem_adam_error_high <= adam answer-error
-- paxsem_no_paxsem <= couldn't find paxsem-semaphore
EXTERNAL;
FUNCTION restarted_get_action( VAR restart_kind : restart_type;
VAR restart_count : integer): integer;
-- paxsem_ok_done <= ok
-- paxsem_ok_done_bad <= as above, but poll and count exceeds limit
-- paxsem_no_paxsem <= couldn't find paxsem-semaphore
EXTERNAL;
(********************************************************************)
(* *)
(* end of NETENV *)
(* *)
(********************************************************************)
.