1 /* Include file "net_db_dec.incl.pl1" */
  2 /*  Includes declarations for data bases located in "ncp_tables_" that are used by NCP */
  3 
  4 dcl (ncp_tables_$host_tbl, ncp_tables_$ncp_data, ncp_tables_$rfc_tbl, ncp_tables_$meter_cells,
  5      ncp_tables_$proc_tbl, ncp_tables_$socket_tbl) fixed bin ext;   /* linkages to the NCP tables in the "ncp_tables_" data base */
  6 
  7 dcl  hpr ptr,                                               /* pointer to the base of "host_tb" */
  8      ppr ptr,                                               /* pointer to the base of "proc_tb" */
  9      mpr ptr,                                               /* pointer to base of "meter_dt" */
 10      npr ptr,                                               /* pointer to the base of "ncp_dt" */
 11      rpr ptr,                                               /* pointer to the base of "rfc_tb" */
 12      spr ptr;                                               /* pointer to the base of "socket_tb" */
 13 
 14 /* PRIMARY DATA BASE - 122(8) words */
 15 
 16 dcl 1 ncp_dt aligned based (npr),                           /* declaration for NCP static cells */
 17     2 ncp_ev_chan fixed bin (71),                           /* event channel id of NCP Daemon process */
 18     2 ncp_procid bit (36),                                  /* process id of NCP Daemon process */
 19     2 ncp_up fixed bin,                                     /* -1 crashed, 0 uninit, 1 imp down, 2 up */
 20     2 (htbl_size, rtbl_size, stbl_size, ftbl_size) fixed bin, /* maximum length of the tables in ncp_db_ */
 21                                                             /* */
 22     2 (htbl_gent, rtbl_gent, stbl_gent, ftbl_gent) fixed bin, /* index of greatest allocated table entry for
 23                                                                host table, rfc table, and socket table, respectively */
 24     2 (htbl_lock, rtbl_lock, stbl_lock, ftbl_lock) bit (36), /* global lock word for host, rfc, and socket tables. */
 25                                                             /* */
 26     2 daemon_dir char (32) aligned,                         /* home directory of Network Daemon */
 27                                                             /* 40(8) */
 28     2 spacen1 (16) fixed bin,
 29                                                             /* 20(8) */
 30     2 host_id fixed bin (32),                               /* network identifier of this Multics System */
 31     2 crash_on_ncp_error bit (1),
 32     2 imp_state char (8) aligned,
 33     2 time_imp_state_changed fixed bin (71),
 34     2 time_ncp_state_changed fixed bin (71),
 35                                                             /* */
 36     2 imp_special_message bit (32),
 37     2 imp_state_change_count fixed bin,
 38     2 spacen3 (3) fixed bin,
 39     2 ptbl_size fixed bin,                                  /* no. slots in "proc_tb" */
 40     2 ptbl_gent fixed bin,                                  /* index of highest slot in use */
 41     2 ptbl_lock bit (36) aligned;                                     /* lock word for "proc_tb" */
 42 
 43 /* METER CELLS - 200(8) words */
 44 dcl 1 meter_dt aligned based (mpr),
 45     2 prev_user_call_time fixed bin (71),
 46     2 prev_daemon_call_time fixed bin (71),
 47     2 accu_time_in_ncp fixed bin (71),
 48     2 accu_time_since_user_call fixed bin (71),
 49                                                             /* */
 50     2 nprocs_in_ncp fixed bin,
 51     2 nprocs_inconsistent bit (1),
 52     2 ndaemon_calls fixed bin,
 53     2 ncalls (5) fixed bin,
 54                                                             /* */
 55     2 net_error_count fixed bin,
 56     2 ncp_wakeup_count (7) fixed bin,
 57                                                             /* */
 58     2 call_count (0: 31) fixed bin,
 59                                                             /* 40(8) */
 60     2 ctl_mess_count (0: 15) fixed bin,
 61                                                             /* 20(8) */
 62     2 tbop_mf_count (48) fixed bin,
 63                                                             /* 60(8) */
 64     2 eco_time fixed bin (71),
 65     2 erp_time fixed bin (71),
 66     2 eco_host fixed bin,
 67     2 erp_host fixed bin,
 68     2 spacem2 (2) fixed bin;
 69 
 70 /* HOST TABLE - 10(8) words per entry */
 71 dcl 1 host_tb (32) aligned based (hpr),
 72     2 hlock bit (36),                                       /* lock word for this entry */
 73     2 (rlkidx, wlkidx) bit (18) unaligned,                  /* imp dim index of read and write control links with this host */
 74     2 rlinkn (32) bit (1) unaligned,                        /* allocation bit cells for the read links from this host.
 75                                                                = 1 if this link number is assigned */
 76     2 spaceh1 bit (4) unaligned,                            /* spacer */
 77     2 xhost_id bit (9) unaligned,
 78                                                             /* null if this slot is unused */
 79     2 host_state bit (6) unaligned,                         /* 0 - not enabled
 80                                                                1 - up
 81                                                                2 - RST sent
 82                                                                3 - unreachable */
 83     2 prev_host_state bit (6) unaligned,
 84     2 time_state_changed fixed binary (71),
 85     2 spaceh2 (2) fixed bin,                                /* spacer */
 86     2 host_id fixed bin (32),                               /* Host ID */
 87     2 hidpad fixed bin (35);
 88 
 89 /* PROC TABLE - each alive process that has used the network has an entry in this table */
 90 /* 30(8) words per entry */
 91 
 92 dcl 1 proc_tb (128) aligned based (ppr),
 93     2 gdtpx ptr,
 94     2 returnpx label,
 95                                                             /* */
 96     2 multuidx char (16),
 97     2 space1x (4) fixed bin,
 98                                                             /* */
 99     2 netuidx bit (24),
100     2 lockidx bit (36),
101     2 processidx bit (36),
102     2 error_recurx fixed bin,
103     2 global_ev_chnx fixed bin (71),
104     2 spacep2x (2) fixed bin;
105 
106 /* RFC TABLE - the RFC blocks are allocated using these physical blocks */
107 /* 4 words per entry */
108 dcl 1 rfc_tb (256) aligned based (rpr),
109     2 fsocq bit (64),                                       /* id of foreign socket requesting connection */
110     2 linkq bit (18) unaligned,                             /* link number to be used. = 0 if this entry is unassigned,
111                                                                = -1 if this entry is assigned to a local "read" socket */
112     2 queuen bit (18) unaligned,                            /* RFC tbl index of the block next on the queue.
113                                                                = 0 if this is the last block.  This cell must
114                                                                be zero if currently unassigned */
115     2 spacer1 fixed bin;                                    /* spacer */
116 
117 /* SOCKET TABLE - contains an entry for each active socket */
118 /* 30(8) words per entry */
119 dcl 1 socket_tb (128) aligned based (spr),
120     2 (evchnx, oevchnx) fixed bin (71),
121     2 (lockx, procidx, oprocidx) bit (36),
122     2 ballocx fixed bin (32),
123                                                             /* */
124     2 mallocx fixed bin (16),
125     2 lsocx bit (41),
126     2 fsocx bit (41),
127     2 queuex bit (18) unaligned,
128     2 linknx bit (18) unaligned,
129     2 host_tb_idxx fixed binary (17) unaligned,
130     2 com_idxx bit (18) unaligned,
131     2 statex fixed binary (5) unaligned,
132     2 bytex bit (8) unaligned,
133     2 (r_wx, int_okx, deac_swx) bit (1) unaligned,
134     2 spaces1x bit (19) unaligned,
135                                                             /* */
136     2 olockidx bit (36),
137     2 umodesx bit (36),
138     2 time_st_chngx fixed bin (71),
139     2 signal_ev_channel fixed binary (71),                 /* channel to signal over when get interrupt */
140     2 spaces3x (2) fixed bin;                               /* spacer */
141 
142 /* end of "net_db_dec.incl.pl1" */