libnx v4.10.0
Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations
ldn.h File Reference

LDN (local network communications) IPC wrapper. More...

#include "../types.h"
#include "../sf/service.h"
#include "../kernel/event.h"

Go to the source code of this file.

Data Structures

struct  LdnIpv4Address
 Ipv4Address. This is essentially the same as struct in_addr - hence this can be used with standard sockets (byteswap required). More...
 
struct  LdnSubnetMask
 SubnetMask. This is essentially the same as struct in_addr - hence this can be used with standard sockets (byteswap required). More...
 
struct  LdnMacAddress
 MacAddress. More...
 
struct  LdnSsid
 Ssid. More...
 
struct  LdnNodeLatestUpdate
 NodeLatestUpdate. More...
 
struct  LdnAddressEntry
 AddressEntry. More...
 
struct  LdnNodeInfo
 NodeInfo. More...
 
struct  LdnUserConfig
 UserConfig. The input struct is copied to a tmp struct, which is then used with the cmd. More...
 
struct  LdnIntentId
 IntentId. More...
 
struct  LdnSessionId
 SessionId. More...
 
struct  LdnNetworkId
 NetworkId. More...
 
struct  LdnCommonNetworkInfo
 CommonNetworkInfo. More...
 
struct  LdnNetworkInfo
 NetworkInfo. More...
 
struct  LdnScanFilter
 ScanFilter. ldnScan / ldnScanPrivate will only return the LdnNetworkInfo when validating the LdnNetworkInfo with LdnScanFilter was sucessful, with the fields enabled by LdnScanFilterFlag. More...
 
struct  LdnSecurityConfig
 SecurityConfig. More...
 
struct  LdnSecurityParameter
 SecurityParameter. The struct used by ldnCreateNetwork internally is randomly-generated. More...
 
struct  LdnNetworkConfig
 NetworkConfig. The input struct is copied to a tmp struct, which is then used with the cmd (ldnCreateNetwork, ldnCreateNetworkPrivate, ldnConnectPrivate). More...
 
struct  LdnActionFrameSettings
 ActionFrameSettings. More...
 

Macros

#define LDN_PRIORITY_SYSTEM   0x38
 System priority for __nx_ldn_priority.
 
#define LDN_PRIORITY_USER   0x5A
 User priority for __nx_ldn_priority.
 

Enumerations

enum  LdnServiceType {
  LdnServiceType_User = 0 ,
  LdnServiceType_System = 1
}
 
enum  LdnState {
  LdnState_None = 0 ,
  LdnState_Initialized = 1 ,
  LdnState_AccessPoint = 2 ,
  LdnState_AccessPointCreated = 3 ,
  LdnState_Station = 4 ,
  LdnState_StationConnected = 5 ,
  LdnState_Error = 6
}
 State loaded by ldnmGetStateForMonitor / ldnGetState. More...
 
enum  LdnDisconnectReason {
  LdnDisconnectReason_None = 0 ,
  LdnDisconnectReason_DisconnectedByUser = 1 ,
  LdnDisconnectReason_DisconnectedBySystem = 2 ,
  LdnDisconnectReason_DestroyedByUser = 3 ,
  LdnDisconnectReason_DestroyedBySystem = 4 ,
  LdnDisconnectReason_Rejected = 5 ,
  LdnDisconnectReason_SignalLost = 6
}
 DisconnectReason loaded by ldnGetDisconnectReason. More...
 
enum  LdnScanFilterFlag {
  LdnScanFilterFlag_LocalCommunicationId = (1U<<( 0 )) ,
  LdnScanFilterFlag_SessionId = (1U<<( 1 )) ,
  LdnScanFilterFlag_NetworkType = (1U<<( 2 )) ,
  LdnScanFilterFlag_Bssid = (1U<<( 3 )) ,
  LdnScanFilterFlag_Ssid = (1U<<( 4 )) ,
  LdnScanFilterFlag_SceneId = (1U<<( 5 )) ,
  LdnScanFilterFlag_IntentId = LdnScanFilterFlag_LocalCommunicationId | LdnScanFilterFlag_SceneId ,
  LdnScanFilterFlag_NetworkId = LdnScanFilterFlag_IntentId | LdnScanFilterFlag_SessionId
}
 ScanFilterFlag. More...
 
enum  LdnAcceptPolicy {
  LdnAcceptPolicy_AlwaysAccept = 0 ,
  LdnAcceptPolicy_AlwaysReject = 1 ,
  LdnAcceptPolicy_BlackList = 2 ,
  LdnAcceptPolicy_WhiteList = 3
}
 AcceptPolicy. More...
 
enum  LdnSecurityMode {
  LdnSecurityMode_Any = 0 ,
  LdnSecurityMode_Product = 1 ,
  LdnSecurityMode_Debug = 2 ,
  LdnSecurityMode_SystemDebug = 3
}
 SecurityMode. LdnSecurityMode_Product can be used as the default value. The ldn cmds which use an input SecurityMode normally overwrite the SecurityMode. More...
 
enum  LdnOperationMode {
  LdnOperationMode_Stable = 0 ,
  LdnOperationMode_HighSpeed = 1
}
 OperationMode. More...
 
enum  LdnWirelessControllerRestriction {
  LdnWirelessControllerRestriction_Disabled = 0 ,
  LdnWirelessControllerRestriction_Enabled = 1
}
 WirelessControllerRestriction. More...
 
enum  LdnProtocol {
  LdnProtocol_NX = 1 ,
  LdnProtocol_Unknown3 = 3
}
 Protocol. More...
 

Functions

ldn:m
Result ldnmInitialize (void)
 Initialize ldn:m.
 
void ldnmExit (void)
 Exit ldn:m.
 
ServiceldnmGetServiceSession_MonitorService (void)
 Gets the Service object for IMonitorService.
 
Result ldnmGetState (LdnState *out)
 GetState.
 
Result ldnmGetNetworkInfo (LdnNetworkInfo *out)
 GetNetworkInfo.
 
Result ldnmGetIpv4Address (LdnIpv4Address *addr, LdnSubnetMask *mask)
 GetIpv4Address.
 
Result ldnmGetSecurityParameter (LdnSecurityParameter *out)
 GetSecurityParameter.
 
Result ldnmGetNetworkConfig (LdnNetworkConfig *out)
 GetNetworkConfig.
 
ldn
Result ldnInitialize (LdnServiceType service_type)
 Initialize ldn.
 
void ldnExit (void)
 Exit ldn.
 
ServiceldnGetServiceSession_LocalCommunicationService (void)
 Gets the Service object for IUserLocalCommunicationService/ISystemLocalCommunicationService.
 
ServiceldnGetServiceSession_IClientProcessMonitor (void)
 Gets the Service object for IClientProcessMonitor, only valid with [18.0.0+].
 
Result ldnGetState (LdnState *out)
 GetState.
 
Result ldnGetNetworkInfo (LdnNetworkInfo *out)
 GetNetworkInfo.
 
Result ldnGetIpv4Address (LdnIpv4Address *addr, LdnSubnetMask *mask)
 GetIpv4Address.
 
Result ldnGetDisconnectReason (LdnDisconnectReason *out)
 GetDisconnectReason.
 
Result ldnGetSecurityParameter (LdnSecurityParameter *out)
 GetSecurityParameter.
 
Result ldnGetNetworkConfig (LdnNetworkConfig *out)
 GetNetworkConfig.
 
Result ldnGetStateChangeEvent (Event *out_event)
 GetStateChangeEvent.
 
Result ldnGetNetworkInfoAndHistory (LdnNetworkInfo *network_info, LdnNodeLatestUpdate *nodes, s32 count)
 GetNetworkInfoAndHistory.
 
Result ldnScan (s32 channel, const LdnScanFilter *filter, LdnNetworkInfo *network_info, s32 count, s32 *total_out)
 Scan.
 
Result ldnScanPrivate (s32 channel, const LdnScanFilter *filter, LdnNetworkInfo *network_info, s32 count, s32 *total_out)
 ScanPrivate.
 
Result ldnSetWirelessControllerRestriction (LdnWirelessControllerRestriction restriction)
 SetWirelessControllerRestriction.
 
Result ldnSetProtocol (LdnProtocol protocol)
 SetProtocol.
 
Result ldnOpenAccessPoint (void)
 OpenAccessPoint.
 
Result ldnCloseAccessPoint (void)
 CloseAccessPoint.
 
Result ldnCreateNetwork (const LdnSecurityConfig *sec_config, const LdnUserConfig *user_config, const LdnNetworkConfig *network_config)
 CreateNetwork.
 
Result ldnCreateNetworkPrivate (const LdnSecurityConfig *sec_config, const LdnSecurityParameter *sec_param, const LdnUserConfig *user_config, const LdnNetworkConfig *network_config, const LdnAddressEntry *addrs, s32 count)
 CreateNetworkPrivate.
 
Result ldnDestroyNetwork (void)
 DestroyNetwork.
 
Result ldnReject (LdnIpv4Address addr)
 Reject.
 
Result ldnSetAdvertiseData (const void *buffer, size_t size)
 SetAdvertiseData.
 
Result ldnSetStationAcceptPolicy (LdnAcceptPolicy policy)
 SetStationAcceptPolicy.
 
Result ldnAddAcceptFilterEntry (LdnMacAddress addr)
 AddAcceptFilterEntry.
 
Result ldnClearAcceptFilter (void)
 ClearAcceptFilter.
 
Result ldnOpenStation (void)
 OpenStation.
 
Result ldnCloseStation (void)
 CloseStation.
 
Result ldnConnect (const LdnSecurityConfig *sec_config, const LdnUserConfig *user_config, s32 version, u32 option, const LdnNetworkInfo *network_info)
 Connect.
 
Result ldnConnectPrivate (const LdnSecurityConfig *sec_config, const LdnSecurityParameter *sec_param, const LdnUserConfig *user_config, s32 version, u32 option, const LdnNetworkConfig *network_config)
 ConnectPrivate.
 
Result ldnDisconnect (void)
 Disconnect.
 
Result ldnSetOperationMode (LdnOperationMode mode)
 SetOperationMode.
 
Result ldnEnableActionFrame (const LdnActionFrameSettings *settings)
 EnableActionFrame.
 
Result ldnDisableActionFrame (void)
 DisableActionFrame.
 
Result ldnSendActionFrame (const void *data, size_t size, LdnMacAddress destination, LdnMacAddress bssid, s16 channel, u32 flags)
 SendActionFrame.
 
Result ldnRecvActionFrame (void *data, size_t size, LdnMacAddress *addr0, LdnMacAddress *addr1, s16 *channel, u32 *out_size, s32 *link_level, u32 flags)
 RecvActionFrame.
 
Result ldnSetHomeChannel (s16 channel)
 SetHomeChannel.
 
Result ldnSetTxPower (s16 power)
 SetTxPower.
 
Result ldnResetTxPower (void)
 ResetTxPower.
 

Detailed Description

LDN (local network communications) IPC wrapper.

See also: https://switchbrew.org/wiki/LDN_services

Author
yellows8

Enumeration Type Documentation

◆ LdnAcceptPolicy

AcceptPolicy.

Enumerator
LdnAcceptPolicy_AlwaysAccept 

AlwaysAccept.

LdnAcceptPolicy_AlwaysReject 

AlwaysReject.

LdnAcceptPolicy_BlackList 

BlackList, addresses in the list (ldnAddAcceptFilterEntry) are not allowed.

LdnAcceptPolicy_WhiteList 

WhiteList, only addresses in the list (ldnAddAcceptFilterEntry) are allowed.

◆ LdnDisconnectReason

DisconnectReason loaded by ldnGetDisconnectReason.

Enumerator
LdnDisconnectReason_None 

None.

LdnDisconnectReason_DisconnectedByUser 

DisconnectedByUser.

LdnDisconnectReason_DisconnectedBySystem 

DisconnectedBySystem.

LdnDisconnectReason_DestroyedByUser 

DestroyedByUser.

LdnDisconnectReason_DestroyedBySystem 

DestroyedBySystem.

LdnDisconnectReason_Rejected 

Rejected.

LdnDisconnectReason_SignalLost 

SignalLost.

◆ LdnOperationMode

OperationMode.

Enumerator
LdnOperationMode_Stable 

Stable.

LdnOperationMode_HighSpeed 

HighSpeed.

◆ LdnProtocol

Protocol.

Enumerator
LdnProtocol_NX 

NX (default)

LdnProtocol_Unknown3 

(NXAndOunce?)

◆ LdnScanFilterFlag

ScanFilterFlag.

Enumerator
LdnScanFilterFlag_LocalCommunicationId 

Enables using LdnScanFilter::network_id LdnIntentId::local_communication_id.

LdnScanFilterFlag_SessionId 

Enables using LdnScanFilter::network_id session_id.

LdnScanFilterFlag_NetworkType 

Enables using LdnScanFilter::network_type.

LdnScanFilterFlag_Bssid 

Enables using LdnScanFilter::bssid. Only available with ldnScanPrivate.

LdnScanFilterFlag_Ssid 

Enables using LdnScanFilter::ssid.

LdnScanFilterFlag_SceneId 

Enables using LdnScanFilter::network_id LdnIntentId::scene_id.

LdnScanFilterFlag_IntentId 

Enables using LdnScanFilter::network_id intent_id.

LdnScanFilterFlag_NetworkId 

Enables using LdnScanFilter::network_id.

◆ LdnSecurityMode

SecurityMode. LdnSecurityMode_Product can be used as the default value. The ldn cmds which use an input SecurityMode normally overwrite the SecurityMode.

Enumerator
LdnSecurityMode_Any 

Any.

LdnSecurityMode_Product 

Product.

LdnSecurityMode_Debug 

Debug.

LdnSecurityMode_SystemDebug 

SystemDebug.

◆ LdnServiceType

Enumerator
LdnServiceType_User 

Initializes ldn:u.

LdnServiceType_System 

Initializes ldn:s.

◆ LdnState

enum LdnState

State loaded by ldnmGetStateForMonitor / ldnGetState.

Enumerator
LdnState_None 

None.

LdnState_Initialized 

Initialized.

LdnState_AccessPoint 

AccessPoint (ldnOpenAccessPoint)

LdnState_AccessPointCreated 

AccessPointCreated (ldnCreateNetwork / ldnCreateNetworkPrivate)

LdnState_Station 

Station (ldnOpenStation)

LdnState_StationConnected 

StationConnected (ldnConnect / ldnConnectPrivate)

LdnState_Error 

Error.

◆ LdnWirelessControllerRestriction

WirelessControllerRestriction.

Enumerator
LdnWirelessControllerRestriction_Disabled 

Disabled.

LdnWirelessControllerRestriction_Enabled 

Enabled.

Function Documentation

◆ ldnAddAcceptFilterEntry()

Result ldnAddAcceptFilterEntry ( LdnMacAddress  addr)

AddAcceptFilterEntry.

Note
LdnState must be LdnState_AccessPoint or LdnState_AccessPointCreated.
See LdnAcceptPolicy.
Parameters
[in]addrLdnMacAddress. If you want, you can also pass LdnNodeInfo::mac_addr for this.

◆ ldnClearAcceptFilter()

Result ldnClearAcceptFilter ( void  )

ClearAcceptFilter.

Note
LdnState must be LdnState_AccessPoint or LdnState_AccessPointCreated.

◆ ldnCloseAccessPoint()

Result ldnCloseAccessPoint ( void  )

CloseAccessPoint.

Note
LdnState must be LdnState_AccessPoint or LdnState_AccessPointCreated, this eventually sets the State to LdnState_Initialized.
Used automatically internally by ldnExit if needed.

◆ ldnCloseStation()

Result ldnCloseStation ( void  )

CloseStation.

Note
LdnState must be LdnState_Station or LdnState_StationConnected, this eventually sets the State to LdnState_Initialized.
Used automatically internally by ldnExit if needed.

◆ ldnConnect()

Result ldnConnect ( const LdnSecurityConfig sec_config,
const LdnUserConfig user_config,
s32  version,
u32  option,
const LdnNetworkInfo network_info 
)

Connect.

Note
LdnState must be LdnState_Station, this eventually sets the State to LdnState_StationConnected.
This is identical to ldnConnectPrivate besides the used params, the code overwriting LdnSecurityConfig::type also differs.
Parameters
[in]sec_configLdnSecurityConfig
[in]user_configLdnUserConfig
[in]versionLocalCommunicationVersion, this must be 0x0-0x7FFF.
[in]optionConnectOption bitmask, must be <=0x1. You can use value 0 for example here.
[in]network_infoLdnNetworkInfo

◆ ldnConnectPrivate()

Result ldnConnectPrivate ( const LdnSecurityConfig sec_config,
const LdnSecurityParameter sec_param,
const LdnUserConfig user_config,
s32  version,
u32  option,
const LdnNetworkConfig network_config 
)

ConnectPrivate.

Note
LdnState must be LdnState_Station, this eventually sets the State to LdnState_StationConnected.
See ldnConnect.
Parameters
[in]sec_configLdnSecurityConfig
[in]sec_paramLdnSecurityParameter
[in]user_configLdnUserConfig
[in]versionLocalCommunicationVersion, this must be 0x0-0x7FFF.
[in]optionConnectOption bitmask, must be <=0x1. You can use value 0 for example here.
[in]network_configLdnNetworkConfig

◆ ldnCreateNetwork()

Result ldnCreateNetwork ( const LdnSecurityConfig sec_config,
const LdnUserConfig user_config,
const LdnNetworkConfig network_config 
)

CreateNetwork.

Note
LdnState must be LdnState_AccessPoint, this eventually sets the State to LdnState_AccessPointCreated.
Parameters
[in]sec_configLdnSecurityConfig
[in]user_configLdnUserConfig
[in]network_configLdnNetworkConfig

◆ ldnCreateNetworkPrivate()

Result ldnCreateNetworkPrivate ( const LdnSecurityConfig sec_config,
const LdnSecurityParameter sec_param,
const LdnUserConfig user_config,
const LdnNetworkConfig network_config,
const LdnAddressEntry addrs,
s32  count 
)

CreateNetworkPrivate.

Note
LdnState must be LdnState_AccessPoint, this eventually sets the State to LdnState_AccessPointCreated.
This is the same as ldnCreateNetwork besides the additional user-specified params, and with this cmd LdnNetworkConfig::channel is not overwritten (unlike ldnCreateNetwork).
Parameters
[in]sec_configLdnSecurityConfig
[in]sec_paramLdnSecurityParameter
[in]user_configLdnUserConfig
[in]network_configLdnNetworkConfig
[in]addrsInput array of LdnAddressEntry. This can be NULL.
[in]countSize of the addrs array in entries. This must be <=8. This can be 0, in which case the network will be non-Private like ldnCreateNetwork.

◆ ldnDestroyNetwork()

Result ldnDestroyNetwork ( void  )

DestroyNetwork.

Note
LdnState must be LdnState_AccessPointCreated, this eventually sets the State to LdnState_AccessPoint.

◆ ldnDisableActionFrame()

Result ldnDisableActionFrame ( void  )

DisableActionFrame.

Note
Only available on [18.0.0+].
LdnState must be LdnState_Initialized.

◆ ldnDisconnect()

Result ldnDisconnect ( void  )

Disconnect.

Note
LdnState must be LdnState_StationConnected, this eventually sets the State to LdnState_Station.

◆ ldnEnableActionFrame()

Result ldnEnableActionFrame ( const LdnActionFrameSettings settings)

EnableActionFrame.

Note
Only available on [18.0.0+].
LdnState must be LdnState_Initialized.
Parameters
[in]settingsLdnActionFrameSettings

◆ ldnGetDisconnectReason()

Result ldnGetDisconnectReason ( LdnDisconnectReason out)

GetDisconnectReason.

Parameters
[out]outLdnDisconnectReason

◆ ldnGetIpv4Address()

Result ldnGetIpv4Address ( LdnIpv4Address addr,
LdnSubnetMask mask 
)

GetIpv4Address.

Parameters
[out]addrLdnIpv4Address
[out]maskLdnSubnetMask

◆ ldnGetNetworkConfig()

Result ldnGetNetworkConfig ( LdnNetworkConfig out)

GetNetworkConfig.

Parameters
[out]outLdnNetworkConfig

◆ ldnGetNetworkInfo()

Result ldnGetNetworkInfo ( LdnNetworkInfo out)

GetNetworkInfo.

Parameters
[out]outLdnNetworkInfo

◆ ldnGetNetworkInfoAndHistory()

Result ldnGetNetworkInfoAndHistory ( LdnNetworkInfo network_info,
LdnNodeLatestUpdate nodes,
s32  count 
)

GetNetworkInfoAndHistory.

Parameters
[out]network_infoLdnNetworkInfo
[out]nodesOutput array of LdnNodeLatestUpdate.
[in]countSize of the nodes array in entries, must be 8.

◆ ldnGetSecurityParameter()

Result ldnGetSecurityParameter ( LdnSecurityParameter out)

GetSecurityParameter.

Parameters
[out]outLdnSecurityParameter

◆ ldnGetState()

Result ldnGetState ( LdnState out)

GetState.

Parameters
[out]outLdnState

◆ ldnGetStateChangeEvent()

Result ldnGetStateChangeEvent ( Event out_event)

GetStateChangeEvent.

Note
The Event must be closed by the user once finished with it.
This is signaled when the data returned by ldnGetNetworkInfo / ldnGetNetworkInfoLatestUpdate is updated.
Parameters
[out]out_eventOutput Event with autoclear=true.

◆ ldnInitialize()

Result ldnInitialize ( LdnServiceType  service_type)

Initialize ldn.

The priority is only used with LdnServiceType_System on [19.0.0+]. To optionally set this, define "s32 __nx_ldn_priority". The priority must be LDN_PRIORITY_SYSTEM (default) or LDN_PRIORITY_USER.

◆ ldnmGetIpv4Address()

Result ldnmGetIpv4Address ( LdnIpv4Address addr,
LdnSubnetMask mask 
)

GetIpv4Address.

Parameters
[out]addrLdnIpv4Address
[out]maskLdnSubnetMask

◆ ldnmGetNetworkConfig()

Result ldnmGetNetworkConfig ( LdnNetworkConfig out)

GetNetworkConfig.

Note
Not exposed by official sw.
Parameters
[out]outLdnNetworkConfig

◆ ldnmGetNetworkInfo()

Result ldnmGetNetworkInfo ( LdnNetworkInfo out)

GetNetworkInfo.

Parameters
[out]outLdnNetworkInfo

◆ ldnmGetSecurityParameter()

Result ldnmGetSecurityParameter ( LdnSecurityParameter out)

GetSecurityParameter.

Note
Not exposed by official sw.
Parameters
[out]outLdnSecurityParameter

◆ ldnmGetState()

Result ldnmGetState ( LdnState out)

GetState.

Parameters
[out]outLdnState

◆ ldnOpenAccessPoint()

Result ldnOpenAccessPoint ( void  )

OpenAccessPoint.

Note
LdnState must be LdnState_Initialized, this eventually sets the State to LdnState_AccessPoint.

◆ ldnOpenStation()

Result ldnOpenStation ( void  )

OpenStation.

Note
LdnState must be LdnState_Initialized, this eventually sets the State to LdnState_Station.

◆ ldnRecvActionFrame()

Result ldnRecvActionFrame ( void *  data,
size_t  size,
LdnMacAddress addr0,
LdnMacAddress addr1,
s16 channel,
u32 out_size,
s32 link_level,
u32  flags 
)

RecvActionFrame.

Note
Only available on [18.0.0+].
ldnEnableActionFrame must be used prior to this.
Parameters
[out]dataOutput data buffer.
[in]sizeMax size of the data buffer.
[out]addr0First LdnMacAddress.
[out]addr1Second LdnMacAddress.
[out]channelChannel
[out]out_sizeOutput size.
[out]link_levelLinkLevel
[in]flagsMessageFlag bit0 clear = block until data is available, set = return error when data is not available.

◆ ldnReject()

Result ldnReject ( LdnIpv4Address  addr)

Reject.

Note
LdnState must be LdnState_AccessPointCreated.
Parameters
[in]addrLdnIpv4Address

◆ ldnResetTxPower()

Result ldnResetTxPower ( void  )

ResetTxPower.

Note
Only available on [18.0.0+].
LdnState must be LdnState_AccessPoint* / LdnState_Station*.

◆ ldnScan()

Result ldnScan ( s32  channel,
const LdnScanFilter filter,
LdnNetworkInfo network_info,
s32  count,
s32 total_out 
)

Scan.

Note
LdnState must be LdnState_AccessPointCreated, LdnState_Station, or LdnState_StationConnected.
This is the same as ldnScanPrivate (minus the masking for LdnScanFilter::flags), except this has the same channel-override functionality as ldnCreateNetwork.
Parameters
[in]channelChannel, value 0 can be used for this.
[in]filterLdnScanFilter
[out]network_infoOutput array of LdnNetworkInfo.
[in]countSize of the network_info array in entries. Must be at least 1, this is clamped to a maximum of 0x18 internally.
[out]total_outTotal output entries.

◆ ldnScanPrivate()

Result ldnScanPrivate ( s32  channel,
const LdnScanFilter filter,
LdnNetworkInfo network_info,
s32  count,
s32 total_out 
)

ScanPrivate.

Note
LdnState must be LdnState_AccessPointCreated, LdnState_Station, or LdnState_StationConnected.
See ldnScan.
Parameters
[in]channelChannel, value 0 can be used for this.
[in]filterLdnScanFilter
[out]network_infoOutput array of LdnNetworkInfo.
[in]countSize of the network_info array in entries. Must be at least 1, this is clamped to a maximum of 0x18 internally.
[out]total_outTotal output entries.

◆ ldnSendActionFrame()

Result ldnSendActionFrame ( const void *  data,
size_t  size,
LdnMacAddress  destination,
LdnMacAddress  bssid,
s16  channel,
u32  flags 
)

SendActionFrame.

Note
Only available on [18.0.0+].
LdnState must be LdnState_AccessPointCreated / LdnState_Station.
Parameters
[in]dataData buffer.
[in]sizeData buffer size.
[in]destinationDestination LdnMacAddress.
[in]bssidBssid LdnMacAddress.
[in]channelChannel, must be non-zero.
[in]flagsMessageFlag bit0 clear = block until the data can be sent, set = return error when the data can't be sent.

◆ ldnSetAdvertiseData()

Result ldnSetAdvertiseData ( const void *  buffer,
size_t  size 
)

SetAdvertiseData.

Note
An empty buffer (buffer=NULL/size=0) can be used to reset the AdvertiseData size in state to zero.
LdnState must be LdnState_AccessPoint or LdnState_AccessPointCreated.
Parameters
[in]bufferInput buffer containing arbitrary user data.
[in]sizeInput buffer size, must be <=0x180.

◆ ldnSetHomeChannel()

Result ldnSetHomeChannel ( s16  channel)

SetHomeChannel.

Note
Only available on [18.0.0+].
LdnState must be LdnState_Station.
Parameters
[in]channelChannel, must be non-zero.

◆ ldnSetOperationMode()

Result ldnSetOperationMode ( LdnOperationMode  mode)

SetOperationMode.

Note
With LdnServiceType_System this is only available on [4.0.0+].
With LdnServiceType_User this is only available on [19.0.0+].
LdnState must be LdnState_Initialized.
Parameters
[in]modeLdnOperationMode

◆ ldnSetProtocol()

Result ldnSetProtocol ( LdnProtocol  protocol)

SetProtocol.

Note
This is only usable with [20.0.0+] (with [18.0.0-19-0.1] this is available but not usable).
LdnState must be LdnState_Initialized. If a non-default Protocol is wanted, use this after ldnInitialize.
This is used by ldnInitialize with LdnProtocol_NX on [20.0.0+].
Parameters
[in]protocolLdnProtocol

◆ ldnSetStationAcceptPolicy()

Result ldnSetStationAcceptPolicy ( LdnAcceptPolicy  policy)

SetStationAcceptPolicy.

Note
LdnState must be LdnState_AccessPoint or LdnState_AccessPointCreated.
Parameters
[in]policyLdnAcceptPolicy

◆ ldnSetTxPower()

Result ldnSetTxPower ( s16  power)

SetTxPower.

Note
Only available on [18.0.0+].
LdnState must be LdnState_AccessPoint* / LdnState_Station*.
Parameters
[in]powerPower, must be 0x0..0xFF.

◆ ldnSetWirelessControllerRestriction()

Result ldnSetWirelessControllerRestriction ( LdnWirelessControllerRestriction  restriction)

SetWirelessControllerRestriction.

Note
Only available on [5.0.0+].
LdnState must be LdnState_Initialized.
Parameters
[in]restrictionLdnWirelessControllerRestriction