xref: /original-bsd/sys/sys/ipc.h (revision fac0c393)
1 /*
2  * Copyright (c) 1988 University of Utah.
3  * Copyright (c) 1990, 1993
4  *	The Regents of the University of California.  All rights reserved.
5  * (c) UNIX System Laboratories, Inc.
6  * All or some portions of this file are derived from material licensed
7  * to the University of California by American Telephone and Telegraph
8  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
9  * the permission of UNIX System Laboratories, Inc.
10  *
11  * This code is derived from software contributed to Berkeley by
12  * the Systems Programming Group of the University of Utah Computer
13  * Science Department.
14  *
15  * %sccs.include.redist.c%
16  *
17  *	@(#)ipc.h	8.4 (Berkeley) 02/19/95
18  */
19 
20 /*
21  * SVID compatible ipc.h file
22  */
23 #ifndef _SYS_IPC_H_
24 #define _SYS_IPC_H_
25 
26 struct ipc_perm {
27 	ushort	cuid;	/* creator user id */
28 	ushort	cgid;	/* creator group id */
29 	ushort	uid;	/* user id */
30 	ushort	gid;	/* group id */
31 	ushort	mode;	/* r/w permission */
32 	ushort	seq;	/* sequence # (to generate unique msg/sem/shm id) */
33 	key_t	key;	/* user specified msg/sem/shm key */
34 };
35 
36 /* common mode bits */
37 #define	IPC_R		00400	/* read permission */
38 #define	IPC_W		00200	/* write/alter permission */
39 
40 /* SVID required constants (same values as system 5) */
41 #define	IPC_CREAT	01000	/* create entry if key does not exist */
42 #define	IPC_EXCL	02000	/* fail if key exists */
43 #define	IPC_NOWAIT	04000	/* error if request must wait */
44 
45 #define	IPC_PRIVATE	(key_t)0 /* private key */
46 
47 #define	IPC_RMID	0	/* remove identifier */
48 #define	IPC_SET		1	/* set options */
49 #define	IPC_STAT	2	/* get options */
50 
51 #endif /* !_SYS_IPC_H_ */
52