diff --git a/libctru/include/3ds/svc.h b/libctru/include/3ds/svc.h index 2ad49f1..baed48a 100644 --- a/libctru/include/3ds/svc.h +++ b/libctru/include/3ds/svc.h @@ -893,6 +893,13 @@ Result svcArbitrateAddress(Handle arbiter, u32 addr, ArbitrationType type, s32 v */ Result svcSendSyncRequest(Handle session); +/** + * @brief Connects to a port via a handle. + * @param[out] clientSession Pointer to output the client session handle to. + * @param clientPort Port client endpoint to connect to. + */ +Result svcCreateSessionToPort(Handle* clientSession, Handle clientPort); + /** * @brief Creates a linked pair of session endpoints. * @param[out] serverSession Pointer to output the created server endpoint handle to. diff --git a/libctru/source/svc.s b/libctru/source/svc.s index bfc561a..7932ddd 100644 --- a/libctru/source/svc.s +++ b/libctru/source/svc.s @@ -416,6 +416,14 @@ SVC_BEGIN svcCreatePort bx lr SVC_END +SVC_BEGIN svcCreateSessionToPort + push {r0} + svc 0x48 + pop {r2} + str r1, [r2] + bx lr +SVC_END + SVC_BEGIN svcCreateSession push {r0, r1} svc 0x49