--******************************************************************************************************************** -- Created: 9-Mar-2021 22:28:28 by OpenVMS SDL EV3-3 -- Source: 16-JUN-2005 13:08:25 $1$DGA8085:[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_KFE_NAMING : constant := 16#00000040#; KFE_M_COMPRESS : 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_DISCONTIGUOUS : constant := 16#00001000#; KFE_M_DELETE_PEND : constant := 16#00002000#; KFE_M_VERSION_SAFE : constant := 16#00004000#; KFE_M_DATA_RESIDENT : constant := 16#00008000#; KFE_M_AUTHPRIV : constant := 16#00000001#; KFE_M_ARB_SUPPORT : constant := 16#00000002#; KFE_M_GLX_WRITE : constant := 16#00000004#; KFE_M_GLX_IDENT : constant := 16#00000008#; KFE_M_ELF : constant := 16#00000010#; KFE_M_SHARE_ADDR : constant := 16#00000020#; KFE_M_RSRVD_6_31 : constant := 16#FFFFFFC0#; KFE_K_LENGTH : constant := 120; -- Length of fixed area of KFE entry KFE_C_LENGTH : constant := 120; -- Length of fixed area of KFE entry -- Count of flags used KFE_K_NUMBER_OF_FLAGS : constant := 22; -- Number of flag bits used. KFE_S_KFEDEF : constant := 120; -- Old size name - synonym 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 KFE_NAMING : BOOLEAN; -- use KFE based name for global sections COMPRESS : BOOLEAN; -- Image sections are compressed 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 DISCONTIGUOUS : BOOLEAN; -- Image has resident sections DELETE_PEND : BOOLEAN; -- Delete pending on KFE VERSION_SAFE : BOOLEAN; -- Image is exempt from system version checks DATA_RESIDENT : BOOLEAN; -- Image has resident read-only data sections 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; KFE_NAMING at 0 range 6 .. 6; COMPRESS 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; DISCONTIGUOUS at 1 range 4 .. 4; DELETE_PEND at 1 range 5 .. 5; VERSION_SAFE at 1 range 6 .. 6; DATA_RESIDENT at 1 range 7 .. 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, KFE_NAMING => FALSE, COMPRESS => FALSE, NOPURGE => FALSE, ACCOUNT => FALSE, WRITEABLE => FALSE, EXEONLY => FALSE, DISCONTIGUOUS => FALSE, DELETE_PEND => FALSE, VERSION_SAFE => FALSE, DATA_RESIDENT => FALSE); 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_FLAGS2_TYPE is -- Overflow Flags longword record AUTHPRIV : BOOLEAN; -- Authorized privs used ARB_SUPPORT : BOOLEAN; -- An arb_support value was specified GLX_WRITE : BOOLEAN; -- installed /write=galaxy GLX_IDENT : BOOLEAN; -- installed /write=galaxy=ident ELF : BOOLEAN; -- image is ELF format (IA64) SHARE_ADDR : BOOLEAN; -- installed /share=address_data RSRVD_6_31 : UNSIGNED_26; -- The unused bits end record; for KFE_FLAGS2_TYPE use record AUTHPRIV at 0 range 0 .. 0; ARB_SUPPORT at 0 range 1 .. 1; GLX_WRITE at 0 range 2 .. 2; GLX_IDENT at 0 range 3 .. 3; ELF at 0 range 4 .. 4; SHARE_ADDR at 0 range 5 .. 5; RSRVD_6_31 at 0 range 6 .. 31; end record; for KFE_FLAGS2_TYPE'SIZE use 32; KFE_FLAGS2_TYPE_INIT : constant KFE_FLAGS2_TYPE := (AUTHPRIV => FALSE, ARB_SUPPORT => FALSE, GLX_WRITE => FALSE, GLX_IDENT => FALSE, ELF => FALSE, SHARE_ADDR => FALSE, RSRVD_6_31 => 0); type KFE_TYPE is record HSHLNK : ADDRESS; -- Known file Hash table link KFELINK : ADDRESS; -- 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 : ADDRESS; -- 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 : ADDRESS; -- Image header address if resident ----Component(s) below are defined as comments since they ----overlap other fields ---- ----LDRIMG : ADDRESS; -- Pointer to IMGHDR (if ELF format) ----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 : ADDRESS; -- Address of Object Rights Block SHRCNT : UNSIGNED_WORD; -- High water mark for sharing MAXSHRISD : UNSIGNED_WORD; -- Highest ISD number for which a global section exists KFERES_PTR : ADDRESS; -- Pointer to resident section description REF_COUNT : UNSIGNED_LONGWORD; -- Reference count PRIV_ISD_CNT : UNSIGNED_LONGWORD; -- Private, non-stack ISDs IMAGE_SIZE : UNSIGNED_LONGWORD; -- Size in bytes of installed image (if image header is opened) -- FILNAMLEN and FILNAM are now obsolete. Do not use them. Use IMAGENAME OBSOLETE_1 : UNSIGNED_LONGWORD; -- Shifted Off the Layout IMAGENAME_OFFSET : UNSIGNED_LONGWORD; -- Offset to Counted String of file (image) name FLAGS2 : KFE_FLAGS2_TYPE; -- Overflow Flags longword AUTHRIGHTS : ADDRESS; -- Image authorized rights RIGHTS : ADDRESS; -- Image active rights (initial) ARB_SUPPORT : UNSIGNED_LONGWORD; -- ARB support compatibility flag AUTHPRIV : UNSIGNED_QUADWORD; -- Image authorized privileges RISIG_OFFSET : UNSIGNED_LONGWORD; -- Offset to referenced image signiture FILVER : UNSIGNED_WORD; -- file version number, used for INSTALL LIST FILLER_2 : UNSIGNED_WORD; -- spare word FILE_ID : UNSIGNED_QUADWORD; -- FID (even if the file is installed OPEN) 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 ---- ----LDRIMG at 28 range 0 .. 31; ----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; MAXSHRISD at 54 range 0 .. 15; KFERES_PTR at 56 range 0 .. 31; REF_COUNT at 60 range 0 .. 31; PRIV_ISD_CNT at 64 range 0 .. 31; IMAGE_SIZE at 68 range 0 .. 31; OBSOLETE_1 at 72 range 0 .. 31; IMAGENAME_OFFSET at 76 range 0 .. 31; FLAGS2 at 80 range 0 .. 31; AUTHRIGHTS at 84 range 0 .. 31; RIGHTS at 88 range 0 .. 31; ARB_SUPPORT at 92 range 0 .. 31; AUTHPRIV at 96 range 0 .. 63; RISIG_OFFSET at 104 range 0 .. 31; FILVER at 108 range 0 .. 15; FILLER_2 at 110 range 0 .. 15; FILE_ID at 112 range 0 .. 63; end record; for KFE_TYPE'SIZE use 960; KFE_TYPE_INIT : constant KFE_TYPE := (HSHLNK => ADDRESS_ZERO, KFELINK => ADDRESS_ZERO, SIZE => 0, TYP => 0, HSHIDX => 0, KFD => ADDRESS_ZERO, FLAGS => KFE_FLAGS_TYPE_INIT, GBLSECCNT => 0, USECNT => 0, WCB => KFE_WCB_TYPE_INIT, IMGHDR => ADDRESS_ZERO, PROCPRIV => (0, 0), MATCHCTL => 0, FILLER_1 => 0, AMECOD => 0, IDENT => 0, ORB => ADDRESS_ZERO, SHRCNT => 0, MAXSHRISD => 0, KFERES_PTR => ADDRESS_ZERO, REF_COUNT => 0, PRIV_ISD_CNT => 0, IMAGE_SIZE => 0, OBSOLETE_1 => 0, IMAGENAME_OFFSET => 0, FLAGS2 => KFE_FLAGS2_TYPE_INIT, AUTHRIGHTS => ADDRESS_ZERO, RIGHTS => ADDRESS_ZERO, ARB_SUPPORT => 0, AUTHPRIV => (0, 0), RISIG_OFFSET => 0, FILVER => 0, FILLER_2 => 0, FILE_ID => (0, 0)); end KFEDEF;