/**/ /***************************************************************************/ /** **/ /** © Copyright 2010, Hewlett-Packard Development Company, L.P. **/ /** **/ /** Confidential computer software. Valid license from HP and/or **/ /** its subsidiaries required for possession, use, or copying. **/ /** **/ /** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, **/ /** Computer Software Documentation, and Technical Data for Commercial **/ /** Items are licensed to the U.S. Government under vendor's standard **/ /** commercial license. **/ /** **/ /** Neither HP nor any of its subsidiaries shall be liable for technical **/ /** or editorial errors or omissions contained herein. The information **/ /** in this document is provided "as is" without warranty of any kind and **/ /** is subject to change without notice. The warranties for HP products **/ /** are set forth in the express limited warranty statements accompanying **/ /** such products. Nothing herein should be construed as constituting an **/ /** additional warranty. **/ /** **/ /***************************************************************************/ /********************************************************************************************************************************/ /* Created: 30-Mar-2010 17:25:18 by OpenVMS SDL EV3-3 */ /* Source: 16-MAR-2004 10:05:21 $1$DGA7274:[LIB_H.SRC]FCBDEF.SDL;1 */ /********************************************************************************************************************************/ /*** MODULE $FCBDEF ***/ #ifndef __FCBDEF_LOADED #define __FCBDEF_LOADED 1 #pragma __nostandard /* This file uses non-ANSI-Standard features */ #pragma __member_alignment __save #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __save /* Save the previously-defined required ptr size */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif #ifdef __cplusplus extern "C" { #define __unknown_params ... #define __optional_params ... #else #define __unknown_params #define __optional_params ... #endif #ifndef __struct #if !defined(__VAXC) #define __struct struct #else #define __struct variant_struct #endif #endif #ifndef __union #if !defined(__VAXC) #define __union union #else #define __union variant_union #endif #endif /*+ */ /* FCB - FILE CONTROL BLOCK */ /* */ /* THERE IS ONE FILE CONTROL BLOCK FOR EACH UNIQUELY ACCESSED FILE ON A */ /* VOLUME. THE FILE CONTROL BLOCK PROVIDES THE VEHICLE WHEREBY SHARED */ /* ACCESS TO A FILE MAY BE CONTROLLED. */ /* Note LBN and volume size related fields have been promoted to quadwords. */ /* ODS-II/V will never support volumes larger than 1TB; the promotions are */ /* in anticipation of a new file system that will use the FCB in common. */ /*- */ #define FCB$M_FILE_ATTRIBUTES 0xF #define FCB$M_FILE_CONTENTS 0xF0 #define FCB$M_FLUSH_ON_CLOSE 0xF00 #define FCB$M_CACHING_OPTIONS_MBZ 0xFFFFF000 #define FCB$C_DEFAULT 0 /* Use default caching policy */ #define FCB$C_WRITETHROUGH 1 /* Use writethrough caching */ #define FCB$C_WRITEBEHIND 2 /* Use writebehind caching */ #define FCB$C_NOCACHING 3 /* Do not cache file */ #define FCB$C_FLUSH 1 /* Flush file from cache when file closed */ #define FCB$C_NOFLUSH 2 /* Retain file in cache when file closed */ #define FCB$M_VCC_STATE 0x7 #define FCB$K_LENGTH 376 /* LENGTH OF STANDARD FCB */ #define FCB$C_LENGTH 376 /* LENGTH OF STANDARD FCB */ #define FCB$S_FCBDEF 376 /* Old size name - synonym */ #ifdef __cplusplus /* Define structure prototypes */ struct _orb; struct _wcb; struct _ocb; #endif /* #ifdef __cplusplus */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif typedef struct _fcb { #pragma __nomember_alignment struct _fcb *fcb$l_fcbfl; /* FCB LIST FORWARD LINK */ struct _fcb *fcb$l_fcbbl; /* FCB LIST BACKWARD LINK */ unsigned short int fcb$w_size; /* SIZE OF FCB IN BYTES */ unsigned char fcb$b_type; /* STRUCTURE TYPE OF FCB */ unsigned char fcb$b_acclkmode; /* Access lock mode. */ void *fcb$l_exfcb; /* ADDRESS OF EXTENSION FCB */ struct _fcb *fcb$l_primfcb; /* Pointer to Primary FCB if */ /* this is an extension FCB */ /* else zero */ struct _orb *fcb$l_orb; /* Address of file ORB */ struct _wcb *fcb$l_wlfl; /* WINDOW LISTHEAD FORWARD LINK */ struct _wcb *fcb$l_wlbl; /* WINDOW LISTHEAD BACKWARD LINK */ unsigned int fcb$l_refcnt; /* Total references to this FCB. */ unsigned int fcb$l_acnt; /* FILE ACCESS COUNT */ unsigned int fcb$l_wcnt; /* FILE WRITER COUNT */ unsigned int fcb$l_lcnt; /* FILE LOCK COUNT */ unsigned int fcb$l_tcnt; /* COUNT OF TRUNCATE LOCKS */ __union { unsigned int fcb$l_status; /* FILE STATUS */ __struct { unsigned fcb$v_dir : 1; /* FCB IS A DIRECTORY LRU ENTRY */ unsigned fcb$v_markdel : 1; /* FILE IS MARKED FOR DELETE */ unsigned fcb$v_badblk : 1; /* BAD BLOCK ENCOUNTERED IN FILE */ unsigned fcb$v_excl : 1; /* FILE IS EXCLUSIVELY ACCESSED */ unsigned fcb$v_spool : 1; /* FILE IS AN INTERMEDIATE SPOOL FILE */ unsigned fcb$v_rmslock : 1; /* FILE IS OPEN WITH RMS RECORD LOCKING */ unsigned fcb$v_erase : 1; /* ERASE DATA WHEN BLOCKS REMOVED FROM FILE */ unsigned fcb$v_badacl : 1; /* ACL IS CORRUPT */ unsigned fcb$v_stale : 1; /* Reconstruct FCB from header. */ unsigned fcb$v_delaytrnc : 1; /* Delay truncation. */ unsigned fcb$v_limbo : 1; /* FCB is linked into the LIMBO queue */ unsigned fcb$v_isdir : 1; /* This FCB is a directory FCB */ unsigned fcb$v_nomove : 1; /* This file is NOT to be MOVEFILE'ed */ unsigned fcb$v_shelved : 1; /* This file is shelved */ unsigned fcb$v_noshelvable : 1; /* This file is NOT to be SHELVED'ed */ unsigned fcb$v_preshelved : 1; /* This file has been shelved, but */ /* the data has not been erased from disk */ } fcb$r_status_bits; } fcb$r_status_overlay; unsigned __int64 fcb$q_opentime; /* Creation time of FCB */ unsigned int fcb$l_reads; /* Total count of read I/Os */ unsigned int fcb$l_writes; /* Total count of write I/Os */ unsigned int fcb$l_split_io; /* Total count of split I/Os */ unsigned int fcb$l_assist_io; /* Total count of file system assisted I/Os */ __union { unsigned short int fcb$w_fid [3]; /* FILE IDENTIFICATION */ __struct { unsigned short int fcb$w_fid_num; /* FILE NUMBER */ unsigned short int fcb$w_fid_seq; /* FILE SEQUENCE NUMBER */ __union { unsigned short int fcb$w_fid_rvn; /* RELATIVE VOLUME NUMBER */ __struct { unsigned char fcb$b_fid_rvn; /* SHORT FORM RVN */ unsigned char fcb$b_fid_nmx; /* EXTENDED FILE NUMBER */ } fcb$r_fid_rvn_fields; } fcb$r_fid_rvn_overlay; } fcb$r_fid_fields; __struct { /* File ID fields for ISO 9660 */ unsigned short int fcb$w_fid_dirnum; /* Directory number of File-Id */ unsigned int fcb$l_fid_recnum; /* Record number of File-ID */ } fcb$r_fid_iso_9660_fields; } fcb$r_fid_overlay; unsigned short int fcb$w_segn; /* FILE SEGMENT NUMBER */ __union { /* STARTING VIRTUAL BLOCK NUMBER */ unsigned int fcb$l_stvbn; unsigned __int64 fcb$q_stvbn; } fcb$r_stvbn_overlay; __union { /* STARTING LOGICAL BLOCK NUMBER */ unsigned int fcb$l_stlbn; unsigned __int64 fcb$q_stlbn; } fcb$r_stlbn_overlay; __union { /* LBN OF FILE HEADER */ unsigned int fcb$l_hdlbn; unsigned __int64 fcb$q_hdlbn; } fcb$r_hdlbn_overlay; __union { /* FILE SIZE IN BLOCKS */ unsigned int fcb$l_filesize; unsigned __int64 fcb$q_filesize; } fcb$r_filesize_overlay; __union { /* END OF FILE VBN */ unsigned int fcb$l_efblk; unsigned __int64 fcb$q_efblk; } fcb$r_efblk_overlay; unsigned int fcb$l_versions; /* MAXIMUM NUMBER OF VERSIONS IN DIRECTORY */ unsigned int fcb$l_dirseq; /* DIRECTORY USE SEQUENCE NUMBER */ unsigned int fcb$l_dirindx; /* Directory index pointer */ unsigned int fcb$l_acclkid; /* Access lock ID. */ unsigned int fcb$l_lockbasis; /* Lock basis for this FCB. */ __union { /* (mutually exclusive usage) */ unsigned int fcb$l_truncvbn; /* VBN for delayed truncation. (Files-11 B) */ unsigned int fcb$l_numextents; /* Number of extents recorded (Files-11 C/D) */ } fcb$r_fcb1_overlay; unsigned int fcb$l_cachelkid; /* Cache interlock lock ID */ unsigned int fcb$l_dirlckid; /* Support for directory cache invalidation */ __union { /* HIGH WATER MARK IN FILE */ unsigned int fcb$l_highwater; unsigned __int64 fcb$q_highwater; } fcb$r_highwater_overlay; __union { /* Highwater mark of pending writes */ unsigned int fcb$l_newhighwater; unsigned __int64 fcb$q_newhighwater; } fcb$r_newhighwater_overlay; unsigned int fcb$l_hwm_update; /* Count of writes past highwater mark */ unsigned int fcb$l_hwm_erase; /* Count of writes starting past highwater mark */ unsigned int fcb$l_hwm_partial; /* Count of partially validated erase operations */ unsigned int fcb$l_revision; /* File revision */ __union { __struct { /* High water mark queue header */ void *fcb$l_hwm_waitfl; /* Highwater mark update queue */ void *fcb$l_hwm_waitbl; /* Highwater mark update queue */ } fcb$q_hwmqhd; __struct { /* LIMBO queue header */ void *fcb$l_limbofl; /* Highwater mark update queue */ void *fcb$l_limbobl; /* Highwater mark update queue */ } fcb$q_limboqhd; } fcb$r_queue_overlay; /* */ /* NOTA BENE: */ /* */ /* The following is an embedded ORB. This structure should only be referenced */ /* through the FCB$L_ORB pointer (using ORB$ field names). The existing (FCB) */ /* fields are left for source code and binary compatibility in privileged */ /* software that thinks it knows what an FCB and its ORB look like. */ /* */ /* Third-party developers would be well advised to remove all references to */ /* these FCB symbols as soon as possible. You have been warned! */ /* */ __struct { /* Object's Rights Block */ __union { unsigned int fcb$l_fileowner; /* FILE OWNER UIC */ __struct { unsigned short int fcb$w_uicmember; /* MEMBER NUMBER */ unsigned short int fcb$w_uicgroup; /* GROUP NUMBER */ } fcb$r_fill_1_; } fcb$r_fill_0_; unsigned int fcb$l_fill_5; /* ACL mutex */ unsigned int fcb$l_fill_3; /* Structure size & type */ unsigned int fcb$l_fill_6; /* Spare + ref count */ unsigned __int64 fcb$q_acmode; /* Access mode protection vector */ __union { unsigned int fcb$l_sys_prot; /* Protection word/vector */ __struct { unsigned short int fcb$w_fileprot; /* FILE PROTECTION MASK */ unsigned short int fcb$w_fill_4; } fcb$r_fill_3_; } fcb$r_fill_2_; unsigned int fcb$l_own_prot; /* Owner protection */ unsigned int fcb$l_grp_prot; /* Group protection */ unsigned int fcb$l_wor_prot; /* World protection */ void *fcb$l_aclfl; /* ACCESS CONTROL LIST FORWARD LINK */ void *fcb$l_aclbl; /* ACCESS CONTROL LIST BACKWARD LINK */ __struct { /* Minimum security classification mask */ char fcb$b_fill_1 [20]; /* see structure $CLSDEF */ } fcb$r_min_class_prot; __struct { /* Maximum security classification mask */ char fcb$b_fill_2 [20]; /* see structure $CLSDEF */ } fcb$r_max_class_prot; unsigned short int fcb$w_name_length; short int fcb$w_fill_7; void *fcb$l_name_pointer; struct _ocb *fcb$l_ocb; struct _orb *fcb$l_template_orb; unsigned int fcb$l_object_specific; struct _orb *fcb$l_original_orb; unsigned int fcb$l_updseq; void *fcb$l_mutex_address; /* Address of mutex for CHKPRO */ unsigned int fcb$l_reserve1; } fcb$r_orb; unsigned int fcb$l_reserve2; /* Pad to quadword */ __int64 fcb$q_orb_reserved; /* Reserved for ORB expansion */ /* */ /* End of embedded ORB */ /* */ /* */ /* Define fields and constant values for FCB$L_CACHING_OPTIONS */ /* longword. These must match [STARLET]FIBDEF.SDL exactly. */ /* */ __union { unsigned int fcb$l_caching_options; __struct { unsigned fcb$v_file_attributes : 4; /* File attributes caching field */ unsigned fcb$v_file_contents : 4; /* File contents caching field */ unsigned fcb$v_flush_on_close : 4; /* Flush file on close field */ unsigned fcb$v_caching_options_mbz : 20; /* Must be zero */ } fcb$r_caching_options_bits; } fcb$r_caching_options_overlay; __union { unsigned int fcb$l_status2; /* Additional file status */ __struct { unsigned fcb$v_vcc_state : 3; /* Replicated caching attribute (see FH2DEF) */ unsigned fcb$v_fill_4_ : 5; } fcb$r_status2_bits; } fcb$r_status2_overlay; unsigned __int64 fcb$q_cfb; void *fcb$l_cfcb; /* VBN Cache pointer */ int fcb$l_fill_8; /* Pad to quadword */ unsigned __int64 fcb$q_accdate; /* access date */ unsigned __int64 fcb$q_moddate; /* modification date */ } FCB; #if !defined(__VAXC) #define fcb$l_status fcb$r_status_overlay.fcb$l_status #define fcb$v_dir fcb$r_status_overlay.fcb$r_status_bits.fcb$v_dir #define fcb$v_markdel fcb$r_status_overlay.fcb$r_status_bits.fcb$v_markdel #define fcb$v_badblk fcb$r_status_overlay.fcb$r_status_bits.fcb$v_badblk #define fcb$v_excl fcb$r_status_overlay.fcb$r_status_bits.fcb$v_excl #define fcb$v_spool fcb$r_status_overlay.fcb$r_status_bits.fcb$v_spool #define fcb$v_rmslock fcb$r_status_overlay.fcb$r_status_bits.fcb$v_rmslock #define fcb$v_erase fcb$r_status_overlay.fcb$r_status_bits.fcb$v_erase #define fcb$v_badacl fcb$r_status_overlay.fcb$r_status_bits.fcb$v_badacl #define fcb$v_stale fcb$r_status_overlay.fcb$r_status_bits.fcb$v_stale #define fcb$v_delaytrnc fcb$r_status_overlay.fcb$r_status_bits.fcb$v_delaytrnc #define fcb$v_limbo fcb$r_status_overlay.fcb$r_status_bits.fcb$v_limbo #define fcb$v_isdir fcb$r_status_overlay.fcb$r_status_bits.fcb$v_isdir #define fcb$v_nomove fcb$r_status_overlay.fcb$r_status_bits.fcb$v_nomove #define fcb$v_shelved fcb$r_status_overlay.fcb$r_status_bits.fcb$v_shelved #define fcb$v_noshelvable fcb$r_status_overlay.fcb$r_status_bits.fcb$v_noshelvable #define fcb$v_preshelved fcb$r_status_overlay.fcb$r_status_bits.fcb$v_preshelved #define fcb$w_fid fcb$r_fid_overlay.fcb$w_fid #define fcb$w_fid_num fcb$r_fid_overlay.fcb$r_fid_fields.fcb$w_fid_num #define fcb$w_fid_seq fcb$r_fid_overlay.fcb$r_fid_fields.fcb$w_fid_seq #define fcb$w_fid_rvn fcb$r_fid_overlay.fcb$r_fid_fields.fcb$r_fid_rvn_overlay.fcb$w_fid_rvn #define fcb$b_fid_rvn fcb$r_fid_overlay.fcb$r_fid_fields.fcb$r_fid_rvn_overlay.fcb$r_fid_rvn_fields.fcb$b_fid_rvn #define fcb$b_fid_nmx fcb$r_fid_overlay.fcb$r_fid_fields.fcb$r_fid_rvn_overlay.fcb$r_fid_rvn_fields.fcb$b_fid_nmx #define fcb$w_fid_dirnum fcb$r_fid_overlay.fcb$r_fid_iso_9660_fields.fcb$w_fid_dirnum #define fcb$l_fid_recnum fcb$r_fid_overlay.fcb$r_fid_iso_9660_fields.fcb$l_fid_recnum #define fcb$l_stvbn fcb$r_stvbn_overlay.fcb$l_stvbn #define fcb$q_stvbn fcb$r_stvbn_overlay.fcb$q_stvbn #define fcb$l_stlbn fcb$r_stlbn_overlay.fcb$l_stlbn #define fcb$q_stlbn fcb$r_stlbn_overlay.fcb$q_stlbn #define fcb$l_hdlbn fcb$r_hdlbn_overlay.fcb$l_hdlbn #define fcb$q_hdlbn fcb$r_hdlbn_overlay.fcb$q_hdlbn #define fcb$l_filesize fcb$r_filesize_overlay.fcb$l_filesize #define fcb$q_filesize fcb$r_filesize_overlay.fcb$q_filesize #define fcb$l_efblk fcb$r_efblk_overlay.fcb$l_efblk #define fcb$q_efblk fcb$r_efblk_overlay.fcb$q_efblk #define fcb$l_truncvbn fcb$r_fcb1_overlay.fcb$l_truncvbn #define fcb$l_numextents fcb$r_fcb1_overlay.fcb$l_numextents #define fcb$l_highwater fcb$r_highwater_overlay.fcb$l_highwater #define fcb$q_highwater fcb$r_highwater_overlay.fcb$q_highwater #define fcb$l_newhighwater fcb$r_newhighwater_overlay.fcb$l_newhighwater #define fcb$q_newhighwater fcb$r_newhighwater_overlay.fcb$q_newhighwater #define fcb$q_hwmqhd fcb$r_queue_overlay.fcb$q_hwmqhd #define fcb$l_hwm_waitfl fcb$q_hwmqhd.fcb$l_hwm_waitfl #define fcb$l_hwm_waitbl fcb$q_hwmqhd.fcb$l_hwm_waitbl #define fcb$q_limboqhd fcb$r_queue_overlay.fcb$q_limboqhd #define fcb$l_limbofl fcb$q_limboqhd.fcb$l_limbofl #define fcb$l_limbobl fcb$q_limboqhd.fcb$l_limbobl #define fcb$l_fileowner fcb$r_orb.fcb$r_fill_0_.fcb$l_fileowner #define fcb$w_uicmember fcb$r_orb.fcb$r_fill_0_.fcb$r_fill_1_.fcb$w_uicmember #define fcb$w_uicgroup fcb$r_orb.fcb$r_fill_0_.fcb$r_fill_1_.fcb$w_uicgroup #define fcb$q_acmode fcb$r_orb.fcb$q_acmode #define fcb$l_sys_prot fcb$r_orb.fcb$r_fill_2_.fcb$l_sys_prot #define fcb$w_fileprot fcb$r_orb.fcb$r_fill_2_.fcb$r_fill_3_.fcb$w_fileprot #define fcb$l_own_prot fcb$r_orb.fcb$l_own_prot #define fcb$l_grp_prot fcb$r_orb.fcb$l_grp_prot #define fcb$l_wor_prot fcb$r_orb.fcb$l_wor_prot #define fcb$l_aclfl fcb$r_orb.fcb$l_aclfl #define fcb$l_aclbl fcb$r_orb.fcb$l_aclbl #define fcb$r_min_class_prot fcb$r_orb.fcb$r_min_class_prot #define fcb$r_max_class_prot fcb$r_orb.fcb$r_max_class_prot #define fcb$l_caching_options fcb$r_caching_options_overlay.fcb$l_caching_options #define fcb$v_file_attributes fcb$r_caching_options_overlay.fcb$r_caching_options_bits.fcb$v_file_attributes #define fcb$v_file_contents fcb$r_caching_options_overlay.fcb$r_caching_options_bits.fcb$v_file_contents #define fcb$v_flush_on_close fcb$r_caching_options_overlay.fcb$r_caching_options_bits.fcb$v_flush_on_close #define fcb$v_caching_options_mbz fcb$r_caching_options_overlay.fcb$r_caching_options_bits.fcb$v_caching_options_mbz #define fcb$l_status2 fcb$r_status2_overlay.fcb$l_status2 #define fcb$v_vcc_state fcb$r_status2_overlay.fcb$r_status2_bits.fcb$v_vcc_state #endif /* #if !defined(__VAXC) */ #pragma __member_alignment __restore #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __restore /* Restore the previously-defined required ptr size */ #endif #ifdef __cplusplus } #endif #pragma __standard #endif /* __FCBDEF_LOADED */