/* <acldef.h>
 *
 *	Access Control List definitions
 */
#ifndef _ACLDEF_H
#define _ACLDEF_H

#define ACL$K_LENGTH 12			/* length of the overhead area */
#define ACL$C_LENGTH 12
/* Object types */
#define ACL$C_FILE		1	/* files */
#define ACL$C_DEVICE		2	/* MBX, MT, TT, etc. */
#define ACL$C_JOBCTL_QUEUE	3	/* job controller queue */
#define ACL$C_COMMON_EF_CLUSTER 4	/* common event flag clusters */
#define ACL$C_LOGICAL_NAME_TABLE 5	/* logical name tables */
#define ACL$C_PROCESS		6	/* process */
#define ACL$C_GROUP_GLOBAL_SECTION 7	/* group global sections */
#define ACL$C_SYSTEM_GLOBAL_SECTION 8	/* system global sections */
#define ACL$C_CAPABILITY	9	/* capability */
#define ACL$C_EVENT_FACILITY	10	/* event facility */
#ifndef NO_VMS_V6
#define ACL$C_LOCK		11	/* lock block/resource */
#define ACL$C_VOLUME		12	/* disk volume (set) */
#define ACL$C_MAX_OBJECT	13	/* max object code */
#define ACL$C_NUM_OBJECTS	12	/* number of objects */
#define ACL$K_NUM_OBJECTS	12
#endif
#ifndef ONLY_VMS_V6
#define ACL$C_RESERVED_OBJECT_3 11	/* reserved object type */
#define ACL$C_RESERVED_OBJECT_4 12	/* reserved object type */
#endif
/* Action codes */
#define ACL$C_ADDACLENT 1		/* add an ACL entry */
#define ACL$C_DELACLENT 2		/* delete an ACL entry */
#define ACL$C_MODACLENT 3		/* modify an ACL entry */
#define ACL$C_FNDACLENT 4		/* locate an ACL entry */
#define ACL$C_FNDACETYP 5		/* locate specific ACE type */
#define ACL$C_DELETEACL 6		/* delete ACL, leaving protected */
#define ACL$C_READACL	7		/* read the ACL */
#define ACL$C_ACLLENGTH 8		/* get the ACL's length */
#define ACL$C_READACE	9		/* read a single ACE */
#define ACL$C_RLOCK_ACL 10		/* read lock on ACL */
#define ACL$C_WLOCK_ACL 11		/* write lock on ACL */
#define ACL$C_UNLOCK_ACL 12		/* release exclusive lock */
#define ACL$C_GRANT_ACE 13		/* ACE granting access */
#define ACL$C_NEXT_ACE	14		/* increment ACE number */
#define ACL$C_DELETE_ALL 15		/* delete entire ACL */
#define ACL$C_RESERVED_ITEM_2 16	/* reserved item code */
#define ACL$C_RESERVED_ITEM_3 17	/* reserved item code */

#define ACL$S_ADDACLENT 255		/* add an ACL entry */
#define ACL$S_DELACLENT 255		/* delete an ACL entry */
#define ACL$S_MODACLENT 255		/* modify an ACL entry */
#define ACL$S_FNDACLENT 255		/* locate an ACL entry */
#define ACL$S_FNDACETYP 255		/* locate specific ACE type */
#define ACL$S_DELETEACL 255		/* delete ACL, leaving protected */
#define ACL$S_READACL 512		/* read the ACL */
#define ACL$S_ACLLENGTH 4		/* get the ACL's length */
#define ACL$S_READACE 255		/* read a single ACE */
#define ACL$S_RLOCK_ACL 4		/* read lock on ACL */
#define ACL$S_WLOCK_ACL 4		/* write lock on ACL */
#define ACL$S_UNLOCK_ACL 4		/* remove lock on ACL */
#define ACL$S_GRANT_ACE 255		/* ACE granting access */
#define ACL$S_NEXT_ACE 4		/* increment ACE number */
#define ACL$S_DELETE_ALL 255		/* delete entire ACL */
#define ACL$S_RESERVED_ITEM_2 255	/* reserved item code */
#define ACL$S_RESERVED_ITEM_3 255	/* reserved item code */
#define ACL$C_MAX_SEGMENT_SIZE	512	/* maximum ACL segemnt size */
#define ACL$K_MAX_SEGMENT_SIZE	512

struct acldef {
    unsigned long acl$l_flink;	/* forward link to next list in the queue */
    unsigned long acl$l_blink;	/* back link to previous list in queue */
    unsigned short acl$w_size;	/* total size of the list */
    unsigned char acl$b_type;	/* structure type code */
    unsigned	: 8;		/* char fill; spare unused byte */
    unsigned long acl$l_list;	/* start of the Access Control Entries */
};

#endif	/*_ACLDEF_H*/
