Added udsGetConnectionStatus().
This commit is contained in:
parent
9b5c1a3a6a
commit
72cb548cb0
@ -27,6 +27,14 @@ typedef struct {
|
|||||||
u32 word_x24;
|
u32 word_x24;
|
||||||
} udsNodeInfo;
|
} udsNodeInfo;
|
||||||
|
|
||||||
|
/// Connection status struct.
|
||||||
|
typedef struct {
|
||||||
|
u32 event_type;
|
||||||
|
u32 unk_x4[0x28>>2];
|
||||||
|
u8 id8;
|
||||||
|
u8 pad_x2d[3];
|
||||||
|
} udsConnectionStatus;
|
||||||
|
|
||||||
/// Network struct stored as big-endian.
|
/// Network struct stored as big-endian.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 host_macaddress[6];
|
u8 host_macaddress[6];
|
||||||
@ -291,6 +299,12 @@ Result udsUpdateNetworkAttribute(u16 bitmask, bool flag);
|
|||||||
*/
|
*/
|
||||||
Result udsSetNewConnectionsBlocked(bool block, bool clients, bool spectators);
|
Result udsSetNewConnectionsBlocked(bool block, bool clients, bool spectators);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This loads the current ConnectionStatus struct.
|
||||||
|
* @param output Output ConnectionStatus struct.
|
||||||
|
*/
|
||||||
|
Result udsGetConnectionStatus(udsConnectionStatus *output);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This loads a NodeInfo struct for the specified NetworkNodeID. The broadcast alias can't be used with this.
|
* @brief This loads a NodeInfo struct for the specified NetworkNodeID. The broadcast alias can't be used with this.
|
||||||
* @param NetworkNodeID Target NetworkNodeID.
|
* @param NetworkNodeID Target NetworkNodeID.
|
||||||
|
@ -371,6 +371,24 @@ Result udsDisconnectNetwork(void)
|
|||||||
return cmdbuf[1];
|
return cmdbuf[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result udsGetConnectionStatus(udsConnectionStatus *output)
|
||||||
|
{
|
||||||
|
u32* cmdbuf=getThreadCommandBuffer();
|
||||||
|
|
||||||
|
cmdbuf[0]=IPC_MakeHeader(0xB,0,0); // 0xB0000
|
||||||
|
|
||||||
|
Result ret=0;
|
||||||
|
if(R_FAILED(ret=svcSendSyncRequest(__uds_servhandle)))return ret;
|
||||||
|
ret = cmdbuf[1];
|
||||||
|
|
||||||
|
if(R_SUCCEEDED(ret))
|
||||||
|
{
|
||||||
|
if(output)memcpy(output, &cmdbuf[2], sizeof(udsConnectionStatus));
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
Result udsGetNodeInformation(u16 NetworkNodeID, udsNodeInfo *output)
|
Result udsGetNodeInformation(u16 NetworkNodeID, udsNodeInfo *output)
|
||||||
{
|
{
|
||||||
u32* cmdbuf=getThreadCommandBuffer();
|
u32* cmdbuf=getThreadCommandBuffer();
|
||||||
|
Loading…
Reference in New Issue
Block a user