/* <vms/lib/hm1def.h>
 *
 *	F11DEF - home block definitions for ODS level 1		[not in Starlet]
 */
#ifndef _HM1DEF_H
#define _HM1DEF_H

/*
   Home block definitions for Files-11 Structure Level 1
 */
#define HM1$S_VOLNAME	12
#define HM1$S_SYSPRO	4
#define HM1$S_OWNPRO	4
#define HM1$S_GROUPPRO	4
#define HM1$S_WORLDPRO	4
#define HM1$S_CREDATE	14
#define HM1$S_VOLNAME2	12
#define HM1$S_OWNERNAME 12
#define HM1$S_FORMAT	12

#define HM1$C_LEVEL1	257	/* 401 octal = structure level 1 */
#define HM1$C_LEVEL2	258	/* 402 octal = structure level 1, version 2 */
#define HM1$S_HM1DEF	512
struct hm1def {
    unsigned short hm1$w_ibmapsize;	/* index file bitmap size, blocks */
    unsigned long hm1$l_ibmaplbn;	/* index file bitmap starting LBN */
    unsigned short hm1$w_maxfiles;	/* maximum ! files on volume */
    unsigned short hm1$w_cluster;	/* storage bitmap cluster factor */
    unsigned short hm1$w_devtype;	/* disk device type */
    unsigned short hm1$w_struclev;	/* volume structure level */
    char hm1$t_volname[12];		/* volume name (ASCII) */
    unsigned	: 8, : 8, : 8, : 8;	/* char fill[4]; spare */
    unsigned short hm1$w_volowner;	/* volume owner UIC */
    union {
	unsigned short hm1$w_protect;	/* volume protection */
	struct {
	    unsigned hm1$v_syspro   : 4; /* system protection */
	    unsigned hm1$v_ownpro   : 4; /* owner protection */
	    unsigned hm1$v_grouppro : 4; /* group protection */
	    unsigned hm1$v_worldpro : 4; /* world protection */
	} hm1$r_protect_bits;
    } hm1$r_protect_overlay;
    unsigned short hm1$w_volchar;	/* volume characteristics */
    unsigned short hm1$w_fileprot;	/* default file protection */
    char mh1def$$_fill_2[6];		/* spare */
    unsigned char hm1$b_window;		/* default window size */
    unsigned char hm1$b_extend;		/* default file extend */
    unsigned char hm1$b_lru_lim;	/* default LRU limit */
    char mh1def$$_fill_3[11];		/* spare */
    unsigned short hm1$w_checksum1;	/* first checksum */
    char hm1$t_credate[14];		/* volume creation date */
    char mh1def$$_fill_4[382];		/* spare */
    unsigned long hm1$l_serialnum;	/* pack serial number */
    char mh1def$$_fill_5[12];		/* spare */
    char hm1$t_volname2[12];		/* 2nd copy of volume name */
    char hm1$t_ownername[12];		/* volume owner name */
    char hm1$t_format[12];		/* volume format type */
    unsigned	: 8, : 8;		/* char fill[2]; spare */
    unsigned short hm1$w_checksum2;	/* second checksum */
};

#endif	/*_HM1DEF_H*/
