/// 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.
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;
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;
u8 *tags_data[3] = {0};
u32 tags_sizes[3] = {0};
int tagindex;
- u32 pos;
u8 tmp_tagdata[0xfe*2];
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;
}