|
Monado OpenXR Runtime
|
Wrapper for a socket and flags. More...
#include </builds/monado/monado/src/xrt/ipc/shared/ipc_message_channel.h>

Public Member Functions | |
| void | ipc_message_channel_close (struct ipc_message_channel *imc) |
| Close an IPC message channel. More... | |
| xrt_result_t | ipc_send (struct ipc_message_channel *imc, const void *data, size_t size) |
| Send a bare message over the IPC channel. More... | |
| xrt_result_t | ipc_receive (struct ipc_message_channel *imc, void *out_data, size_t size) |
| Receive a bare message over the IPC channel. More... | |
File Descriptor or HANDLE utilities | |
These are typically called from within the send/receive_handles functions. | |
| xrt_result_t | ipc_receive_fds (struct ipc_message_channel *imc, void *out_data, size_t size, int *out_fds, uint32_t fd_count) |
| Receive a message along with a known number of file descriptors over the IPC channel. More... | |
| xrt_result_t | ipc_send_fds (struct ipc_message_channel *imc, const void *data, size_t size, const int *fds, uint32_t fd_count) |
| Send a message along with file descriptors over the IPC channel. More... | |
Shared memory handle utilities | |
Send/receive shared memory handles along with scalar/aggregate message data. | |
| xrt_result_t | ipc_receive_handles_shmem (struct ipc_message_channel *imc, void *out_data, size_t size, xrt_shmem_handle_t *out_handles, uint32_t handle_count) |
| Receive a message along with a known number of shared memory handles over the IPC channel. More... | |
| xrt_result_t | ipc_send_handles_shmem (struct ipc_message_channel *imc, const void *data, size_t size, const xrt_shmem_handle_t *handles, uint32_t handle_count) |
| Send a message along with shared memory handles over the IPC channel. More... | |
Graphics buffer handle utilities | |
Send/receive graphics buffer handles along with scalar/aggregate message data. | |
| xrt_result_t | ipc_receive_handles_graphics_buffer (struct ipc_message_channel *imc, void *out_data, size_t size, xrt_graphics_buffer_handle_t *out_handles, uint32_t handle_count) |
| Receive a message along with a known number of graphics buffer handles over the IPC channel. More... | |
| xrt_result_t | ipc_send_handles_graphics_buffer (struct ipc_message_channel *imc, const void *data, size_t size, const xrt_graphics_buffer_handle_t *handles, uint32_t handle_count) |
| Send a message along with native graphics buffer handles over the IPC channel. More... | |
| xrt_result_t | ipc_receive_handles_graphics_sync (struct ipc_message_channel *imc, void *out_data, size_t size, xrt_graphics_sync_handle_t *out_handles, uint32_t handle_count) |
| Receive a message along with a known number of graphics sync handles over the IPC channel. More... | |
| xrt_result_t | ipc_send_handles_graphics_sync (struct ipc_message_channel *imc, const void *data, size_t size, const xrt_graphics_sync_handle_t *handles, uint32_t handle_count) |
| Send a message along with native graphics sync handles over the IPC channel. More... | |
Data Fields | |
| xrt_ipc_handle_t | ipc_handle |
| enum u_logging_level | log_level |
Wrapper for a socket and flags.
| void ipc_message_channel_close | ( | struct ipc_message_channel * | imc | ) |
Close an IPC message channel.
Referenced by ipc_client_connection_fini().
| xrt_result_t ipc_receive | ( | struct ipc_message_channel * | imc, |
| void * | out_data, | ||
| size_t | size | ||
| ) |
Receive a bare message over the IPC channel.
There are other functions if you have handles, not just scalar/aggregate data.
| imc | Message channel to use | |
| [out] | out_data | Pointer to the buffer to fill with data. Must not be null. |
| [in] | size | Maximum size to read, must be greater than 0 |
| xrt_result_t ipc_receive_fds | ( | struct ipc_message_channel * | imc, |
| void * | out_data, | ||
| size_t | size, | ||
| int * | out_fds, | ||
| uint32_t | fd_count | ||
| ) |
Receive a message along with a known number of file descriptors over the IPC channel.
| imc | Message channel to use | |
| [out] | out_data | Pointer to the buffer to fill with data. Must not be null. |
| [in] | size | Maximum size to read, must be greater than 0 |
| [out] | out_fds | Array of file descriptors to populate. Must not be null. |
| [in] | fd_count | Number of elements to receive into out_fds, must be greater than 0 and must match the value provided at the other end. |
Referenced by ipc_receive_handles_shmem().
| xrt_result_t ipc_receive_handles_graphics_buffer | ( | struct ipc_message_channel * | imc, |
| void * | out_data, | ||
| size_t | size, | ||
| xrt_graphics_buffer_handle_t * | out_handles, | ||
| uint32_t | handle_count | ||
| ) |
Receive a message along with a known number of graphics buffer handles over the IPC channel.
| imc | Message channel to use | |
| [out] | out_data | Pointer to the buffer to fill with data. Must not be null. |
| [in] | size | Maximum size to read, must be greater than 0 |
| [out] | out_handles | Array of graphics buffer handles to populate. Must not be null. |
| [in] | handle_count | Number of elements to receive into out_handles, must be greater than 0 and must match the value provided at the other end. |
| xrt_result_t ipc_receive_handles_graphics_sync | ( | struct ipc_message_channel * | imc, |
| void * | out_data, | ||
| size_t | size, | ||
| xrt_graphics_sync_handle_t * | out_handles, | ||
| uint32_t | handle_count | ||
| ) |
Receive a message along with a known number of graphics sync handles over the IPC channel.
| imc | Message channel to use | |
| [out] | out_data | Pointer to the sync to fill with data. Must not be null. |
| [in] | size | Maximum size to read, must be greater than 0 |
| [out] | out_handles | Array of graphics sync handles to populate. Must not be null. |
| [in] | handle_count | Number of elements to receive into out_handles, must be greater than 0 and must match the value provided at the other end. |
| xrt_result_t ipc_receive_handles_shmem | ( | struct ipc_message_channel * | imc, |
| void * | out_data, | ||
| size_t | size, | ||
| xrt_shmem_handle_t * | out_handles, | ||
| uint32_t | handle_count | ||
| ) |
Receive a message along with a known number of shared memory handles over the IPC channel.
| imc | Message channel to use | |
| [out] | out_data | Pointer to the buffer to fill with data. Must not be null. |
| [in] | size | Maximum size to read, must be greater than 0 |
| [out] | out_handles | Array of shared memory handles to populate. Must not be null. |
| [in] | handle_count | Number of elements to receive into out_handles, must be greater than 0 and must match the value provided at the other end. |
References ipc_receive_fds().
| xrt_result_t ipc_send | ( | struct ipc_message_channel * | imc, |
| const void * | data, | ||
| size_t | size | ||
| ) |
Send a bare message over the IPC channel.
There are other functions if you have handles, not just scalar/aggregate data.
| imc | Message channel to use | |
| [in] | data | Pointer to the data buffer to send. Must not be null: use a filler message if necessary. |
| [in] | size | Size of data pointed-to by data, must be greater than 0 |
| xrt_result_t ipc_send_fds | ( | struct ipc_message_channel * | imc, |
| const void * | data, | ||
| size_t | size, | ||
| const int * | fds, | ||
| uint32_t | fd_count | ||
| ) |
Send a message along with file descriptors over the IPC channel.
| imc | Message channel to use | |
| [in] | data | Pointer to the data buffer to send. Must not be null: use a filler message if necessary. |
| [in] | size | Size of data pointed-to by data, must be greater than 0. |
| [out] | fds | Array of file descriptors to send. Must not benull. |
| [in] | fd_count | Number of elements in fds, must be greater than 0. If this is variable, it must also be separately transmitted ahead of time, because the receiver must have the same value in its receive call. |
| xrt_result_t ipc_send_handles_graphics_buffer | ( | struct ipc_message_channel * | imc, |
| const void * | data, | ||
| size_t | size, | ||
| const xrt_graphics_buffer_handle_t * | handles, | ||
| uint32_t | handle_count | ||
| ) |
Send a message along with native graphics buffer handles over the IPC channel.
| imc | Message channel to use | |
| [in] | data | Pointer to the data buffer to send. Must not be null: use a filler message if necessary. |
| [in] | size | Size of data pointed-to by data, must be greater than 0 |
| [out] | handles | Array of graphics buffer handles to send. Must not be null. |
| [in] | handle_count | Number of elements in handles, must be greater than 0. If this is variable, it must also be separately transmitted ahead of time, because the receiver must have the same value in its receive call. |
| xrt_result_t ipc_send_handles_graphics_sync | ( | struct ipc_message_channel * | imc, |
| const void * | data, | ||
| size_t | size, | ||
| const xrt_graphics_sync_handle_t * | handles, | ||
| uint32_t | handle_count | ||
| ) |
Send a message along with native graphics sync handles over the IPC channel.
| imc | Message channel to use | |
| [in] | data | Pointer to the data sync to send. Must not be null: use a filler message if necessary. |
| [in] | size | Size of data pointed-to by data, must be greater than 0 |
| [out] | handles | Array of graphics sync handles to send. Must not be null. |
| [in] | handle_count | Number of elements in handles, must be greater than 0. If this is variable, it must also be separately transmitted ahead of time, because the receiver must have the same value in its receive call. |
| xrt_result_t ipc_send_handles_shmem | ( | struct ipc_message_channel * | imc, |
| const void * | data, | ||
| size_t | size, | ||
| const xrt_shmem_handle_t * | handles, | ||
| uint32_t | handle_count | ||
| ) |
Send a message along with shared memory handles over the IPC channel.
| imc | Message channel to use | |
| [in] | data | Pointer to the data buffer to send. Must not be null: use a filler message if necessary. |
| [in] | size | Size of data pointed-to by data, must be greater than 0 |
| [out] | handles | Array of shared memory handles to send. Must not be null. |
| [in] | handle_count | Number of elements in handles, must be greater than 0. If this is variable, it must also be separately transmitted ahead of time, because the receiver must have the same value in its receive call. |