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.3 (Berkeley) 01/21/94 18 */ 19 20 /* 21 * SVID compatible ipc.h file 22 */ 23 #ifndef _SYS_IPC_H_ 24 #define _SYS_IPC_H_ 25 26 typedef long key_t; /* XXX should be in types.h */ 27 28 struct ipc_perm { 29 ushort cuid; /* creator user id */ 30 ushort cgid; /* creator group id */ 31 ushort uid; /* user id */ 32 ushort gid; /* group id */ 33 ushort mode; /* r/w permission */ 34 ushort seq; /* sequence # (to generate unique msg/sem/shm id) */ 35 key_t key; /* user specified msg/sem/shm key */ 36 }; 37 38 /* common mode bits */ 39 #define IPC_R 00400 /* read permission */ 40 #define IPC_W 00200 /* write/alter permission */ 41 42 /* SVID required constants (same values as system 5) */ 43 #define IPC_CREAT 01000 /* create entry if key does not exist */ 44 #define IPC_EXCL 02000 /* fail if key exists */ 45 #define IPC_NOWAIT 04000 /* error if request must wait */ 46 47 #define IPC_PRIVATE (key_t)0 /* private key */ 48 49 #define IPC_RMID 0 /* remove identifier */ 50 #define IPC_SET 1 /* set options */ 51 #define IPC_STAT 2 /* get options */ 52 53 #endif /* !_SYS_IPC_H_ */ 54