46 _Atomic _Bool is_busy;
82 uint8_t num_copy_handles;
83 uint8_t num_move_handles;
123 uint32_t num_buffers;
127 size_t raw_data_size;
129 uint8_t num_copy_handles;
130 uint8_t num_move_handles;
145 uint32_t num_copy_handles;
146 uint32_t num_move_handles;
147 uint32_t num_objects;
235 uint16_t message_type;
237 uint32_t num_x_descriptors;
238 uint32_t num_a_descriptors;
239 uint32_t num_b_descriptors;
240 uint32_t num_w_descriptors;
241 uint32_t c_descriptor_flags;
242 uint32_t *x_descriptors;
243 uint32_t *a_descriptors;
244 uint32_t *b_descriptors;
245 uint32_t *w_descriptors;
246 uint32_t *c_descriptors;
247 uint32_t num_copy_handles;
248 uint32_t num_move_handles;
Hexdump responses that could not be unpacked.
Definition: ipc.h:219
Represents the server side of an IPC object.
Definition: ipcserver.h:30
handle_t * copy_handles
Array to be populated with the expected amount of incoming copy handles.
Definition: ipc.h:110
handle_t * copy_handles
points to original ipc buffer
Definition: ipc.h:249
bool send_pid
Whether to expect an incoming PID.
Definition: ipc.h:105
handle_t * copy_handles
Array of num_copy_handles handles to be copied.
Definition: ipc.h:85
ipc_object_t * objects
Array of num_objects objects to be referenced.
Definition: ipc.h:87
bool close_object
Whether or not to close the domain object. You should use ipc_close instead of this.
Definition: ipc.h:88
ipc_response_t ipc_default_response
An IPC response with default values set.
handle_t * move_handles
points to original ipc buffer
Definition: ipc.h:250
struct ipc_server_object_t ** objects
Array to be populated with the expected amount of points to objects referenced by the request...
Definition: ipc.h:112
bool is_borrowed
whether or not this object is being borrowed from a loader or not
Definition: ipc.h:38
size_t raw_data_size
size in bytes of raw_data
Definition: ipc.h:152
result_t ipc_convert_to_multi(ipc_multi_session_t *multi, ipc_object_t *object)
Converts a session to a multi session.
int post_padding
size of padding (in words) after aligned data section
Definition: ipc.h:254
Describes an incoming IPC message. Used as an intermediate during unpacking.
Definition: ipc.h:234
ipc_domain_t * domain
object_id >= 0
Definition: ipc.h:36
result_t ipc_unpack(uint32_t *buffer, ipc_message_t *msg)
Unpacks the IPC message from buffer, filling out msg.
ipc_buffer_t ** buffers
This should point to an array of num_buffers buffers.
Definition: ipc.h:77
size_t raw_data_size
Size in bytes of raw_data.
Definition: ipc.h:80
ipc_request_t ipc_default_request
An IPC request with default values set.
result_t ipc_clone_current_object(ipc_object_t source, ipc_object_t *clone)
Clones a session.
uint32_t result_t
Function result.
Definition: types.h:51
Hexdump requests that triggered an error in svcSendSyncRequest.
Definition: ipc.h:221
Represents an unmarshalled outgoing IPC response.
Definition: ipc.h:121
handle_t session_h
Session handle.
Definition: types.h:42
Hexdump responses that could not be unflattened.
Definition: ipc.h:220
ipc_response_fmt_t ipc_default_response_fmt
An IPC response format with default values set.
result_t ipc_close_domain(ipc_domain_t domain)
Closes the whole domain
ipc_buffer_t ** buffers
This should point to an array of num_buffers buffers, with the type fields filled out...
Definition: ipc.h:102
Represents either an object within an IPC domain or a standalone object.
Definition: ipc.h:32
session_h session
object_id = -1
Definition: ipc.h:35
handle_t * move_handles
Array of num_move_handles handles to be moved.
Definition: ipc.h:86
uint32_t num_buffers
Number of buffers to expect.
Definition: ipc.h:101
size_t raw_data_size
Size in bytes of raw_data to expect.
Definition: ipc.h:104
result_t ipc_convert_to_domain(ipc_object_t *session, ipc_domain_t *domain)
Converts session to a domain object and initializes domain. domain is only initialized if RESULT_OK i...
ipc_request_fmt_t ipc_default_request_fmt
An IPC request format with default values set.
Describes format expectations for an incoming IPC response.
Definition: ipc.h:144
uint64_t * pid
Where to put an incoming PID, if one is expected and present.
Definition: ipc.h:106
Describes format expectations for an incoming IPC request.
Definition: ipc.h:100
result_t ipc_close_multi(ipc_multi_session_t *multi)
Closes a multi session.
uint8_t num_move_handles
How many handles to expect to be moved.
Definition: ipc.h:108
ipc_object_t ipc_null_object
An IPC object with default NULL values set.
handle_t * move_handles
Array to be populated with the expected amount of incoming move handles.
Definition: ipc.h:111
result_t ipc_send(ipc_object_t object, ipc_request_t *rq, ipc_response_fmt_t *rs)
Send a request described by rq to object and then unpack the response.
uint32_t handle_t
Resource handle.
Definition: types.h:38
result_t ipc_pack_response(uint32_t *buffer, const ipc_response_t *rs, struct ipc_server_object_t *object)
Packs the IPC response described by rs and object into buffer.
Represents an unmarshalled outgoing IPC request.
Definition: ipc.h:74
uint8_t num_copy_handles
How many handles to expect to be copied.
Definition: ipc.h:107
Buffer for transfer over IPC.
Definition: ipc.h:62
result_t ipc_unflatten_response(ipc_message_t *msg, ipc_response_fmt_t *rs, ipc_object_t object)
Unflattens the IPC response described by rs from msg.
Do not log any IPC messages.
Definition: ipc.h:218
Hexdump all requests and all responses.
Definition: ipc.h:222
result_t ipc_unflatten_request(ipc_message_t *msg, ipc_request_fmt_t *rs, struct ipc_server_object_t *object)
Unflattens the IPC request described by rq from msg
result_t ipc_send_multi(ipc_multi_session_t *multi, ipc_request_t *rq, ipc_response_fmt_t *rs)
Send a requst described by rq to multi and then unpack the response See ipc_send. NOTE: may call mall...
void * raw_data
Buffer to copy raw request data into.
Definition: ipc.h:103
result_t ipc_close(ipc_object_t object)
Closes the object
ipc_debug_level_t ipc_debug_level
Default: IPC_DEBUG_LEVEL_NONE.
ipc_debug_level_t
Definition: ipc.h:217
uint64_t size
Size in bytes.
Definition: ipc.h:64
int32_t object_id
-1 if this represents a session, >= 0 if this represents a domain object
Definition: ipc.h:33
result_t ipc_pack_request(uint32_t *buffer, const ipc_request_t *rq, ipc_object_t object)
Packs the IPC request described by rq and object into buffer.
uint32_t raw_data_section_size
in words
Definition: ipc.h:236
uint32_t * data_section
may point to domain header, may point to SFCI/SFCO
Definition: ipc.h:255
Represents an IPC object domain.
Definition: ipc.h:24
A wrapper around a session that will clone it for use from multiple threads when necessary.
Definition: ipc.h:53
uint8_t num_objects
How many objects to expect to be referenced.
Definition: ipc.h:109
int pre_padding
size of padding (in words) before aligned data section
Definition: ipc.h:253