shmid A shared memory identifier, a positive integer. It is created by the shmget() function and used to identify the shared memory segment on which to perform the control operation. cmd The control operation (IPC_STAT, IPC_SET, or IPC_RMID) to perform on the shared memory segment. For more information, see the Description. buf Pointer to a shmid_ds structre, defined in <shm.h> as follows: struct shmid_ds { struct ipc_perm shm_perm; /* permissions structure defined in <ipc.h> */ size_t shm_segsz; /* size of memory segment in bytes */ pid_t shm_lpid; /* Process ID of last memory operation */ pid_t shm_cpid; /* Process ID of segment creator */ shmatt_t shm_nattch; /* Number of current attaches */ time_t shm_atime; /* time of last shmat */ time_t shm_dtime; /* time of last shmdt */ time_t shm_ctime; /* time of last change */ }