-- --**************************************************************************** --* * --* Copyright (c) 2001 * --* by DIGITAL Equipment Corporation, Maynard, Mass. * --* * --* This software is furnished under a license and may be used and copied * --* only in accordance with the terms of such license and with the * --* inclusion of the above copyright notice. This software or any other * --* copies thereof may not be provided or otherwise made available to any * --* other person. No title to and ownership of the software is hereby * --* transferred. * --* * --* The information in this software is subject to change without notice * --* and should not be construed as a commitment by DIGITAL Equipment * --* Corporation. * --* * --* DIGITAL assumes no responsibility for the use or reliability of its * --* software on equipment which is not supplied by DIGITAL. * --* * --**************************************************************************** --******************************************************************************************************************** -- Created: 15-MAR-2001 22:50:46 by OpenVMS SDL EV1-33 -- Source: 17-FEB-2000 17:00:15 $11$DUA933:[LIB_ADA.LIS]CSBDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package CSBDEF is -- module $CSBDEF --+ -- CSB - CLUSTER SYSTEM BLOCK. -- -- THERE IS ONE CSB FOR EACH SYSTEM IN THE CLUSTER. --- CSB_K_OPEN : constant := 1; -- OPEN CSB_K_STATUS : constant := 2; -- SENDING/WAITING FOR STATUS CSB_K_RECONNECT : constant := 3; -- ATTEMPTING TO RECONNECT CSB_K_NEW : constant := 4; -- BRAND NEW BLOCK CSB_K_CONNECT : constant := 5; -- ATTEMPTING INITIAL CONNECTION CSB_K_ACCEPT : constant := 6; -- ACCEPTING INITIAL CONNECTION CSB_K_DISCONNECT : constant := 7; -- DISCONNECT IN PROGRESS CSB_K_REACCEPT : constant := 8; -- ACCEPTING RECONNECT REQUEST CSB_K_WAIT : constant := 9; -- TIME-OUT IN PROGRESS CSB_K_DEAD : constant := 10; -- NO CONNECTION POSSIBLE CSB_K_LOCAL : constant := 11; -- LOCAL SYSTEM CSB CSB_M_LONG_BREAK : constant := 16#00000001#; CSB_M_MEMBER : constant := 16#00000002#; CSB_M_REMOVED : constant := 16#00000004#; CSB_M_QF_SAME : constant := 16#00000008#; CSB_M_QF_WATCHER : constant := 16#00000010#; CSB_M_QF_NOACCESS : constant := 16#00000020#; CSB_M_CLUSTER : constant := 16#00000100#; CSB_M_QF_ACTIVE : constant := 16#00000200#; CSB_M_SHUTDOWN : constant := 16#00000400#; CSB_M_GONE : constant := 16#00000800#; CSB_M_LOCKED : constant := 16#00010000#; CSB_M_SELECTED : constant := 16#00020000#; CSB_M_VCC : constant := 16#00040000#; CSB_M_SEND_EXT_STATUS : constant := 16#00080000#; CSB_M_LOCAL : constant := 16#01000000#; CSB_M_STATUS_RCVD : constant := 16#02000000#; CSB_M_SEND_STATUS : constant := 16#04000000#; CSB_M_QF_RFRSH_RQD : constant := 16#08000000#; CSB_M_QF_RFRSH_IP : constant := 16#10000000#; CSB_M_QF_IOSYNCH : constant := 16#20000000#; CSB_M_ACT_LSHARE : constant := 16#40000000#; CSB_M_PASS_LSHARE : constant := 16#80000000#; CSB_M_CAP_VCC : constant := 16#00000002#; CSB_M_CAP_EXT_STATUS : constant := 16#00000008#; CSB_M_CAP_CWCREPRC : constant := 16#00000010#; CSB_M_CAP_THREADS : constant := 16#00000020#; CSB_M_CAP_CWLOGICALS : constant := 16#00000040#; CSB_M_CAP_IPC_DEMULT_CONN : constant := 16#00000080#; CSB_M_CAP_WBM_SHADOW : constant := 16#00000200#; CSB_M_CAP_WBM_ALL : constant := 16#00000400#; CSB_M_CAP_SCHED_CLASS : constant := 16#00000800#; CSB_C_LENGTH : constant := 280; -- LENGTH OF CSB CSB_K_LENGTH : constant := 280; -- LENGTH OF CSB type CSB_CSID_TYPE is -- Cluster System ID record CSID_IDX : UNSIGNED_WORD; -- Slot index CSID_SEQ : UNSIGNED_WORD; -- Sequence number end record; for CSB_CSID_TYPE use record CSID_IDX at 0 range 0 .. 15; CSID_SEQ at 2 range 0 .. 15; end record; for CSB_CSID_TYPE'SIZE use 32; CSB_CSID_TYPE_INIT : constant CSB_CSID_TYPE := (CSID_IDX => 0, CSID_SEQ => 0); type CSB_STATUS_TYPE is -- STATUS OF NODE IN CLUSTER record -- THE FOLLOWING BITS ARE ALWAYS MEANINGFUL -- BYTE 0 LONG_BREAK : BOOLEAN; -- LONG BREAK IN CONNECTION MEMBER : BOOLEAN; -- NODE IS MEMBER OF LOCAL CLUSTER REMOVED : BOOLEAN; -- NODE REMOVED FROM CLUSTER QF_SAME : BOOLEAN; -- REMOTE QUORUM DISK MATCHES LOCAL DISK QF_WATCHER : BOOLEAN; -- REMOTE NODE IS WATCHING A QUORUM FILE QF_NOACCESS : BOOLEAN; -- NODE WILL NEVER ACCESS QUORUM DISK FILLER_1 : UNSIGNED_2; -- PAD TO BYTE -- BYTE 1 CLUSTER : BOOLEAN; -- REMOTE NODE IS CLUSTER MEMBER QF_ACTIVE : BOOLEAN; -- REMOTE NODE'S QUORUM FILE IS READABLE SHUTDOWN : BOOLEAN; -- REMOTE NODE READY FOR CLUSTER SHUTDOWN GONE : BOOLEAN; -- KNOWN TO HAVE SHUTDOWN FILLER_2 : UNSIGNED_4; -- PAD TO BYTE -- THE FOLLOWING BITS ARE MEANINGFUL IF THIS NODE IS THE COORDINATOR -- BYTE 2 LOCKED : BOOLEAN; -- NODE LOCKED BY COORDINATOR SELECTED : BOOLEAN; -- NODE SELECTED BY COORDINATOR VCC : BOOLEAN; -- supports VCC SEND_EXT_STATUS : BOOLEAN; -- NEED TO SEND EXTENDED STATUS FILLER_3 : UNSIGNED_4; -- PAD TO BYTE BOUNDARY -- THE FOLLOWING BITS ARE OF LOCAL SIGNIFICANCE ONLY -- BYTE 3 LOCAL : BOOLEAN; -- MARK CSB FOR LOCAL SYSTEM STATUS_RCVD : BOOLEAN; -- STATUS RECEIVED FROM REMOTE SYSTEM SEND_STATUS : BOOLEAN; -- NEED TO SEND STATUS TO REMOTE SYSTEM QF_RFRSH_RQD : BOOLEAN; -- NEED QUORUM FILE REFRESH QF_RFRSH_IP : BOOLEAN; -- QF REFRESH IN PROGRESS QF_IOSYNCH : BOOLEAN; -- QF IO SYNCH DONE ACT_LSHARE : BOOLEAN; -- ACTIVE SIDE TO LOAD SHARING PASS_LSHARE : BOOLEAN; -- PASSIVE SIDE TO LOAD SHARING end record; for CSB_STATUS_TYPE use record LONG_BREAK at 0 range 0 .. 0; MEMBER at 0 range 1 .. 1; REMOVED at 0 range 2 .. 2; QF_SAME at 0 range 3 .. 3; QF_WATCHER at 0 range 4 .. 4; QF_NOACCESS at 0 range 5 .. 5; FILLER_1 at 0 range 6 .. 7; CLUSTER at 1 range 0 .. 0; QF_ACTIVE at 1 range 1 .. 1; SHUTDOWN at 1 range 2 .. 2; GONE at 1 range 3 .. 3; FILLER_2 at 1 range 4 .. 7; LOCKED at 2 range 0 .. 0; SELECTED at 2 range 1 .. 1; VCC at 2 range 2 .. 2; SEND_EXT_STATUS at 2 range 3 .. 3; FILLER_3 at 2 range 4 .. 7; LOCAL at 3 range 0 .. 0; STATUS_RCVD at 3 range 1 .. 1; SEND_STATUS at 3 range 2 .. 2; QF_RFRSH_RQD at 3 range 3 .. 3; QF_RFRSH_IP at 3 range 4 .. 4; QF_IOSYNCH at 3 range 5 .. 5; ACT_LSHARE at 3 range 6 .. 6; PASS_LSHARE at 3 range 7 .. 7; end record; for CSB_STATUS_TYPE'SIZE use 32; CSB_STATUS_TYPE_INIT : constant CSB_STATUS_TYPE := (LONG_BREAK => FALSE, MEMBER => FALSE, REMOVED => FALSE, QF_SAME => FALSE, QF_WATCHER => FALSE, QF_NOACCESS => FALSE, FILLER_1 => 0, CLUSTER => FALSE, QF_ACTIVE => FALSE, SHUTDOWN => FALSE, GONE => FALSE, FILLER_2 => 0, LOCKED => FALSE, SELECTED => FALSE, VCC => FALSE, SEND_EXT_STATUS => FALSE, FILLER_3 => 0, LOCAL => FALSE, STATUS_RCVD => FALSE, SEND_STATUS => FALSE, QF_RFRSH_RQD => FALSE, QF_RFRSH_IP => FALSE, QF_IOSYNCH => FALSE, ACT_LSHARE => FALSE, PASS_LSHARE => FALSE); type CSB_CAPABILITY_TYPE is -- Node capabilities record FILLER_1 : BOOLEAN; -- PAD CAP_VCC : BOOLEAN; -- Used on Alpha only FILLER_2 : BOOLEAN; -- PAD CAP_EXT_STATUS : BOOLEAN; -- Extended status message CAP_CWCREPRC : BOOLEAN; -- Clusterwide $CREPRC support CAP_THREADS : BOOLEAN; -- Used on Alpha only CAP_CWLOGICALS : BOOLEAN; -- Clusterwide logical names enabled CAP_IPC_DEMULT_CONN : BOOLEAN; -- IPC supports de-multiplexed connections FILLER_3 : BOOLEAN; -- PAD CAP_WBM_SHADOW : BOOLEAN; -- Supports Write BitMap for shadow member copy operations CAP_WBM_ALL : BOOLEAN; -- Supports Write BitMap for all disks CAP_SCHED_CLASS : BOOLEAN; -- Supports class scheduling via class scheduler database file FILLER_4 : UNSIGNED_20; end record; for CSB_CAPABILITY_TYPE use record FILLER_1 at 0 range 0 .. 0; CAP_VCC at 0 range 1 .. 1; FILLER_2 at 0 range 2 .. 2; CAP_EXT_STATUS at 0 range 3 .. 3; CAP_CWCREPRC at 0 range 4 .. 4; CAP_THREADS at 0 range 5 .. 5; CAP_CWLOGICALS at 0 range 6 .. 6; CAP_IPC_DEMULT_CONN at 0 range 7 .. 7; FILLER_3 at 1 range 0 .. 0; CAP_WBM_SHADOW at 1 range 1 .. 1; CAP_WBM_ALL at 1 range 2 .. 2; CAP_SCHED_CLASS at 1 range 3 .. 3; FILLER_4 at 1 range 4 .. 23; end record; for CSB_CAPABILITY_TYPE'SIZE use 32; CSB_CAPABILITY_TYPE_INIT : constant CSB_CAPABILITY_TYPE := (FILLER_1 => FALSE, CAP_VCC => FALSE, FILLER_2 => FALSE, CAP_EXT_STATUS => FALSE, CAP_CWCREPRC => FALSE, CAP_THREADS => FALSE, CAP_CWLOGICALS => FALSE, CAP_IPC_DEMULT_CONN => FALSE, FILLER_3 => FALSE, CAP_WBM_SHADOW => FALSE, CAP_WBM_ALL => FALSE, CAP_SCHED_CLASS => FALSE, FILLER_4 => 0); type CSB_TYPE is record SYSQFL : UNSIGNED_LONGWORD; -- SYSTEM QUEUE FORWARD LINK SYSQBL : UNSIGNED_LONGWORD; -- SYSTEM QUEUE BACKWARD LINK SIZE : UNSIGNED_WORD; -- SIZE OF CSB IN BYTES TYP : UNSIGNED_BYTE; -- STRUCTURE TYPE SUBTYP : UNSIGNED_BYTE; -- STRUCTURE SUBTYPE CDT : UNSIGNED_LONGWORD; -- CDT ADDRESS PDT : UNSIGNED_LONGWORD; -- PDT ADDRESS SENTQFL : UNSIGNED_LONGWORD; -- SENT LIST HEAD LINK SENTQBL : UNSIGNED_LONGWORD; -- SENT LIST TAIL LINK RESENDQFL : UNSIGNED_LONGWORD; -- RESEND LIST HEAD LINK RESENDQBL : UNSIGNED_LONGWORD; -- RESEND LIST TAIL LINK WARMCDRPQFL : UNSIGNED_LONGWORD; -- WARM CDRP QUEUE FORWARD LINK WARMCDRPQBL : UNSIGNED_LONGWORD; -- WARM CDRP QUEUE BACKWARD LINK SENDSEQNM : UNSIGNED_WORD; -- NEXT SEQUENCE NUMBER TO SEND RCVDSEQNM : UNSIGNED_WORD; -- LAST SEQUENCE NUMBER RECEIVED ACKRSEQNM : UNSIGNED_WORD; -- LAST ACK RECEIVED SEQ. NUM. UNACKEDMSGS : UNSIGNED_BYTE; -- NUMBER OF UNACKED MESSAGES REMACKLIM : UNSIGNED_BYTE; -- REMOTE SIDE'S ACK LIMIT CURRCDRP : UNSIGNED_LONGWORD; -- ADDRESS OF CDRP IN CRITICAL SECTION SWINCARN : UNSIGNED_QUADWORD; -- REMOTE SOFTWARE INCARN. NUM. ECOLVL : UNSIGNED_BYTE; -- PROTOCOL ECO LEVEL VERNUM : UNSIGNED_BYTE; -- PROTOCOL VERSION NUMBER WARMCDRPS : UNSIGNED_BYTE; -- NUMBER OF CDRPS ON FREE QUEUE STATE : UNSIGNED_BYTE; -- STATE OF CONNECTION -- STATE VALUES: TQE : UNSIGNED_LONGWORD; -- ADDRESS OF TIMER QUEUE ENTRY TIMEOUT : UNSIGNED_LONGWORD; -- TIME TO GIVE UP RECONNECTING CSID : CSB_CSID_TYPE; -- Cluster System ID VOTES : UNSIGNED_WORD; -- VOTES HELD BY NODE QUORUM : UNSIGNED_WORD; -- QUORUM SET IN NODE LCKDIRWT : UNSIGNED_WORD; -- LOCK MANAGER DISTRIBUTED DIRECTORY WEIGHT QDVOTES : UNSIGNED_WORD; -- VOTES ASSIGNED TO QUORUM DISK PARTNERQFL : UNSIGNED_LONGWORD; -- LISTHEAD FWD PTR FOR BLOCK-XFER PARTNER BTXs PARTNERQBL : UNSIGNED_LONGWORD; -- LISTHEAD BACK PTR FOR BLOCK-XFER PARTNER BTXs STATUS : CSB_STATUS_TYPE; -- STATUS OF NODE IN CLUSTER CLUB : UNSIGNED_LONGWORD; -- ADDRESS OF CLUB SB : UNSIGNED_LONGWORD; -- ADDRESS OF SB FOR REMOTE SYSTEM REF_CNT : UNSIGNED_BYTE; -- REFERENCE COUNT CLUVER : UNSIGNED_BYTE; -- CLUSTER VERSION NUMBER NODES : UNSIGNED_WORD; -- Number of nodes in remote cluster CNX_STS_R0 : UNSIGNED_WORD; -- CONNECTION REQUEST R0 STATUS CNX_STS_R1 : UNSIGNED_WORD; -- CONNECTION REQUEST R1 STATUS REFTIME : UNSIGNED_QUADWORD; -- CREATION/ADDITION/REMOVAL TIME RMAX_VCTMO : UNSIGNED_LONGWORD; -- MAX REMOTE VC TIMEOUT INTERVAL LASTSENT : UNSIGNED_WORD; -- SEQ. NUM. OF MESSAGE LAST SENT EVOTES : UNSIGNED_WORD; -- REMOTE NODE'S EXPECTED VOTES CNCT : INTEGER_8_ARRAY (1 .. 16); -- CONNECT/ACCEPT DATA AREA NODEMAP : INTEGER_8_ARRAY (1 .. 32); -- BITMAP OF NODE CONNECTIVITY CNID : UNSIGNED_WORD; -- CLUSTER NODE ID PASS_CNTR : UNSIGNED_WORD; -- Total Passive loadshare ops ACT_CNTR : UNSIGNED_WORD; -- Total Active loadshare ops ERR_CNTR : UNSIGNED_WORD; -- Total Errors on connection CAPABILITY : CSB_CAPABILITY_TYPE; -- Node capabilities HWNAME : INTEGER_8_ARRAY (1 .. 61); -- SYSTEM NAME FILLER_1 : UNSIGNED_BYTE_ARRAY (1 .. 3); -- Padding ABSTIM_OFFSET : INTEGER_32; -- Offset to obtain nodes ABSTIM CACHE_PROTOCOL_VER : UNSIGNED_LONGWORD; -- Cache protocol version SW_VERSION : STRING(1 .. 8); -- Software Version LNM_SEQNUM : UNSIGNED_QUADWORD; -- CW Logicals SEQNUM end record; for CSB_TYPE use record SYSQFL at 0 range 0 .. 31; SYSQBL at 4 range 0 .. 31; SIZE at 8 range 0 .. 15; TYP at 10 range 0 .. 7; SUBTYP at 11 range 0 .. 7; CDT at 12 range 0 .. 31; PDT at 16 range 0 .. 31; SENTQFL at 20 range 0 .. 31; SENTQBL at 24 range 0 .. 31; RESENDQFL at 28 range 0 .. 31; RESENDQBL at 32 range 0 .. 31; WARMCDRPQFL at 36 range 0 .. 31; WARMCDRPQBL at 40 range 0 .. 31; SENDSEQNM at 44 range 0 .. 15; RCVDSEQNM at 46 range 0 .. 15; ACKRSEQNM at 48 range 0 .. 15; UNACKEDMSGS at 50 range 0 .. 7; REMACKLIM at 51 range 0 .. 7; CURRCDRP at 52 range 0 .. 31; SWINCARN at 56 range 0 .. 63; ECOLVL at 64 range 0 .. 7; VERNUM at 65 range 0 .. 7; WARMCDRPS at 66 range 0 .. 7; STATE at 67 range 0 .. 7; TQE at 68 range 0 .. 31; TIMEOUT at 72 range 0 .. 31; CSID at 76 range 0 .. 31; VOTES at 80 range 0 .. 15; QUORUM at 82 range 0 .. 15; LCKDIRWT at 84 range 0 .. 15; QDVOTES at 86 range 0 .. 15; PARTNERQFL at 88 range 0 .. 31; PARTNERQBL at 92 range 0 .. 31; STATUS at 96 range 0 .. 31; CLUB at 100 range 0 .. 31; SB at 104 range 0 .. 31; REF_CNT at 108 range 0 .. 7; CLUVER at 109 range 0 .. 7; NODES at 110 range 0 .. 15; CNX_STS_R0 at 112 range 0 .. 15; CNX_STS_R1 at 114 range 0 .. 15; REFTIME at 116 range 0 .. 63; RMAX_VCTMO at 124 range 0 .. 31; LASTSENT at 128 range 0 .. 15; EVOTES at 130 range 0 .. 15; CNCT at 132 range 0 .. 127; NODEMAP at 148 range 0 .. 255; CNID at 180 range 0 .. 15; PASS_CNTR at 182 range 0 .. 15; ACT_CNTR at 184 range 0 .. 15; ERR_CNTR at 186 range 0 .. 15; CAPABILITY at 188 range 0 .. 31; HWNAME at 192 range 0 .. 487; FILLER_1 at 253 range 0 .. 23; ABSTIM_OFFSET at 256 range 0 .. 31; CACHE_PROTOCOL_VER at 260 range 0 .. 31; SW_VERSION at 264 range 0 .. 63; LNM_SEQNUM at 272 range 0 .. 63; end record; for CSB_TYPE'SIZE use 2240; CSB_TYPE_INIT : constant CSB_TYPE := (SYSQFL => 0, SYSQBL => 0, SIZE => 0, TYP => 0, SUBTYP => 0, CDT => 0, PDT => 0, SENTQFL => 0, SENTQBL => 0, RESENDQFL => 0, RESENDQBL => 0, WARMCDRPQFL => 0, WARMCDRPQBL => 0, SENDSEQNM => 0, RCVDSEQNM => 0, ACKRSEQNM => 0, UNACKEDMSGS => 0, REMACKLIM => 0, CURRCDRP => 0, SWINCARN => (0, 0), ECOLVL => 0, VERNUM => 0, WARMCDRPS => 0, STATE => 0, TQE => 0, TIMEOUT => 0, CSID => CSB_CSID_TYPE_INIT, VOTES => 0, QUORUM => 0, LCKDIRWT => 0, QDVOTES => 0, PARTNERQFL => 0, PARTNERQBL => 0, STATUS => CSB_STATUS_TYPE_INIT, CLUB => 0, SB => 0, REF_CNT => 0, CLUVER => 0, NODES => 0, CNX_STS_R0 => 0, CNX_STS_R1 => 0, REFTIME => (0, 0), RMAX_VCTMO => 0, LASTSENT => 0, EVOTES => 0, CNCT => (others => 0), NODEMAP => (others => 0), CNID => 0, PASS_CNTR => 0, ACT_CNTR => 0, ERR_CNTR => 0, CAPABILITY => CSB_CAPABILITY_TYPE_INIT HWNAME => (others => 0), FILLER_1 => (others => 0), ABSTIM_OFFSET => 0, CACHE_PROTOCOL_VER => 0, SW_VERSION => (others => ASCII.NUL), LNM_SEQNUM => (0, 0)); end CSBDEF;