]> Chaos Git - corbenik/ctrulib.git/commitdiff
Updated udsConnectionStatus and networkstruct. Removed total_nodes from udsNetworkSca...
authoryellows8 <yellows8@users.noreply.github.com>
Thu, 7 Apr 2016 17:06:23 +0000 (13:06 -0400)
committeryellows8 <yellows8@users.noreply.github.com>
Thu, 7 Apr 2016 17:06:23 +0000 (13:06 -0400)
libctru/include/3ds/services/uds.h
libctru/source/services/uds.c

index 70a20cdcd8cf8b4174152244694a7929a6829e9b..c5cac2fb2e4994aab4fa48a6266ce90c8feae5a4 100644 (file)
@@ -30,10 +30,15 @@ typedef struct {
 /// Connection status struct.
 typedef struct {
        u32 status;
-       u32 unk_x4[0x28>>2];
-       u8 val_x2c;
+       u32 unk_x4;
+       u16 cur_NetworkNodeID;//"u16 NetworkNodeID for this device."
+       u16 unk_xa;
+       u32 unk_xc[0x20>>2];
+
+       u8 total_nodes;
        u8 max_nodes;
-       u8 unk_x2e[2];
+       u8 node_bitmask;//"This is a bitmask of NetworkNodeIDs: bit0 for NetworkNodeID 0x1(host), bit1 for NetworkNodeID 0x2(first original client), and so on."
+       u8 unk_x2f;//"Padding maybe? Normally 0. "
 } udsConnectionStatus;
 
 /// Network struct stored as big-endian.
@@ -54,8 +59,10 @@ typedef struct {
        u8 unk_x15;
 
        u16 attributes;//See the UDSNETATTR enum values below.
-       u8 unk_x18[5];
 
+       u32 networkID;
+
+       u8 total_nodes;
        u8 max_nodes;
        u8 unk_x1e;
        u8 unk_x1f;
@@ -111,7 +118,6 @@ typedef struct {
 typedef struct {
        nwmBeaconDataReplyEntry datareply_entry;
        udsNetworkStruct network;
-       u32 total_nodes;//Total number of nodes actually connected to the network, including the host.
        udsNodeInfo nodes[UDS_MAXNODES];
 } udsNetworkScanInfo;
 
index 95743ea5fa0bc343cd7064f4b98aeca35e1e86b5..71909959f5fbdd18f25704c96c14b8354f979bec 100644 (file)
@@ -612,7 +612,6 @@ static Result usd_parsebeacon(u8 *buf, u32 size, udsNetworkScanInfo *networkscan
        u8 *tags_data[3] = {0};
        u32 tags_sizes[3] = {0};
        int tagindex;
-       u32 pos;
 
        u8 tmp_tagdata[0xfe*2];
 
@@ -708,13 +707,6 @@ static Result usd_parsebeacon(u8 *buf, u32 size, udsNetworkScanInfo *networkscan
        ret = udsipc_DecryptBeaconData(&networkscan->network, tmp_tagdata, &tmp_tagdata[0xfe], networkscan->nodes);
        if(R_FAILED(ret))return ret;
 
-       for(pos=0; pos<UDS_MAXNODES; pos++)
-       {
-               if(!udsCheckNodeInfoInitialized(&networkscan->nodes[pos]))break;
-
-               networkscan->total_nodes++;
-       }
-
        return 0;
 }