/* <mntdef.h>
 *
 *	Flag bits for the $MOUNT system service.
 */
#ifndef _MNTDEF_H
#define _MNTDEF_H

#define MNT$V_FOREIGN	0
#define MNT$V_GROUP	1
#define MNT$V_NOASSIST	2
#define MNT$V_NODISKQ	3
#define MNT$V_NOHDR3	4
#define MNT$V_NOLABEL	5
#define MNT$V_NOWRITE	6
#define MNT$V_OVR_ACCESS 7
#define MNT$V_OVR_EXP	8
#define MNT$V_OVR_IDENT 9
#define MNT$V_OVR_SETID 10
#define MNT$V_READCHECK 11
#define MNT$V_SHARE	12
#define MNT$V_MESSAGE	13
#define MNT$V_SYSTEM	14
#define MNT$V_WRITECHECK 1
#define MNT$V_WRITETHRU 16
#define MNT$V_NOCACHE	17
#define MNT$V_OVR_LOCK	18
#define MNT$V_NOMNTVER	19
#define MNT$V_NOUNLOAD	20
#define MNT$V_TAPE_DATA_WRITE 21
#define MNT$V_NOCOPY	22
#define MNT$V_NOAUTO	23
#define MNT$V_INIT_ALL	24
#define MNT$V_INIT_CONT 25
#define MNT$V_OVR_VOLO	26
#define MNT$V_INTERCHG	27
#define MNT$V_CLUSTER	28
#define MNT$V_NOREBUILD 29
#define MNT$V_OVR_SHAMEM 30
#define MNT$V_MULTI_VOL 31
#define MNT$M_FOREIGN	(1<<MNT$V_FOREIGN)	/* 0x01 */
#define MNT$M_GROUP	(1<<MNT$V_GROUP)	/* 0x02 */
#define MNT$M_NOASSIST	(1<<MNT$V_NOASSIST)	/* 0x04 */
#define MNT$M_NODISKQ	(1<<MNT$V_NODISKQ)	/* 0x08 */
#define MNT$M_NOHDR3	(1<<MNT$V_NOHDR3)	/* 0x10 */
#define MNT$M_NOLABEL	(1<<MNT$V_NOLABEL)	/* 0x20 */
#define MNT$M_NOWRITE	(1<<MNT$V_NOWRITE)	/* 0x40 */
#define MNT$M_OVR_ACCESS (1<<MNT$V_OVR_ACCESS)	/* 0x80 */
#define MNT$M_OVR_EXP	(1<<MNT$V_OVR_EXP)	/* 0x0100 */
#define MNT$M_OVR_IDENT (1<<MNT$V_OVR_IDENT)	/* 0x0200 */
#define MNT$M_OVR_SETID (1<<MNT$V_OVR_SETID)	/* 0x0400 */
#define MNT$M_READCHECK (1<<MNT$V_READCHECK)	/* 0x0800 */
#define MNT$M_SHARE	(1<<MNT$V_SHARE)	/* 0x1000 */
#define MNT$M_MESSAGE	(1<<MNT$V_MESSAGE)	/* 0x2000 */
#define MNT$M_SYSTEM	(1<<MNT$V_SYSTEM)	/* 0x4000 */
#define MNT$M_WRITECHECK (1<<MNT$V_WRITECHECK)	/* 0x8000 */
#define MNT$M_WRITETHRU (1<<MNT$V_WRITETHRU)	/* 0x010000 */
#define MNT$M_NOCACHE	(1<<MNT$V_NOCACHE)	/* 0x020000 */
#define MNT$M_OVR_LOCK	(1<<MNT$V_OVR_LOCK)	/* 0x040000 */
#define MNT$M_NOMNTVER	(1<<MNT$V_NOMNTVER)	/* 0x080000 */
#define MNT$M_NOUNLOAD	(1<<MNT$V_NOUNLOAD)	/* 0x100000 */
#define MNT$M_TAPE_DATA_WRITE (1<<MNT$V_TAPE_DATA_WRITE) /* 0x200000 */
#define MNT$M_NOCOPY	(1<<MNT$V_NOCOPY)	/* 0x400000 */
#define MNT$M_NOAUTO	(1<<MNT$V_NOAUTO)	/* 0x800000 */
#define MNT$M_INIT_ALL	(1<<MNT$V_INIT_ALL)	/* 0x01000000 */
#define MNT$M_INIT_CONT (1<<MNT$V_INIT_CONT)	/* 0x02000000 */
#define MNT$M_OVR_VOLO	(1<<MNT$V_OVR_VOLO)	/* 0x04000000 */
#define MNT$M_INTERCHG	(1<<MNT$V_INTERCHG)	/* 0x08000000 */
#define MNT$M_CLUSTER	(1<<MNT$V_CLUSTER)	/* 0x10000000 */
#define MNT$M_NOREBUILD (1<<MNT$V_NOREBUILD)	/* 0x20000000 */
#define MNT$M_OVR_SHAMEM (1<<MNT$V_OVR_SHAMEM)	/* 0x40000000 */
#define MNT$M_MULTI_VOL (1<<MNT$V_MULTI_VOL)	/* 0x80000000 */

#define MNT$V_DISKQ	32
#define MNT$V_COMPACTION 33
#define MNT$V_INCLUDE	34
#define MNT$V_PASS2	35
#define MNT$V_OVR_NOFE	36
#define MNT$V_SCRATCH	37
#define MNT2$V_DISKQ	0
#define MNT2$V_COMPACTION 1
#define MNT2$V_INCLUDE	2
#define MNT2$V_PASS2	3
#define MNT2$V_OVR_NOFE 4
#define MNT2$V_SCRATCH	5
#ifndef NO_VMS_V6
#define MNT2$V_CDROM	6
#define MNT2$V_XAR	7
#define MNT2$V_DSI	8
#define MNT2$V_SUBSYSTEM 9
#define MNT2$V_NOCOMPACTION 10
#define MNT2$V_OVR_SECURITY 11
#define MNT2$V_OVR_LIMITED_SEARCH 12
#endif
#define MNT2$M_DISKQ	(1<<MNT2$V_DISKQ)	/* 0x01 */
#define MNT2$M_COMPACTION (1<<MNT2$V_COMPACTION) /* 0x02 */
#define MNT2$M_INCLUDE	(1<<MNT2$V_INCLUDE)	/* 0x04 */
#define MNT2$M_PASS2	(1<<MNT2$V_PASS2)	/* 0x08 */
#define MNT2$M_OVR_NOFE (1<<MNT2$V_OVR_NOFE)	/* 0x10 */
#define MNT2$M_SCRATCH	(1<<MNT2$V_SCRATCH)	/* 0x20 */
#ifndef NO_VMS_V6
#define MNT2$M_CDROM		(1<<MNT2$V_CDROM)		/* 0x0040 */
#define MNT2$M_XAR		(1<<MNT2$V_XAR)			/* 0x0080 */
#define MNT2$M_DSI		(1<<MNT2$V_DSI)			/* 0x0100 */
#define MNT2$M_SUBSYSTEM	(1<<MNT2$V_SUBSYSTEM)		/* 0x0200 */
#define MNT2$M_NOCOMPACTION	(1<<MNT2$V_NOCOMPACTION)	/* 0x0400 */
#define MNT2$M_OVR_SECURITY	(1<<MNT2$V_OVR_SECURITY)	/* 0x0800 */
#define MNT2$M_OVR_LIMITED_SEARCH (1<<MNT2$V_OVR_LIMITED_SEARCH) /* 0x1000 */
#endif

/* item codes for mount parameters. */
#define MNT$_DEVNAM	1	/* device name */
#define MNT$_VOLNAM	2	/* volume name */
#define MNT$_LOGNAM	3	/* logical name */
#define MNT$_FLAGS	4	/* mount flags */
#define MNT$_ACCESSED	5	/* accessed value */
#define MNT$_PROCESSOR	6	/* processor name */
#define MNT$_VOLSET	7	/* volume set name */
#define MNT$_BLOCKSIZE	8	/* blocksize value */
#define MNT$_DENSITY	9	/* tape density value */
#define MNT$_EXTENT	10	/* number of extent cache entries */
#define MNT$_FILEID	11	/* file id cache size */
#define MNT$_LIMIT	12	/* extent cache limit */
#define MNT$_OWNER	13	/* volume owner UIC */
#define MNT$_VPROT	14	/* volume protection */
#define MNT$_QUOTA	15	/* quota cache size */
#define MNT$_RECORDSIZ	16	/* record size value */
#define MNT$_WINDOW	17	/* number of windows */
#define MNT$_EXTENSION	18	/* default file extension */
#define MNT$_VISUAL_ID	19	/* visual identification */
#define MNT$_COMMENT	20	/* user comment */
#ifndef NO_VMS_V6
#define MNT$_CLASS	21	/* security classfication */
#endif
#ifndef ONLY_VMS_V6
#define MNT$_UNUSED1	21	/* spare (was used for now obsolete journaling-related items) */
#endif
#define MNT$_UNUSED2	22	/*   "  */
#define MNT$_UNUSED3	23	/*   "  */
#define MNT$_SHACOPY_BUF	24	/* shadow copy buffer */
#define MNT$_SHANAM		25	/* shadow set virtual unit name */
#define MNT$_SHAMEM		26	/* shadow set member unit name */
#define MNT$_SHAMEM_MGCOPY	27	/* shadow set member unit name (merge copy) */
#define MNT$_SHAMEM_COPY	28	/* shadow set member unit name (full copy) */
#define MNT$_PRFD_PATH		29	/* preferred DSA path */
#define MNT$_ASSIGNMENT_UNIT	30	/* assignment unit (MME) */
#define MNT$_CART_MEDIA_NAME	31	/* cartridge Media Name (MME) */
#define MNT$_CARTRIDGE_NAME	32	/* cartridge Name (MME) */
#define MNT$_CARTRIDGE_SIDE	33	/* cartridge Side (MME) */
#define MNT$_COLLECTION		34	/* collection name (MME) */
#define MNT$_DEVICE_TYPE	35	/* device Selection criteria (MME) */
#define MNT$_DISPOSITION	36	/* dismount Disposition (MME) */
#define MNT$_LOCATION		37	/* cartridge Location (MME) */
#define MNT$_MEDIA_NAME		38	/* media Name (MME) */
#ifndef NO_VMS_V6
#define MNT$_UNUSED4		39	/* spare */
#define MNT$_UNDEFINED_FAT	40	/* undefined file attributes */
#define MNT$_UCS		41	/* universal character set string */
#define MNT$_TAPE_EXPIRATION	42	/* date tape expires (MME) */
#endif
#define MNT$C_BASE_CARTRIDGE	1	/* assign a whole cartridge */
#define MNT$C_COMPOUND_CARTRIDGE 2	/* assign a magazine */
#define MNT$C_PREASSIGNED_SIDE	3	/* assign a pre-assigned cartridge side */
#define MNT$C_SIDE		4	/* assign a single cartridge side */
#define MNT$C_KEEP		1	/* keep the media assigned */
#define MNT$C_RELEASE		2	/* release the media */
union mntdef {
    struct {
	unsigned mnt$v_foreign	 : 1;	/* foreign option selected */
	unsigned mnt$v_group	 : 1;	/* group option selected */
	unsigned mnt$v_noassist  : 1;	/* noassist option selected */
	unsigned mnt$v_nodiskq	 : 1;	/* nodiskq option selected */
	unsigned mnt$v_nohdr3	 : 1;	/* nohdr3 option selected */
	unsigned mnt$v_nolabel	 : 1;	/* nolabel option selected */
	unsigned mnt$v_nowrite	 : 1;	/* nowrite option selected */
	unsigned mnt$v_ovr_access: 1;	/* override accessiblity option selected */
	unsigned mnt$v_ovr_exp	 : 1;	/* override expiraton option selected */
	unsigned mnt$v_ovr_ident : 1;	/* override volume label */
	unsigned mnt$v_ovr_setid : 1;	/* override volume set ident option selectied */
	unsigned mnt$v_readcheck : 1;	/* readcheck option selected */
	unsigned mnt$v_share	 : 1;	/* share option selected */
	unsigned mnt$v_message	 : 1;	/* allow $MOUNT to print messages */
	unsigned mnt$v_system	 : 1;	/* system option selected */
	unsigned mnt$v_writecheck: 1;	/* writecheck option selected */
	unsigned mnt$v_writethru : 1;	/* writethru option selected */
	unsigned mnt$v_nocache	 : 1;	/* turn off all caching */
	unsigned mnt$v_ovr_lock  : 1;	/* override automatic write-lock */
	unsigned mnt$v_nomntver  : 1;	/* disable mount verification */
	unsigned mnt$v_nounload  : 1;	/* do not unload volume at dismount */
	unsigned mnt$v_tape_data_write : 1; /* enable write-back cache on tape */
	unsigned mnt$v_nocopy	 : 1;	/* do not allow shadow copy operation */
	unsigned mnt$v_noauto	 : 1;	/* do not set the MTAACP into AVR and AVL mode */
	unsigned mnt$v_init_all  : 1;	/* initialize all volumes in set before writing */
	unsigned mnt$v_init_cont : 1;	/* initialize continuation volumes before writing */
	unsigned mnt$v_ovr_volo  : 1;	/* override vol1 volume identifier field */
	unsigned mnt$v_interchg  : 1;	/* vol for interchg no VMS specific info written to tape */
	unsigned mnt$v_cluster	 : 1;	/* cluster-wide mount option selected */
	unsigned mnt$v_norebuild : 1;	/* do not rebuild volume */
	unsigned mnt$v_ovr_shamem: 1;	/* override shadow membership restriction */
	unsigned mnt$v_multi_vol : 1;	/* multi_volume tape set */
 /* */
	unsigned mnt$v_diskq	 : 1;	/* quota explicitly selected */
	unsigned mnt$v_compaction: 1;	/* magtape data compaction on */
	unsigned mnt$v_include	 : 1;	/* include previous shadowset members */
	unsigned mnt$v_pass2	 : 1;	/* pass2 of /include/confirm processing */
	unsigned mnt$v_ovr_nofe  : 1;	/* /override=no_forced_error */
	unsigned mnt$v_scratch	 : 1;	/* scratch tape requested flag */
#ifndef NO_VMS_V6
	unsigned mnt$v_cdrom	 : 1;	/* force mounting of a Files-11 C/D Volume */
	unsigned mnt$v_xar	 : 1;	/* enable protection based on XARs */
	unsigned mnt$v_dsi	 : 1;	/* enable protection based on Digital System Id in XARs */
	unsigned mnt$v_subsystem : 1;		/* /SUBSYSTEM */
	unsigned mnt$v_nocompaction : 1;	/* magtape data compaction off */
	unsigned mnt$v_ovr_security : 1;	/* /OVERRIDE=SECURITY */
	unsigned mnt$v_ovr_limited_search : 1;	/* /OVERRIDE=LIMITIED_SEARCH */
	unsigned		: 3;
#else
	unsigned		: 10;
#endif
	unsigned		: 16;	/* padding */
    } mnt$r_mntdef_bits;
    struct {
	unsigned mnt2$v_diskq		: 1;
	unsigned mnt2$v_compaction	: 1;
	unsigned mnt2$v_include		: 1;
	unsigned mnt2$v_pass2		: 1;
	unsigned mnt2$v_ovr_nofe	: 1;
	unsigned mnt2$v_scratch		: 1;
#ifndef NO_VMS_V6
	unsigned mnt2$v_cdrom		: 1;
	unsigned mnt2$v_xar		: 1;
	unsigned mnt2$v_dsi		: 1;
	unsigned mnt2$v_subsystem	: 1;
	unsigned mnt2$v_nocompaction	: 1;
	unsigned mnt2$v_ovr_security	: 1;
	unsigned mnt2$v_ovr_limited_search : 1;
	unsigned			: 3;
#else
	unsigned			: 10;
#endif
	unsigned			: 16;
    } mnt$r_mnt2def_bits;
};

#ifndef NO_VMS_V6
/* define format of the /UNDEFINED_FAT block */
struct mnt$undefined_fat {
    unsigned short  unfat$w_mrs;	/* FAT maximum record size */
    unsigned char   unfat$b_rat;	/* FAT record attributes */
    unsigned char   unfat$b_rfm;	/* FAT record format */
};
#endif

#endif	/*_MNTDEF_H*/
