struct ipc_perm { unsigned short cuid; /* creator uid */ unsigned short cgid; /* creator group id */ unsigned short uid; /* user id */ unsigned short gid; /* group id */ unsigned short mode; /* R/W permission */ }; struct shmid_ds { struct ipc_perm shm_perm; /* operation permission structure */ int shm_segsz; /* size of segment */ unsigned short shm_cpid; /* creator pid */ unsigned short shm_lpid; /* pid of last operation */ unsigned short shm_nattach; /* number of current attaches*/ long shm_atime; /* last attach time */ long shm_dtime; /* last detach time */ long shm_ctime; /* last change time */ /* times measured in secs since */ /* 00:00:00 GMT Jan. 1, 1970 */ }; #define IPC_STAT 0 #define IPC_SET 1 #define IPC_RMID 2