The interface snx::ctr::srv of srv.swipc, the service srv:. 3 commands; the handlers are in src/3ds/services.
CTR word-ordered commands, not Switch HIPC/CMIF.
command 0x1: request 0x00010002, response 0x00010040
| Word | Contents |
|---|---|
| 0 | header 0x00010002: command 0x1, 0 normal words, 2 translated |
| 1 | 0x20: the calling process's ID follows |
| 2 | process: the caller's process ID, which the kernel writes over the client's word |
| Word | Contents |
|---|---|
| 0 | header 0x00010040: command 0x1, 1 normal word, 0 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
uint32_t snx_ctr_srv_RegisterClient(SnxCtrIpc* c, uint32_t a_process)
command 0x2: request 0x00020000, response 0x00020042
| Word | Contents |
|---|---|
| 0 | header 0x00020000: command 0x2, 0 normal words, 0 translated |
| Word | Contents |
|---|---|
| 0 | header 0x00020042: command 0x2, 1 normal word, 2 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
| 2 | 0x0: copied handle, 1 |
| 3 | semaphore: handle<copy> |
uint32_t snx_ctr_srv_EnableNotification(SnxCtrIpc* c, uint32_t* a_semaphore)
command 0x5: request 0x00050100, response 0x00050042
| Word | Contents |
|---|---|
| 0 | header 0x00050100: command 0x5, 4 normal words, 0 translated |
| 1 | name, bytes 0-3: bytes<8> |
| 2 | name, bytes 4-7: bytes<8> |
| 3 | length: u32 |
| 4 | flags: u32 |
| Word | Contents |
|---|---|
| 0 | header 0x00050042: command 0x5, 1 normal word, 2 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
| 2 | 0x10: moved handle, 1 |
| 3 | session: handle<move, session> |
uint32_t snx_ctr_srv_GetServiceHandle(SnxCtrIpc* c, const uint8_t* a_name, uint32_t a_length, uint32_t a_flags, uint32_t* a_session)
Made from ScarletNX's Sail at 166ad3910f80. The schemas and the handlers are ScarletNX's (GPL-3.0-or-later).