From 17ebe4104ada5c78578b69923342de3236ad8f8d Mon Sep 17 00:00:00 2001 From: yellows8 Date: Sun, 24 May 2020 12:34:43 -0400 Subject: [PATCH] ldn: Updated structs. --- nx/include/switch/services/ldn.h | 4 ++-- nx/source/services/ldn.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nx/include/switch/services/ldn.h b/nx/include/switch/services/ldn.h index f29a4ead..1da556c7 100644 --- a/nx/include/switch/services/ldn.h +++ b/nx/include/switch/services/ldn.h @@ -144,7 +144,7 @@ typedef struct { u16 advertise_data_size; ///< AdvertiseData size (\ref ldnSetAdvertiseData) u8 advertise_data[0x180]; ///< AdvertiseData (\ref ldnSetAdvertiseData) u8 reserved_x3EC[0x8C]; ///< Reserved - u64 unk_x478; ///< Unknown + u64 auth_id; ///< Random AuthenticationId. } LdnNetworkInfo; /// ScanFilter. The input struct is copied to a tmp struct, which is then used with the cmd (\ref ldnScan and \ref ldnScanPrivate). @@ -178,7 +178,7 @@ typedef struct { typedef struct { s64 local_communication_id; ///< LdnNetworkInfo::local_communication_id. \ref ldnCreateNetwork, \ref ldnCreateNetworkPrivate, \ref ldnConnect, \ref ldnConnectPrivate: When -1, this is overwritten with the first LocalCommunicationId from the user-process control.nacp, if loading fails value 0 is written instead. Otherwise when not -1, if control.nacp loading is successful, this field must match one of the LocalCommunicationIds from there. u8 reserved_x8[2]; ///< Cleared to zero for the tmp struct. - u16 unk_xA; ///< LdnNetworkInfo::unk_xA + u16 userdata_filter; ///< LdnNetworkInfo::userdata_filter u8 reserved_xC[4]; ///< Cleared to zero for the tmp struct. s16 network_channel; ///< LdnNetworkInfo::network_channel. Channel, can be zero. Overwritten internally by \ref ldnCreateNetwork. s8 participant_max; ///< LdnNetworkInfo::participant_max. \ref ldnCreateNetwork / \ref ldnCreateNetworkPrivate: Must be 0x1-0x8. diff --git a/nx/source/services/ldn.c b/nx/source/services/ldn.c index c04e0e5a..0dd55265 100644 --- a/nx/source/services/ldn.c +++ b/nx/source/services/ldn.c @@ -220,7 +220,7 @@ static void _ldnCopyNetworkConfig(const LdnNetworkConfig *in, LdnNetworkConfig * memset(out, 0, sizeof(*out)); out->local_communication_id = in->local_communication_id; - out->unk_xA = in->unk_xA; + out->userdata_filter = in->userdata_filter; out->network_channel = in->network_channel; out->participant_max = in->participant_max; out->local_communication_version = in->local_communication_version;