u32 word_x24;
} 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.
typedef struct {
u8 host_macaddress[6];
*/
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.
* @param NetworkNodeID Target NetworkNodeID.
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)
{
u32* cmdbuf=getThreadCommandBuffer();