-- --**************************************************************************** --* * --* 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:52:43 by OpenVMS SDL EV1-33 -- Source: 21-FEB-1995 10:13:21 $11$DUA933:[LIB_ADA.LIS]KFEDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package KFEDEF is -- module $KFEDEF -- -- KNOWN FILE ENTRY DEFINITIONS -- KFE_M_PROTECT : constant := 16#00000001#; KFE_M_LIM : constant := 16#00000002#; KFE_M_PROCPRIV : constant := 16#00000004#; KFE_M_OPEN : constant := 16#00000008#; KFE_M_HDRRES : constant := 16#00000010#; KFE_M_SHARED : constant := 16#00000020#; KFE_M_SHMIDENT : constant := 16#00000040#; KFE_M_COMPATMOD : constant := 16#00000080#; KFE_M_NOPURGE : constant := 16#00000100#; KFE_M_ACCOUNT : constant := 16#00000200#; KFE_M_WRITEABLE : constant := 16#00000400#; KFE_M_EXEONLY : constant := 16#00000800#; KFE_M_VERSION_SAFE : constant := 16#00001000#; KFE_M_KFE_NAMING : constant := 16#00002000#; KFE_K_LENGTH : constant := 55; -- Length of fixed area of KFE entry KFE_C_LENGTH : constant := 55; -- Length of fixed area of KFE entry KFE_K_MAXLEN : constant := 94; -- Max KFE length (includes max filename) KFE_C_MAXLEN : constant := 94; -- Max KFE length (includes max filename) KFE_K_NUMBER_OF_FLAGS : constant := 14; -- Number of flag bits used. type KFE_FLAGS_TYPE is -- Flags word record PROTECT : BOOLEAN; -- Known file was installed protected LIM : BOOLEAN; -- Linkable image PROCPRIV : BOOLEAN; -- Use process privilege mask OPEN : BOOLEAN; -- Image installed /OPEN HDRRES : BOOLEAN; -- Image header block is resident SHARED : BOOLEAN; -- Image is shared SHMIDENT : BOOLEAN; -- Shared memory ident already set COMPATMOD : BOOLEAN; -- Image is compatability mode NOPURGE : BOOLEAN; -- Image entry may not be purged ACCOUNT : BOOLEAN; -- Image level accounting WRITEABLE : BOOLEAN; -- Global sections are writeable EXEONLY : BOOLEAN; -- Image has only execute access allowed VERSION_SAFE : BOOLEAN; -- Image is exempt from system version checks KFE_NAMING : BOOLEAN; -- use KFE based name for global sections -- -- Add new bits before this line. This is so that we can keep the count of the number -- of flag bits used as accurate as possible. -- -- Count of flag bits used. FILLER_1 : UNSIGNED_2; end record; for KFE_FLAGS_TYPE use record PROTECT at 0 range 0 .. 0; LIM at 0 range 1 .. 1; PROCPRIV at 0 range 2 .. 2; OPEN at 0 range 3 .. 3; HDRRES at 0 range 4 .. 4; SHARED at 0 range 5 .. 5; SHMIDENT at 0 range 6 .. 6; COMPATMOD at 0 range 7 .. 7; NOPURGE at 1 range 0 .. 0; ACCOUNT at 1 range 1 .. 1; WRITEABLE at 1 range 2 .. 2; EXEONLY at 1 range 3 .. 3; VERSION_SAFE at 1 range 4 .. 4; KFE_NAMING at 1 range 5 .. 5; FILLER_1 at 1 range 6 .. 7; end record; for KFE_FLAGS_TYPE'SIZE use 16; KFE_FLAGS_TYPE_INIT : constant KFE_FLAGS_TYPE := (PROTECT => FALSE, LIM => FALSE, PROCPRIV => FALSE, OPEN => FALSE, HDRRES => FALSE, SHARED => FALSE, SHMIDENT => FALSE, COMPATMOD => FALSE, NOPURGE => FALSE, ACCOUNT => FALSE, WRITEABLE => FALSE, EXEONLY => FALSE, VERSION_SAFE => FALSE, KFE_NAMING => FALSE, FILLER_1 => 0); type KFE_WCB_TYPE is -- WCB address if open record FID : UNSIGNED_WORD; -- File id ----Component(s) below are defined as comments since they ----overlap other fields ---- ----FID_NUM : UNSIGNED_WORD; -- File number field of file id FID_SEQ : UNSIGNED_WORD; -- File sequence number field of file id end record; for KFE_WCB_TYPE use record FID at 24 range 0 .. 15; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----FID_NUM at 24 range 0 .. 15; FID_SEQ at 2 range 0 .. 15; end record; for KFE_WCB_TYPE'SIZE use 32; KFE_WCB_TYPE_INIT : constant KFE_WCB_TYPE := ( FID => 0, FID_SEQ => 0); type KFE_TYPE is record HSHLNK : UNSIGNED_LONGWORD; -- Known file Hash table link KFELINK : UNSIGNED_LONGWORD; -- Ordered Known file entry list link SIZE : UNSIGNED_WORD; -- Size of block TYP : UNSIGNED_BYTE; -- Structure type HSHIDX : UNSIGNED_BYTE; -- KFE hash table index (index into vector of HSHQ's) KFD : UNSIGNED_LONGWORD; -- Device, Directory, Type block FLAGS : KFE_FLAGS_TYPE; -- Flags word GBLSECCNT : UNSIGNED_WORD; -- Global section count if shared USECNT : UNSIGNED_LONGWORD; -- Usage counter WCB : KFE_WCB_TYPE; -- WCB address if open IMGHDR : UNSIGNED_LONGWORD; -- Image header address if resident ----Component(s) below are defined as comments since they ----overlap other fields ---- ----FID_RVN : UNSIGNED_WORD; -- Relative volume number field of file id PROCPRIV : UNSIGNED_QUADWORD; -- Process privilege mask MATCHCTL : UNSIGNED_BYTE; -- Global section match control FILLER_1 : UNSIGNED_BYTE; -- spare byte AMECOD : UNSIGNED_WORD; -- Image header code specifying AME IDENT : UNSIGNED_LONGWORD; -- Global section ident value ORB : UNSIGNED_LONGWORD; -- Address of Object Rights Block SHRCNT : UNSIGNED_WORD; -- High water mark for sharing FILNAMLEN : UNSIGNED_BYTE; -- Length of file name FILNAM : STRING(1 .. 0); -- Offset to file name end record; for KFE_TYPE use record HSHLNK at 0 range 0 .. 31; KFELINK at 4 range 0 .. 31; SIZE at 8 range 0 .. 15; TYP at 10 range 0 .. 7; HSHIDX at 11 range 0 .. 7; KFD at 12 range 0 .. 31; FLAGS at 16 range 0 .. 15; GBLSECCNT at 18 range 0 .. 15; USECNT at 20 range 0 .. 31; WCB at 24 range 0 .. 31; IMGHDR at 28 range 0 .. 31; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----FID_RVN at 28 range 0 .. 15; PROCPRIV at 32 range 0 .. 63; MATCHCTL at 40 range 0 .. 7; FILLER_1 at 41 range 0 .. 7; AMECOD at 42 range 0 .. 15; IDENT at 44 range 0 .. 31; ORB at 48 range 0 .. 31; SHRCNT at 52 range 0 .. 15; FILNAMLEN at 54 range 0 .. 7; FILNAM at 55 range 0 .. -1; end record; for KFE_TYPE'SIZE use 440; KFE_TYPE_INIT : constant KFE_TYPE := (HSHLNK => 0, KFELINK => 0, SIZE => 0, TYP => 0, HSHIDX => 0, KFD => 0, FLAGS => KFE_FLAGS_TYPE_INIT, GBLSECCNT => 0, USECNT => 0, WCB => KFE_WCB_TYPE_INIT, IMGHDR => 0, PROCPRIV => (0, 0), MATCHCTL => 0, FILLER_1 => 0, AMECOD => 0, IDENT => 0, ORB => 0, SHRCNT => 0, FILNAMLEN => 0, FILNAM => (others => ASCII.NUL)); end KFEDEF;