Get IPC information for a requested workload partition.
#include <sys/ipc_info.h>
int get_ipc_info(cid, cmd, version, buffer, size)
cid_t cid;
int cmd;
int version;
char * buffer;
int * size;
The get_ipc_info subroutine returns IPC information for the associated workload partition ID and copies it to the address specified for the buffer parameter. If cid parameter is zero, then the IPC information of the workload partition that is associated to the current process is returned. Based on the command specified for cmd that is requested, an array of corresponding structures will be copied to the address starting at the address specified for buffer. The number of array structures depends on the number of IPC objects of the requested type that are present.
The value specified for the cid parameter is not used as input to the GET_IPCINFO_SHM_ALL, GET_IPCINFO_MSG_ALL, and GET_IPCINFO_SEM_ALL commands. These commands are useful from the global workload partition to return IPC information for all workload partitions on the system.
If the value for the size parameter on input is smaller than the data to be returned, then ENOSPC is returned and the value for the size parameter is set to the actual size needed.
Item | Description |
---|---|
cid | Specifies the workload partition ID. |
cmd | Specifies which request command to perform. See cmd types for a list of possible commands. |
version | Specifies which version of the request structure to return. Valid versions are specified in the sys/ipc_info.h header file. |
buffer | Specifies the starting address for the requested IPC structures. |
size | Specifies the maximum number of bytes to return. |
Cmd types
The cmd parameter is supplied on input and describes the type of IPC information to return. The following cmd types are supported:
Item | Description |
---|---|
GET_IPCINFO_SHM | Returns shared memory structures ipcinfo_shm_t for the requested workload partition. |
GET_IPCINFO_MSG | Returns message queue structures ipcinfo_msg_t for the requested workload partition. |
GET_IPCINFO_SEM | Returns semaphore structures ipcinfo_sem_t for the requested workload partition. |
GET_IPCINFO_RTSHM | Returns POSIX shared memory structures ipcinfo_rtshm_t for the requested workload partition. |
GET_IPCINFO_RTMSG | Returns POSIX message queue structures ipcinfo_rtmq_t for the requested workload partition. |
GET_IPCINFO_RTSEM | Returns POSIX semaphore structures ipcinfo_rtsem_t for the requested workload partition. |
GET_IPCINFO_SHM_ALL | Returns all shared memory structures ipcinfo_shm_t that are accessible by the current process. |
GET_IPCINFO_MSG_ALL | Returns all message queue structures ipcinfo_msg_t that are accessible by the current process. |
GET_IPCINFO_SEM_ALL | Returns all semaphore structures ipcinfo_sem_t that are accessible by the current process. |
Process environment only.
Item | Description |
---|---|
0 | The command completed successfully. |
EPERM | Error indicating the current process does not have permission to retrieve workload partition information for the WPAR ID specified for the cid parameter. |
EINVAL | Invalid value specified for the cmd, version, or cid parameters. |
EFAULT | Error during the copyout to user space. |
ENOSPC | Size for the buffer parameter that is indicated by the size parameter is smaller than the data to be returned. |