mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-20 20:22:38 +02:00
ldn: Added ldnSetProtocol.
This commit is contained in:
parent
0a4ac1b87c
commit
dfee0c8ba2
@ -67,6 +67,12 @@ typedef enum {
|
||||
LdnWirelessControllerRestriction_Unknown1 = 1, ///< Unknown
|
||||
} LdnWirelessControllerRestriction;
|
||||
|
||||
/// Protocol
|
||||
typedef enum {
|
||||
LdnProtocol_NX = 1, ///< NX (default)
|
||||
LdnProtocol_Unknown3 = 3, ///< (NXAndOunce?)
|
||||
} LdnProtocol;
|
||||
|
||||
/// Ipv4Address. This is essentially the same as struct in_addr - hence this can be used with standard sockets (byteswap required).
|
||||
typedef struct {
|
||||
u32 addr; ///< Address
|
||||
@ -331,6 +337,13 @@ Result ldnScanPrivate(s32 channel, const LdnScanFilter *filter, LdnNetworkInfo *
|
||||
*/
|
||||
Result ldnSetWirelessControllerRestriction(LdnWirelessControllerRestriction restriction);
|
||||
|
||||
/**
|
||||
* @brief SetProtocol
|
||||
* @note This is only usable with [20.0.0+] (with [18.0.0-19-0.1] this is available but not usable).
|
||||
* @param[in] protocol \ref LdnProtocol
|
||||
*/
|
||||
Result ldnSetProtocol(LdnProtocol protocol);
|
||||
|
||||
/**
|
||||
* @brief OpenAccessPoint
|
||||
* @note \ref LdnState must be ::LdnState_Initialized, this eventually sets the State to ::LdnState_AccessPointOpened.
|
||||
|
@ -289,6 +289,13 @@ Result ldnSetWirelessControllerRestriction(LdnWirelessControllerRestriction rest
|
||||
return _ldnCmdInU32NoOut(&g_ldnSrv, restriction, 104);
|
||||
}
|
||||
|
||||
Result ldnSetProtocol(LdnProtocol protocol) {
|
||||
if (hosversionBefore(18,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
return _ldnCmdInU32NoOut(&g_ldnSrv, protocol, 106);
|
||||
}
|
||||
|
||||
Result ldnOpenAccessPoint(void) {
|
||||
return _ldnCmdNoIO(&g_ldnSrv, 200);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user