/* <atrdef.h>
 *
 *	Attribute list description.
 */
#ifndef _ATRDEF_H
#define _ATRDEF_H
/*
   The attribute control list is used to read and write file attributes.
   It consists of concatenated attribute control blocks terminated by a
   single zero longword.
 */

/* Attribute codes */
#define ATR$C_UCHAR	3	/* 4 byte user file characteristics */
#define ATR$C_RECATTR	4	/* 32 bytes record attributes */
#define ATR$C_FILNAM	5	/* 6 byte rad-50 file name */
#define ATR$C_FILTYP	6	/* 2 byte rad-50 file type */
#define ATR$C_FILVER	7	/* 2 byte binary file version */
#define ATR$C_EXPDAT	8	/* 7 byte ascii expiration date */
#define ATR$C_STATBLK	9	/* 32 byte statistics block */
#define ATR$C_HEADER	10	/* 512 byte file header */
#define ATR$C_BLOCKSIZE 11	/* magtape block size */
#define ATR$C_USERLABEL 12	/* user file label */
#define ATR$C_ASCDATES	13	/* revision count thru exp date in ascii */
#define ATR$C_ALCONTROL 14	/* compatibility mode allocation data */
#define ATR$C_ENDLBLAST 15	/* end of magtape label processing and supply AST control block */
#define ATR$C_ASCNAME	16	/* file name, type & version in ascii */
#define ATR$C_CREDATE	17	/* 64 bit creation date */
#define ATR$C_REVDATE	18	/* 64 bit revision date */
#define ATR$C_EXPDATE	19	/* 64 bit expiration date */
#define ATR$C_BAKDATE	20	/* 64 bit backup date */
#define ATR$C_UIC	21	/* 4 byte file owner uic */
#define ATR$C_FPRO	22	/* 2 byte file protection */
#define ATR$C_RPRO	23	/* 2 byte record protection */
#define ATR$C_ACLEVEL	24	/* 1 byte file access level */
#define ATR$C_SEMASK	25	/* file security mask and limit */
#define ATR$C_UIC_RO	26	/* read only uic */
#define ATR$C_DIRSEQ	27	/* directory update sequence count */
#define ATR$C_BACKLINK	28	/* file back link pointer */
#define ATR$C_JOURNAL	29	/* journal control flags */
#define ATR$C_HDR1_ACC	30	/* ansi tape header 1 accessibility char */
#define ATR$C_ADDACLENT 31	/* add an access control entry */
#define ATR$C_DELACLENT 32	/* remove an access control entry */
#define ATR$C_MODACLENT 33	/* modify an ACL entry */
#define ATR$C_FNDACLENT 34	/* locate an ACL entry */
#define ATR$C_FNDACLTYP 35	/* find a specific type of ace */
#define ATR$C_DELETEACL 36	/* delete ACL leaving protected */
#define ATR$C_READACL	37	/* read the entire ACL */
#define ATR$C_ACLLENGTH 38	/* return the length of the ACL */
#define ATR$C_READACE	39	/* read a single ACE */
#define ATR$C_RESERVED	40	/* modify reserved area */
#define ATR$C_HIGHWATER 41	/* highwater mark (user read only) */
#define ATR$C_DUMMY_0	42	/* *** available code */
#define ATR$C_PRIVS_USED 43	/* privileges used to gain access */
#define ATR$C_MATCHING_ACE 44	/* ACE used to gain access (if any) */
#define ATR$C_ACCESS_MODE 45	/* access mode for following attribute descriptors */
#define ATR$C_FILE_SPEC 46	/* convert fid to file-spec */
#define ATR$C_CLASS_MASK 47	/* non-discretionary classification mask */
#define ATR$C_BUFFER_OFFSET 48	/* for magnetic tape only length of buffer offset of block in file */
#define ATR$C_RU_ACTIVE 49	/* recoverable facility id number (if non-zero, means file has */
 /* active recovery units managed by that facility) */
#define ATR$C_GRANT_ACE 50	/* ACE granting access */
#define ATR$C_NEXT_ACE	51	/* increment ACE number */
#define ATR$C_DELETE_ALL 52	/* delete the entire ACL */
#ifndef NO_VMS_V6
#define ATR$C_BACKUP_DONE 53	/* alter backup info in RMS journaling ACEs */
 /* ISO 9660 descriptors */
#define ATR$C_EFFDATE		54	/* ISO 9660 backup date */
#define ATR$C_RCDDATE		55	/* ISO 9660 recorded date */
#define ATR$C_VD		56	/* volume descriptor */
#define ATR$C_PVD		57	/* primary volume descriptor */
#define ATR$C_SVD		58	/* supplementary volume descriptor */
#define ATR$C_VPD		59	/* volume partition descriptor */
#define ATR$C_VDST		60	/* volume descriptor set terminator */
#define ATR$C_BOOT		61	/* boot record */
#define ATR$C_PTR		62	/* path table record */
#define ATR$C_DIR		63	/* directory record */
#define ATR$C_XAR		64	/* extended attribute record */
 /* ISO 9660 descriptors fields */
#define ATR$C_VOLUME_ID		65	/* volume identifier */
#define ATR$C_VOLUME_FLAGS	66	/* volume flags */
#define ATR$C_ESCAPE_SEQUENCES	67	/* escape sequences */
#define ATR$C_VOLUME_SET_ID	68	/* volume set identifier */
#define ATR$C_COPYRIGHT_FID	69	/* copyright file identifier */
#define ATR$C_ABSTRACT_FID	70	/* abstract file identifier */
#define ATR$C_BIBLIOGRAPHIC_FID 71	/* bibliographic file identifier */
#define ATR$C_CACHE_SEQ		72	/* cache sequence numbers */
#define ATR$C_MAX_CODE	72
#define ATR$C_MAX_PLUS1 73	/* maximum code plus one */
#else
#define ATR$C_MAX_CODE	52
#define ATR$C_MAX_PLUS1 53	/* maximum code plus one */
#endif
#define ATR$C_FNDACETYP 35	/* synonym for ATR$C_FNDACLTYP */

/* Attribute maximum lengths */
#define ATR$S_UCHAR	4	/* 4 byte user file characteristics */
#define ATR$S_RECATTR	32	/* 32 bytes record attributes */
#define ATR$S_FILNAM	6	/* 6 byte rad-50 file name */
#define ATR$S_FILTYP	2	/* 2 byte rad-50 file type */
#define ATR$S_FILVER	2	/* 2 byte binary file version */
#define ATR$S_EXPDAT	7	/* 7 byte ascii expiration date */
#define ATR$S_STATBLK	32	/* 32 byte statistics block */
#define ATR$S_HEADER	512	/* 512 byte file header */
#define ATR$S_BLOCKSIZE 2	/* magtape block size */
#define ATR$S_USERLABEL 80	/* user file label */
#define ATR$S_ASCDATES	35	/* revision count thru exp date in ascii */
#define ATR$S_ALCONTROL 14	/* compatibility mode allocation data */
#define ATR$S_ENDLBLAST 4	/* end of magtape label processing and supply AST control block */
#define ATR$S_ASCNAME	86	/* file name, type & version in ascii */
#define ATR$S_CREDATE	8	/* 64 bit creation date */
#define ATR$S_REVDATE	8	/* 64 bit revision date */
#define ATR$S_EXPDATE	8	/* 64 bit expiration date */
#define ATR$S_BAKDATE	8	/* 64 bit backup date */
#define ATR$S_UIC	4	/* 4 byte file owner uic */
#define ATR$S_FPRO	2	/* 2 byte file protection */
#define ATR$S_RPRO	2	/* 2 byte record protection */
#define ATR$S_ACLEVEL	1	/* 1 byte file access level */
#define ATR$S_SEMASK	8	/* file security mask and limit */
#define ATR$S_UIC_RO	4	/* read only uic */
#define ATR$S_DIRSEQ	2	/* directory update sequence count */
#define ATR$S_BACKLINK	6	/* file back link pointer */
#define ATR$S_JOURNAL	1	/* journal control flags */
#define ATR$S_HDR1_ACC	1	/* ansi tape header 1 accessibility char */
#define ATR$S_ADDACLENT 255	/* add an access control entry */
#define ATR$S_DELACLENT 255	/* remove an access control entry */
#define ATR$S_MODACLENT 255	/* modify an ACL entry */
#define ATR$S_FNDACLENT 255	/* locate an ACL entry */
#define ATR$S_FNDACLTYP 255	/* find a specific type of ACE */
#define ATR$S_FNDACETYP 255	/* find a specific type of ACE */
#define ATR$S_DELETEACL 255	/* delete ACL leaving protected */
#define ATR$S_READACL	512	/* read the entire ACL */
#define ATR$S_ACLLENGTH 4	/* return the length of the ACL */
#define ATR$S_READACE	255	/* read a single ACE */
#define ATR$S_RESERVED	380	/* modify reserved area */
#define ATR$S_HIGHWATER 4	/* file high water mark (user read only) */
#define ATR$S_DUMMY_0	4	/* *** available code */
#define ATR$S_PRIVS_USED 4	/* privs used to gain access */
#define ATR$S_MATCHING_ACE 255	/* ACE used to gain access */
#define ATR$S_ACCESS_MODE 1	/* access mode for following attribute descriptors */
#define ATR$S_FILE_SPEC 512	/* convert fid to file-spec */
#define ATR$S_CLASS_MASK 20	/* non-discretionary classification mask */
#define ATR$S_BUFFER_OFFSET 2	/* buffer offset length field */
#define ATR$S_RU_ACTIVE 1	/* recoverable facility id if rus active */
#define ATR$S_GRANT_ACE 255	/* ACE granting access */
#define ATR$S_NEXT_ACE	4	/* increment ACE number */
#define ATR$S_DELETE_ALL 255	/* delete the entire ACL */
#ifndef NO_VMS_V6
#define ATR$S_BACKUP_DONE 1	/* alter backup info in RMS journaling ACEs */
 /* ISO 9660 descriptors */
#define ATR$S_EFFDATE		8	/* 64 bit effective date */
#define ATR$S_RCDDATE		8	/* 64 bit recorded date */
#define ATR$S_VD		7	/* volume descriptor */
#define ATR$S_PVD		1395	/* primary volume descriptor */
#define ATR$S_SVD		1395	/* supplementary volume descriptor */
#define ATR$S_VPD		88	/* volume partition descriptor */
#define ATR$S_VDST		7	/* volume descriptor set terminator */
#define ATR$S_BOOT		71	/* boot record */
#define ATR$S_PTR		45	/* path table record */
#define ATR$S_DIR		512	/* directory record */
#define ATR$S_XAR		512	/* extended attribute record */
#define ATR$S_VOLUME_ID		32	/* volume identifier */
#define ATR$S_VOLUME_FLAGS	1	/* volume flags */
#define ATR$S_ESCAPE_SEQUENCES	32	/* escape sequences */
#define ATR$S_VOLUME_SET_ID	128	/* volume set identifier */
#define ATR$S_COPYRIGHT_FID	37	/* copyright file identifier */
#define ATR$S_ABSTRACT_FID	37	/* abstract file identifier */
#define ATR$S_BIBLIOGRAPHIC_FID 37	/* bibliographic file identifier */
#define ATR$S_CACHE_SEQ		8	/* cache sequence number */
#endif

struct atrdef {
    unsigned short atr$w_size;		/* size of attribute in bytes */
    unsigned short atr$w_type;		/* attribute type code */
    void *atr$l_addr;			/* address of attribute text */
};

#endif	/*_ATRDEF_H*/
