78 |
7u83 |
1 |
#ifndef __TENDRA_IPC_H
|
|
|
2 |
#define __TENDRA_IPC_H
|
|
|
3 |
|
|
|
4 |
#include <sys/types.h>
|
|
|
5 |
|
|
|
6 |
struct ipc_perm {
|
|
|
7 |
uid_t cuid; /* creator user id */
|
|
|
8 |
gid_t cgid; /* creator group id */
|
|
|
9 |
uid_t uid; /* user id */
|
|
|
10 |
gid_t gid; /* group id */
|
|
|
11 |
mode_t mode; /* r/w permission */
|
|
|
12 |
unsigned short seq; /* sequence # (to generate unique ipcid) */
|
|
|
13 |
key_t key; /* user specified msg/sem/shm key */
|
|
|
14 |
};
|
|
|
15 |
|
|
|
16 |
#if __BSD_VISIBLE
|
|
|
17 |
/* common mode bits */
|
|
|
18 |
#define IPC_R 000400 /* read permission */
|
|
|
19 |
#define IPC_W 000200 /* write/alter permission */
|
|
|
20 |
#define IPC_M 010000 /* permission to change control info */
|
|
|
21 |
#endif
|
|
|
22 |
|
|
|
23 |
/* SVID 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 */
|
|
|
27 |
|
|
|
28 |
#define IPC_PRIVATE (key_t)0 /* private key */
|
|
|
29 |
|
|
|
30 |
#define IPC_RMID 0 /* remove identifier */
|
|
|
31 |
#define IPC_SET 1 /* set options */
|
|
|
32 |
#define IPC_STAT 2 /* get options */
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
#endif
|