2 * SVID compatible ipc.h file
8 #include <sys/featuretest.h>
11 /* Data structure used to pass permission information to IPC operations. */
15 uid_t uid
; /* Owner's user ID. */
16 gid_t gid
; /* Owner's group ID. */
17 uid_t cuid
; /* Creator's user ID. */
18 gid_t cgid
; /* Creator's group ID. */
19 unsigned short int mode
; /* Reader/write permission. */
20 unsigned short int __seq
; /* Sequence number. */
23 /* X/Open required constants (same values as system 5) */
24 #define IPC_CREAT 001000 /* create entry if key does not exist */
25 #define IPC_EXCL 002000 /* fail if key exists */
26 #define IPC_NOWAIT 004000 /* error if request must wait */
28 #define IPC_PRIVATE (key_t)0 /* private key */
30 #define IPC_RMID 0 /* remove identifier */
31 #define IPC_SET 1 /* set options */
32 #define IPC_STAT 2 /* get options */
35 #define IPC_INFO 3 /* See ipcs. */
39 * Macro to convert between ipc ids and array indices or sequence ids.
41 #if defined(_NETBSD_SOURCE)
42 #define IXSEQ_TO_IPCID(ix,perm) (((perm._seq) << 16) | (ix & 0xffff))
45 #include <sys/cdefs.h>
48 key_t
ftok(const char *, int);
51 #endif /* !_SYS_IPC_H_ */