/* <devdef.h>
 *
 *	Device characteristics definitions (for both UCBs and RMS).
 */
#ifndef _DEVDEF_H
#define _DEVDEF_H

#define DEV$V_REC	0
#define DEV$V_CCL	1
#define DEV$V_TRM	2
#define DEV$V_DIR	3
#define DEV$V_SDI	4
#define DEV$V_SQD	5
#define DEV$V_SPL	6
#define DEV$V_OPR	7
#define DEV$V_RCT	8
#define DEV$V_NET	13
#define DEV$V_FOD	14
#define DEV$V_DUA	15
#define DEV$V_SHR	16
#define DEV$V_GEN	17
#define DEV$V_AVL	18
#define DEV$V_MNT	19
#define DEV$V_MBX	20
#define DEV$V_DMT	21
#define DEV$V_ELG	22
#define DEV$V_ALL	23
#define DEV$V_FOR	24
#define DEV$V_SWL	25
#define DEV$V_IDV	26
#define DEV$V_ODV	27
#define DEV$V_RND	28
#define DEV$V_RTM	29
#define DEV$V_RCK	30
#define DEV$V_WCK	31
#define DEV$M_REC	(1<<DEV$V_REC)		/* 0x01 */
#define DEV$M_CCL	(1<<DEV$V_CCL)		/* 0x02 */
#define DEV$M_TRM	(1<<DEV$V_TRM)		/* 0x04 */
#define DEV$M_DIR	(1<<DEV$V_DIR)		/* 0x08 */
#define DEV$M_SDI	(1<<DEV$V_SDI)		/* 0x10 */
#define DEV$M_SQD	(1<<DEV$V_SQD)		/* 0x20 */
#define DEV$M_SPL	(1<<DEV$V_SPL)		/* 0x40 */
#define DEV$M_OPR	(1<<DEV$V_OPR)		/* 0x80 */
#define DEV$M_RCT	(1<<DEV$V_RCT)		/* 0x0100 */
#define DEV$M_NET	(1<<DEV$V_NET)		/* 0x2000 */
#define DEV$M_FOD	(1<<DEV$V_FOD)		/* 0x4000 */
#define DEV$M_DUA	(1<<DEV$V_DUA)		/* 0x8000 */
#define DEV$M_SHR	(1<<DEV$V_SHR)		/* 0x010000 */
#define DEV$M_GEN	(1<<DEV$V_GEN)		/* 0x020000 */
#define DEV$M_AVL	(1<<DEV$V_AVL)		/* 0x040000 */
#define DEV$M_MNT	(1<<DEV$V_MNT)		/* 0x080000 */
#define DEV$M_MBX	(1<<DEV$V_MBX)		/* 0x100000 */
#define DEV$M_DMT	(1<<DEV$V_DMT)		/* 0x200000 */
#define DEV$M_ELG	(1<<DEV$V_ELG)		/* 0x400000 */
#define DEV$M_ALL	(1<<DEV$V_ALL)		/* 0x800000 */
#define DEV$M_FOR	(1<<DEV$V_FOR)		/* 0x01000000 */
#define DEV$M_SWL	(1<<DEV$V_SWL)		/* 0x02000000 */
#define DEV$M_IDV	(1<<DEV$V_IDV)		/* 0x04000000 */
#define DEV$M_ODV	(1<<DEV$V_ODV)		/* 0x08000000 */
#define DEV$M_RND	(1<<DEV$V_RND)		/* 0x10000000 */
#define DEV$M_RTM	(1<<DEV$V_RTM)		/* 0x20000000 */
#define DEV$M_RCK	(1<<DEV$V_RCK)		/* 0x40000000 */
#define DEV$M_WCK	(1<<DEV$V_WCK)		/* 0x80000000 */
#define DEV$V_CLU	0
#define DEV$V_DET	1
#define DEV$V_RTT	2
#define DEV$V_CDP	3
#define DEV$V_2P	4
#define DEV$V_MSCP	5
#define DEV$V_SSM	6
#define DEV$V_SRV	7
#define DEV$V_RED	8
#define DEV$V_NNM	9
#define DEV$V_WBC	10
#define DEV$V_WTC	11
#define DEV$V_HOC	12
#define DEV$V_LOC	13
#define DEV$V_DFS	14
#define DEV$V_DAP	15
#define DEV$V_NLT	16
#define DEV$V_SEX	17
#define DEV$V_SHD	18
#define DEV$V_VRT	19
#define DEV$V_LDR	20
#define DEV$V_NOLB	21
#define DEV$V_NOCLU	22
#define DEV$V_VMEM	23
#define DEV$V_SCSI	24
#define DEV$V_WLG	25
#define DEV$V_NOFE	26
#define DEV$V_AIP	27
#define DEV$V_CRAMIO	28
#define DEV$V_DTN	29
#define DEV$M_CLU	(1<<DEV$V_CLU)		/* 0x01 */
#define DEV$M_DET	(1<<DEV$V_DET)		/* 0x02 */
#define DEV$M_RTT	(1<<DEV$V_RTT)		/* 0x04 */
#define DEV$M_CDP	(1<<DEV$V_CDP)		/* 0x08 */
#define DEV$M_2P	(1<<DEV$V_2P)		/* 0x10 */
#define DEV$M_MSCP	(1<<DEV$V_MSCP)		/* 0x20 */
#define DEV$M_SSM	(1<<DEV$V_SSM)		/* 0x40 */
#define DEV$M_SRV	(1<<DEV$V_SRV)		/* 0x80 */
#define DEV$M_RED	(1<<DEV$V_RED)		/* 0x0100 */
#define DEV$M_NNM	(1<<DEV$V_NNM)		/* 0x0200 */
#define DEV$M_WBC	(1<<DEV$V_WBC)		/* 0x0400 */
#define DEV$M_WTC	(1<<DEV$V_WTC)		/* 0x0800 */
#define DEV$M_HOC	(1<<DEV$V_HOC)		/* 0x1000 */
#define DEV$M_LOC	(1<<DEV$V_LOC)		/* 0x2000 */
#define DEV$M_DFS	(1<<DEV$V_DFS)		/* 0x4000 */
#define DEV$M_DAP	(1<<DEV$V_DAP)		/* 0x8000 */
#define DEV$M_NLT	(1<<DEV$V_NLT)		/* 0x010000 */
#define DEV$M_SEX	(1<<DEV$V_SEX)		/* 0x020000 */
#define DEV$M_SHD	(1<<DEV$V_SHD)		/* 0x040000 */
#define DEV$M_VRT	(1<<DEV$V_VRT)		/* 0x080000 */
#define DEV$M_LDR	(1<<DEV$V_LDR)		/* 0x100000 */
#define DEV$M_NOLB	(1<<DEV$V_NOLB)		/* 0x200000 */
#define DEV$M_NOCLU	(1<<DEV$V_NOCLU)	/* 0x400000 */
#define DEV$M_VMEM	(1<<DEV$V_VMEM)		/* 0x800000 */
#define DEV$M_SCSI	(1<<DEV$V_SCSI)		/* 0x01000000 */
#define DEV$M_WLG	(1<<DEV$V_WLG)		/* 0x02000000 */
#define DEV$M_NOFE	(1<<DEV$V_NOFE)		/* 0x04000000 */
#define DEV$M_AIP	(1<<DEV$V_AIP)		/* 0x08000000 */
#define DEV$M_CRAMIO	(1<<DEV$V_CRAMIO)	/* 0x10000000 */
#define DEV$M_DTN	(1<<DEV$V_DTN)		/* 0x20000000 */
union devdef {
    struct {
	unsigned dev$v_rec	: 1;	/* device record oriented */
	unsigned dev$v_ccl	: 1;	/* carriage control device */
	unsigned dev$v_trm	: 1;	/* device is a terminal */
	unsigned dev$v_dir	: 1;	/* device is directory structured */
	unsigned dev$v_sdi	: 1;	/* device is single directory structured */
	unsigned dev$v_sqd	: 1;	/* sequential block-oriented device (ie, magtape) */
	unsigned dev$v_spl	: 1;	/* device being spooled */
	unsigned dev$v_opr	: 1;	/* device is an operator */
	unsigned dev$v_rct	: 1;	/* disk contains RCT (DEC standard 166 disk) */
	unsigned		: 4;	/* spares to correspond with RSX11M */
	unsigned dev$v_net	: 1;	/* network device */
	unsigned dev$v_fod	: 1;	/* files-oriented device (i.e., disk and mt) */
	unsigned dev$v_dua	: 1;	/* device is dual ported */
	unsigned dev$v_shr	: 1;	/* device shareable */
	unsigned dev$v_gen	: 1;	/* device is a generic device */
	unsigned dev$v_avl	: 1;	/* device available for use */
	unsigned dev$v_mnt	: 1;	/* device is mounted */
	unsigned dev$v_mbx	: 1;	/* device is a mailbox */
	unsigned dev$v_dmt	: 1;	/* device marked for dismount */
	unsigned dev$v_elg	: 1;	/* device has error logging enabled */
	unsigned dev$v_all	: 1;	/* device is allocated */
	unsigned dev$v_for	: 1;	/* device is mounted foreign (ie, non-file structured) */
	unsigned dev$v_swl	: 1;	/* device is software write locked */
	unsigned dev$v_idv	: 1;	/* device capable of providing input */
	unsigned dev$v_odv	: 1;	/* device capable of providing output */
	unsigned dev$v_rnd	: 1;	/* device allows random access */
	unsigned dev$v_rtm	: 1;	/* device is realtime in nature */
	unsigned dev$v_rck	: 1;	/* device has read checking enabled */
	unsigned dev$v_wck	: 1;	/* device has write checking enabled */
    } dev$r_devdef_bits0;
    struct {
	unsigned dev$v_clu	: 1;	/* device is available cluster-wide */
	unsigned dev$v_det	: 1;	/* device is detached terminal */
	unsigned dev$v_rtt	: 1;	/* device has remote terminal UCB extension */
	unsigned dev$v_cdp	: 1;	/* dual path device with 2 UCBs */
	unsigned dev$v_2p	: 1;	/* two paths are known to this device */
	unsigned dev$v_mscp	: 1;	/* device accessed using MSCP (disk or tape) */
	unsigned dev$v_ssm	: 1;	/* device is a shadow set member */
	unsigned dev$v_srv	: 1;	/* device is served via the MSCP server */
	unsigned dev$v_red	: 1;	/* device is redirected terminal */
	unsigned dev$v_nnm	: 1;	/* device has "node$" prefix */
	unsigned dev$v_wbc	: 1;	/* device supports write-back caching */
	unsigned dev$v_wtc	: 1;	/* device supports write-through caching */
	unsigned dev$v_hoc	: 1;	/* device supports host caching */
	unsigned dev$v_loc	: 1;	/* device accessible via local (non-emulated) controller */
	unsigned dev$v_dfs	: 1;	/* device is DFS-served */
	unsigned dev$v_dap	: 1;	/* device is DAP accessed */
	unsigned dev$v_nlt	: 1;	/* device is not-last-track (i.e. it has no bad block */
					/*  information on its last track) */
	unsigned dev$v_sex	: 1;	/* device (tape) supports serious exception handling */
	unsigned dev$v_shd	: 1;	/* device is a member of a host based shadow set */
	unsigned dev$v_vrt	: 1;	/* device is a shadow set virtual unit */
	unsigned dev$v_ldr	: 1;	/* loader present (tapes) */
	unsigned dev$v_nolb	: 1;	/* device ignores server load balancing requests */
	unsigned dev$v_noclu	: 1;	/* device will never be available cluster-wide */
	unsigned dev$v_vmem	: 1;	/* virtual member of a constituent set */
	unsigned dev$v_scsi	: 1;	/* device is a SCSI device */
	unsigned dev$v_wlg	: 1;	/* device has write logging capability */
	unsigned dev$v_nofe	: 1;	/* device doesn't support forced error */
	unsigned dev$v_aip	: 1;	/* allocation in progress (MME) */
	unsigned dev$v_cramio	: 1;	/* performs Mailbox I/O */
	unsigned dev$v_dtn	: 1;	/* device has DDR Device Type Name available */
	unsigned		: 2;
    } dev$r_devdef_bits1;
};

#endif	/*_DEVDEF_H*/