#ifndef __FIBDEF_LOADED
#define __FIBDEF_LOADED	1

/*** MODULE $fibdef ***/
/*----                                                                      */
/*                                                                          */
/* LAYOUT OF THE FILE IDENTIFICATION BLOCK (FIB)                            */
/*                                                                          */
/*****                                                                      */
/*                                                                          */
/*        NOTE:        If the size of the FIB is changed the following must be changed */
/*                to reflect the change:                                    */
/*                                                                          */
/*                In Module:        [RMS.SRC]RMSFWADEF.SDL                  */
/*                                                                          */
/*                Field:                FWA$T_FIBBUF                        */
/*                                                                          */
/*                Constant:        FWA$C_FIBLEN                             */
/*                                                                          */
/*                Both the field and constant must be GEQ to the size of    */
/*                the FIB, i.e. FIB$C_LENGTH. FIB length is currently 64.   */
/*                                                                          */
/*****                                                                      */
/*                                                                          */
#define FIB$M_NOWRITE 1
#define FIB$M_DLOCK 2
#define FIB$M_BLK_LOCK 4
#define FIB$M_SPOOL 16
#define FIB$M_WRITECK 32
#define FIB$M_SEQONLY 64
#define FIB$M_WRITE 256
#define FIB$M_READCK 512
#define FIB$M_NOREAD 1024
#define FIB$M_NOTRUNC 2048
#define FIB$M_CONTROL 4096
#define FIB$M_EXECUTE 65536
#define FIB$M_PRSRV_ATR 131072
#define FIB$M_RMSLOCK 262144
#define FIB$M_WRITETHRU 524288
#define FIB$M_NOLOCK 1048576
#define FIB$M_NORECORD 2097152
#define FIB$M_REWIND 8
#define FIB$M_CURPOS 16
#define FIB$M_UPDATE 64
#define FIB$K_ACCDATA 10                /* ABOVE DATA NECESSARY FOR ACCESS  */
#define FIB$C_ACCDATA 10                /* ABOVE DATA NECESSARY FOR ACCESS  */
#define FIB$K_DIRDATA 22                /* ABOVE DATA NECESSARY FOR DIRECTORY OPS  */
#define FIB$C_DIRDATA 22                /* ABOVE DATA NECESSARY FOR DIRECTORY OPS  */
#define FIB$M_ALLVER 8
#define FIB$M_ALLTYP 16
#define FIB$M_ALLNAM 32
#define FIB$M_WILD 256
#define FIB$M_NEWVER 512
#define FIB$M_SUPERSEDE 1024
#define FIB$M_FINDFID 2048
#define FIB$M_LOWVER 16384
#define FIB$M_HIGHVER 32768
#define FIB$M_ALCON 1
#define FIB$M_ALCONB 2
#define FIB$M_FILCON 4
#define FIB$M_ALDEF 8
#define FIB$M_ALLOCATR 16
#define FIB$M_EXTEND 128
#define FIB$M_TRUNC 256
#define FIB$M_NOHDREXT 512
#define FIB$M_MARKBAD 1024
#define FIB$M_NOCHARGE 32768
#define FIB$K_EXTDATA 32                /* ABOVE NECESSARY FOR BASIC FILE EXTENSION  */
#define FIB$C_EXTDATA 32                /* ABOVE NECESSARY FOR BASIC FILE EXTENSION  */
#define FIB$M_EXACT 1
#define FIB$M_ONCYL 2
#define FIB$C_CYL 1                     /* CYLINDER ADDRESS SPECIFIED       */
#define FIB$C_LBN 2                     /* LBN SPECIFIED                    */
#define FIB$C_VBN 3                     /* PROXIMATE VBN SPECIFIED          */
#define FIB$C_RFI 4                     /* RELATED FILE ID SPECIFIED        */
#define FIB$K_ALCDATA 44                /* ABOVE DATA NECESSARY FOR PLACEMENT  */
#define FIB$C_ALCDATA 44                /* ABOVE DATA NECESSARY FOR PLACEMENT  */
#define FIB$M_ALT_REQ 1
#define FIB$M_ALT_GRANTED 2
#define FIB$M_DIRACL 4
#define FIB$M_PROPAGATE 8
#define FIB$K_LENGTH 64
#define FIB$C_LENGTH 64
struct fibdef {
    union  {
        unsigned long int fib$l_acctl;  /* ACCESS CONTROL BITS              */
        struct  {
            unsigned fib$v_nowrite : 1; /* NO OTHER WRITERS                 */
            unsigned fib$v_dlock : 1;   /* ENABLE DEACCESS LOCK             */
            unsigned fib$v_blk_lock : 1; /* ENABLE RMS-11 BLOCK LOCKING     */
            unsigned fibdef$$_fill_1 : 1; /* UNUSED                         */
            unsigned fib$v_spool : 1;   /* SPOOL FILE ON CLOSE              */
            unsigned fib$v_writeck : 1; /* ENABLE WRITE CHECK               */
            unsigned fib$v_seqonly : 1; /* SEQUENTIAL ONLY ACCESS           */
            unsigned fibdef$$_fill_2 : 1; /* SPARE                          */
            unsigned fib$v_write : 1;   /* WRITE ACCESS                     */
            unsigned fib$v_readck : 1;  /* ENABLE READ CHECK                */
            unsigned fib$v_noread : 1;  /* NO OTHER READERS                 */
            unsigned fib$v_notrunc : 1; /* FILE MAY NOT BE TRUNCATED        */
            unsigned fib$v_control : 1; /* CONTROL ACCESS TO FILE           */
            unsigned fibdef$$_fill_3 : 3; /* SPARE                          */
/* THE HIGH 8 BITS CANNOT BE COPIED                                         */
/* INTO THE ACCESS MODE WORD IN THE WINDOW                                  */
            unsigned fib$v_execute : 1; /* ACCESS FOR EXECUTE (USE EXECUTE PROTECTION)  */
            unsigned fib$v_prsrv_atr : 1; /* PRESERVE ORIGINAL ATTRIBUTES OF FILE  */
            unsigned fib$v_rmslock : 1; /* OPEN WITH RMS RECORD LOCKING     */
            unsigned fib$v_writethru : 1; /* FORCE CACHE WRITE-THROUGH ON OPERATION  */
            unsigned fib$v_nolock : 1;  /* OVERRIDE ACCESS INTERLOCKS       */
            unsigned fib$v_norecord : 1; /* DO NOT RECORD FILE ACCESS       */
            unsigned fibdef$$_fill_4 : 2; /* SPARE                          */
            } fib$r_acctl_bits0;
        struct  {
            unsigned fibdef$$_fill_5 : 3;
            unsigned fib$v_rewind : 1;  /* REWIND TAPE                      */
            unsigned fib$v_curpos : 1;  /* CREATE AT CURRENT TAPE POSITION  */
            unsigned fibdef$$_fill_6 : 1;
            unsigned fib$v_update : 1;  /* UPDATE MODE (POSITION TO START OF FILE)  */
            unsigned fib$v_fill_1 : 1;
            } fib$r_acctl_bits1;
        struct  {
            char fibdef$$_fill_13 [3];
            char fib$b_wsize;           /* WINDOW SIZE                      */
            } fib$r_acctl_fields2;
        } fib$r_acctl_overlay;
    union  {
        unsigned short int fib$w_fid [3]; /* FILE ID                        */
        struct  {
            unsigned short int fib$w_fid_num; /* FILE NUMBER                */
            unsigned short int fib$w_fid_seq; /* FILE SEQUENCE NUMBER       */
            union  {
                unsigned short int fib$w_fid_rvn; /* RELATIVE VOLUME NUMBER  */
                struct  {
                    unsigned char fib$b_fid_rvn; /* SHORT FORM RVN          */
                    unsigned char fib$b_fid_nmx; /* EXTENDED FILE NUMBER    */
                    } fib$r_fid_rvn_fields;
                } fib$r_fid_rvn_overlay;
            } fib$r_fid_fields;
        } fib$r_fid_overlay;
    union  {
        unsigned short int fib$w_did [3]; /* DIRECTORY ID                   */
        struct  {
            unsigned short int fib$w_did_num; /* FILE NUMBER                */
            unsigned short int fib$w_did_seq; /* FILE SEQUENCE NUMBER       */
            union  {
                unsigned short int fib$w_did_rvn; /* RELATIVE VOLUME NUMBER  */
                struct  {
                    unsigned char fib$b_did_rvn; /* SHORT FORM RVN          */
                    unsigned char fib$b_did_nmx; /* EXTENDED FILE NUMBER    */
                    } fib$r_did_rvn_fields;
                } fib$r_did_rvn_overlay;
            } fib$r_did_fields;
        } fib$r_did_overlay;
    unsigned long int fib$l_wcc;        /* WILD CARD CONTEXT                */
    union  {
        unsigned short int fib$w_nmctl; /* NAME CONTROL BITS                */
        struct  {
            unsigned fibdef$$_fill_7 : 3;
            unsigned fib$v_allver : 1;  /* MATCH ALL VERSIONS               */
            unsigned fib$v_alltyp : 1;  /* MATCH ALL TYPES                  */
            unsigned fib$v_allnam : 1;  /* MATCH ALL NAMES                  */
            unsigned fibdef$$_fill_8 : 2;
            unsigned fib$v_wild : 1;    /* WILD CARDS IN FILE NAME          */
            unsigned fib$v_newver : 1;  /* MAXIMIZE VERSION NUMBER          */
            unsigned fib$v_supersede : 1; /* SUPERSEDE EXISTING FILE        */
            unsigned fib$v_findfid : 1; /* SEARCH FOR FILE ID               */
            unsigned fibdef$$_fill_9 : 2;
            unsigned fib$v_lowver : 1;  /* LOWER VERSION OF FILE EXISTS     */
            unsigned fib$v_highver : 1; /* HIGHER VERSION OF FILE EXISTS    */
            } fib$r_nmctl_bits;
        } fib$r_nmctl_overlay;
    union  {
        unsigned short int fib$w_exctl; /* EXTEND CONTROL                   */
        struct  {
            unsigned fib$v_alcon : 1;   /* ALLOCATE CONTIGUOUS              */
            unsigned fib$v_alconb : 1;  /* CONTIGUOUS BEST EFFORT           */
            unsigned fib$v_filcon : 1;  /* MARK FILE CONTIGUOUS             */
            unsigned fib$v_aldef : 1;   /* ALLOCATE DEFAULT AMOUNT          */
            unsigned fib$v_allocatr : 1; /* PLACEMENT DATA PRESENT IN ATTRIBUTE LIST  */
            unsigned fibdef$$_fill_10 : 2;
            unsigned fib$v_extend : 1;  /* ENABLE EXTENSION                 */
            unsigned fib$v_trunc : 1;   /* ENABLE TRUNCATION                */
            unsigned fib$v_nohdrext : 1; /* INHIBIT EXTENSION HEADERS       */
            unsigned fib$v_markbad : 1; /* MARK BLOCKS BAD                  */
            unsigned fibdef$$_fill_11 : 4;
            unsigned fib$v_nocharge : 1; /* DON'T CHARGE DISKQUOTA          */
            } fib$r_exctl_bits;
        } fib$r_exctl_overlay;
    unsigned long int fib$l_exsz;       /* EXTEND SIZE                      */
    unsigned long int fib$l_exvbn;      /* EXTENSION VBN                    */
    union  {
        unsigned char fib$b_alopts;     /* ALLOCATION OPTIONS               */
        struct  {
            unsigned fib$v_exact : 1;   /* EXACT PLACEMENT REQUIRED         */
            unsigned fib$v_oncyl : 1;   /* PUT ALLOCATION ON ONE CYLINDER   */
            unsigned fib$v_fill_2 : 6;
            } fib$r_alopts_bits;
        } fib$r_alopts_overlay;
    unsigned char fib$b_alalign;        /* ALLOCATION ALIGNMENT             */
    union  {
        unsigned short int fib$w_alloc [5]; /* ALLOCATION LOCATION          */
        struct  {
            union  {
                unsigned short int fib$w_loc_fid [3]; /* RELATED FILE ID    */
                struct  {
                    unsigned short int fib$w_loc_num; /* RELATED FILE NUMBER  */
                    unsigned short int fib$w_loc_seq; /* FILE SEQUENCE NUMBER  */
                    union  {
                        unsigned short int fib$w_loc_rvn; /* RELATED RVN    */
                        struct  {
                            unsigned char fib$b_loc_rvn; /* SHORT FORM RVN  */
                            unsigned char fib$b_loc_nmx; /* EXTENDED FILE NUMBER  */
                            } fib$r_loc_rvn_fields;
                        } fib$r_loc_rvn_overlay;
                    } fib$r_loc_fid_fields;
                } fib$r_loc_fid_overlay;
            unsigned long int fib$l_loc_addr; /* LOCATION ADDRESS (VBN, LBN, CYL)  */
            } fib$r_alloc_fields;
        } fib$r_alloc_overlay;
    unsigned short int fib$w_verlimit;  /* DIRECTORY ENTRY VERSION LIMIT    */
    unsigned char fib$b_agent_mode;     /* AGENTS ACCESS MODE               */
    unsigned char fib$b_ru_facility;    /* RECOVERABLE-FACILITY CODE        */
    unsigned long int fib$l_aclctx;     /* ACL CONTEXT FOR READ             */
    unsigned long int fib$l_acl_status; /* RETURN STATUS FROM ACL OPERATION */
    union  {
        unsigned long int fib$l_status; /* GENERAL STATUS LONGWORD          */
        struct  {
            unsigned fib$v_alt_req : 1; /* ALTERNATE ACCESS REQUIRED        */
            unsigned fib$v_alt_granted : 1; /* ALTERNATE ACCESS GRANTED     */
            unsigned fib$v_diracl : 1;  /* DO DIRECTORY ACL PROPAGATION     */
            unsigned fib$v_propagate : 1; /* DO PROPAGATION ON ENTER        */
            unsigned fib$v_fill_3 : 4;
            } fib$r_status_bits;
        } fib$r_status_overlay;
    unsigned long int fib$l_alt_access; /* ALTERNATE ACCESS MASK            */
    } ;
#define FIB$C_REWINDVOL 1               /* REWIND VOLUME SET                */
#define FIB$C_POSEND 2                  /* POSITION TO END OF VOLUME SET    */
#define FIB$C_NEXTVOL 3                 /* FORCE NEXT VOLUME                */
#define FIB$C_SPACE 4                   /* SPACE MAGNETIC TAPE              */
#define FIB$C_ILLEGAL 5                 /*                                  */
#define FIB$C_REWINDFIL 6               /* REWIND FILE                      */
#define FIB$C_LOCK_VOL 7                /* LOCK VOLUME AGAINST ALLOCATION   */
#define FIB$C_UNLK_VOL 8                /* UNLOCK VOLUME                    */
/* QUOTA FILE OPERATIONS                                                    */
#define FIB$C_ENA_QUOTA 9               /* ENABLE QUOTA FILE                */
#define FIB$C_DSA_QUOTA 10              /* DISABLE QUOTA FILE               */
#define FIB$C_ADD_QUOTA 11              /* ADD QUOTA FILE ENTRY             */
#define FIB$C_EXA_QUOTA 12              /* EXAMINE QUOTA FILE ENTRY         */
#define FIB$C_MOD_QUOTA 13              /* MODIFY QUOTA FILE ENTRY          */
#define FIB$C_REM_QUOTA 14              /* REMOVE QUOTA FILE ENTRY          */
#define FIB$C_USEREOT 15                /* ENABLE USER END OF TAPE HANDLING  */
#define FIB$C_REMAP 16                  /* REMAP FILE WINDOW                */
#define FIB$C_CLSEREXCP 17              /* ALLOW THE USER TO CLEAR A SERIOUS EXCP FROM A TAPE DRIVE */
#define FIB$C_FLUSH_CACHE 18            /* FLUSH SELECTED CACHE             */
#define FIB$C_FORCE_MV 19               /* FORCE MOUNT VERIFICATION TO OCCUR */
#define FIB$K_MTALEN 28                 /* LENGTH OF MTAACP DATA            */
#define FIB$C_MTALEN 28                 /* LENGTH OF MTAACP DATA            */
/*                                                                          */
#define FIB$C_FID_CACHE 1
#define FIB$C_EXTENT_CACHE 2
#define FIB$C_QUOTA_CACHE 3
/*                                                                          */
#define FIB$M_ALL_MEM 1
#define FIB$M_ALL_GRP 2
#define FIB$M_MOD_USE 4
#define FIB$M_MOD_PERM 8
#define FIB$M_MOD_OVER 16
struct fibdef1 {
    char fibdef$$_fill_14 [22];
    unsigned short int fib$w_cntrlfunc; /* ACP CONTROL FUNCTION             */
/* DEFINE ACP CONTROL FUNCTION CODES                                        */
/*                                                                          */
    union  {
        unsigned long int fib$l_cntrlval; /* ACP CONTROL FUNCTION VALUE PARAMETER  */
/* CACHE IDENTIFIER CODES FOR FLUSH_CACHE                                   */
/*                                                                          */
/* CONTROL BITS FOR QUOTA FILE OPERATIONS                                   */
/*                                                                          */
        struct  {
            unsigned fib$v_all_mem : 1; /* MATCH ALL MEMBER NUMBERS         */
            unsigned fib$v_all_grp : 1; /* MATCH ALL GROUP NUMBERS          */
            unsigned fib$v_mod_use : 1; /* MODIFY USAGE DATA                */
            unsigned fib$v_mod_perm : 1; /* MODIFY PERMANENT QUOTA          */
            unsigned fib$v_mod_over : 1; /* MODIFY OVERDRAFT LIMIT          */
            unsigned fib$v_fill_4 : 3;
            } fib$r_cntrlval_bits;
        } fib$r_cntrlval_overlay;
    } ;
 

#endif					/* __FIBDEF_LOADED */
