From 07ba98b702daa36d6ab0940fdaa405395e7b81b7 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Mon, 18 May 2020 16:02:41 -0400 Subject: [PATCH] ldn: Filled in LdnAcceptPolicy, updated LdnNetworkInfo, and updated docs. --- nx/include/switch/services/ldn.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nx/include/switch/services/ldn.h b/nx/include/switch/services/ldn.h index b8ea9eaa..e9587e80 100644 --- a/nx/include/switch/services/ldn.h +++ b/nx/include/switch/services/ldn.h @@ -49,10 +49,10 @@ typedef enum { /// AcceptPolicy typedef enum { - LdnAcceptPolicy_Unknown0 = 0, ///< Unknown - LdnAcceptPolicy_Unknown1 = 1, ///< Unknown - LdnAcceptPolicy_Unknown2 = 2, ///< Unknown - LdnAcceptPolicy_Unknown3 = 3, ///< Unknown + LdnAcceptPolicy_AllowAll = 0, ///< Allow all. + LdnAcceptPolicy_DenyAll = 1, ///< Deny all. + LdnAcceptPolicy_Blacklist = 2, ///< Blacklist, addresses in the list (\ref ldnAddAcceptFilterEntry) are not allowed. + LdnAcceptPolicy_Whitelist = 3, ///< Whitelist, only addresses in the list (\ref ldnAddAcceptFilterEntry) are allowed. } LdnAcceptPolicy; /// OperationMode @@ -132,9 +132,9 @@ typedef struct { s8 link_level; ///< LinkLevel u8 unk_x4B; ///< Unknown. Set to hard-coded value 0x2 with output structs, except with \ref ldnScan / \ref ldnScanPrivate which can also set value 0x1 in certain cases. u8 pad_x4C[0x4]; ///< Padding - u8 unk_x50[0x10]; ///< LdnSecurityParameter::data + u8 sec_param_data[0x10]; ///< LdnSecurityParameter::data u16 sec_type; ///< LdnSecurityConfig::type - u8 unk_x62; ///< Unknown + u8 accept_policy; ///< \ref LdnAcceptPolicy u8 pad_x63[0x3]; ///< Padding s8 participant_max; ///< Maximum participants, for nodes. u8 participant_num; ///< ParticipantNum, number of set entries in nodes. If unk_x4B is not 0x2, ParticipantNum should be handled as if it's 0. @@ -397,6 +397,7 @@ Result ldnSetStationAcceptPolicy(LdnAcceptPolicy policy); /** * @brief AddAcceptFilterEntry * @note \ref LdnState must be ::LdnState_AccessPointOpened or ::LdnState_AccessPointCreated. + * @note See \ref LdnAcceptPolicy. * @param[in] addr \ref LdnMacAddress. If you want, you can also pass LdnNodeInfo::mac_addr for this. */ Result ldnAddAcceptFilterEntry(LdnMacAddress addr);