LDN services: Difference between revisions
No edit summary |
|||
Line 8: | Line 8: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || [[#CreateMonitorService]] | | 0 || [[#CreateMonitorService|CreateMonitorService]] | ||
|} | |} | ||
Line 23: | Line 23: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || [[# | | 0 || [[#GetState|GetState]] | ||
|- | |- | ||
| 1 || [[# | | 1 || [[#GetNetworkInfo|GetNetworkInfo]] | ||
|- | |- | ||
| 2 || [[# | | 2 || [[#GetIpv4Address|GetIpv4Address]] | ||
|- | |- | ||
| 3 || [[# | | 3 || [[#GetDisconnectReason|GetDisconnectReason]] | ||
|- | |- | ||
| 4 || [[# | | 4 || [[#GetSecurityParameter|GetSecurityParameter]] | ||
|- | |- | ||
| 5 || [[# | | 5 || [[#GetNetworkConfig|GetNetworkConfig]] | ||
|- | |- | ||
| 100 || [[# | | 100 || [[#Initialize]] | ||
|- | |- | ||
| 101 || [[# | | 101 || [[#Finalize]] | ||
|} | |} | ||
=== | === GetState === | ||
No input, returns an output u32. | No input, returns an output u32. | ||
sdknso implements this by <code>return</code>ing the u32, with 0 being returned on error. | sdknso implements this by <code>return</code>ing the u32, with 0 being returned on error. | ||
=== | === GetNetworkInfo === | ||
Takes a type-0x1A output buffer containing a [[#NetworkInfo]]. | Takes a type-0x1A output buffer containing a [[#NetworkInfo]]. | ||
=== | === GetIpv4Address === | ||
No input, returns an output [[#Ipv4Address]] and a [[#SubnetMask]]. | No input, returns an output [[#Ipv4Address]] and a [[#SubnetMask]]. | ||
=== | === GetDisconnectReason === | ||
No input, returns an output s16. | No input, returns an output s16. | ||
Line 58: | Line 58: | ||
This just returns 0. | This just returns 0. | ||
=== | === GetSecurityParameter === | ||
No input, returns an output [[#SecurityParameter]]. | No input, returns an output [[#SecurityParameter]]. | ||
This is not exposed by sdknso. | This is not exposed by sdknso. | ||
=== | === GetNetworkConfig === | ||
No input, returns an output [[#NetworkConfig]]. | No input, returns an output [[#NetworkConfig]]. | ||
This is not exposed by sdknso. | This is not exposed by sdknso. | ||
=== | === Initialize === | ||
No input/output. | No input/output. | ||
Line 75: | Line 75: | ||
This just returns 0. | This just returns 0. | ||
=== | === Finalize === | ||
No input/output. | No input/output. | ||
Line 89: | Line 89: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || [[#CreateSystemLocalCommunicationService]] | | 0 || [[#CreateSystemLocalCommunicationService|CreateSystemLocalCommunicationService]] | ||
|- | |- | ||
| 1 || [18.0.0+] [[#CreateClientProcessMonitor]] | | 1 || [18.0.0+] [[#CreateClientProcessMonitor|CreateClientProcessMonitor]] | ||
|} | |} | ||
Line 109: | Line 109: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || [[#GetState]] | | 0 || [[#GetState_1|GetState]] | ||
|- | |- | ||
| 1 || [[#GetNetworkInfo]] | | 1 || [[#GetNetworkInfo_1|GetNetworkInfo]] | ||
|- | |- | ||
| 2 || [[#GetIpv4Address]] | | 2 || [[#GetIpv4Address_1|GetIpv4Address]] | ||
|- | |- | ||
| 3 || [[#GetDisconnectReason]] | | 3 || [[#GetDisconnectReason_1|GetDisconnectReason]] | ||
|- | |- | ||
| 4 || [[#GetSecurityParameter]] | | 4 || [[#GetSecurityParameter_1|GetSecurityParameter]] | ||
|- | |- | ||
| 5 || [[#GetNetworkConfig]] | | 5 || [[#GetNetworkConfig_1|GetNetworkConfig]] | ||
|- | |- | ||
| 100 || [[# | | 100 || [[#GetStateChangeEvent|GetStateChangeEvent]] | ||
|- | |- | ||
| 101 || [[# | | 101 || [[#GetNetworkInfoAndHistory|GetNetworkInfoAndHistory]] | ||
|- | |- | ||
| 102 || [[#Scan]] | | 102 || [[#Scan|Scan]] | ||
|- | |- | ||
| 103 || [[#ScanPrivate]] | | 103 || [[#ScanPrivate|ScanPrivate]] | ||
|- | |- | ||
| 104 || [5.0.0+] [[# | | 104 || [5.0.0+] [[#SetWirelessControllerPolicy|SetWirelessControllerPolicy]] | ||
|- | |- | ||
| 105 || [13.1.0+] [[# | | 105 || [13.1.0+] [[#SetWirelessAudioPolicy|SetWirelessAudioPolicy]] | ||
|- | |- | ||
| 106 || [18.0.0+] | | 106 || [18.0.0+] [[#SetProtocol|SetProtocol]] | ||
|- | |- | ||
| 200 || [[#OpenAccessPoint]] | | 200 || [[#OpenAccessPoint|OpenAccessPoint]] | ||
|- | |- | ||
| 201 || [[#CloseAccessPoint]] | | 201 || [[#CloseAccessPoint|CloseAccessPoint]] | ||
|- | |- | ||
| 202 || [[#CreateNetwork]] | | 202 || [[#CreateNetwork|CreateNetwork]] | ||
|- | |- | ||
| 203 || [[#CreateNetworkPrivate]] | | 203 || [[#CreateNetworkPrivate|CreateNetworkPrivate]] | ||
|- | |- | ||
| 204 || [[#DestroyNetwork]] | | 204 || [[#DestroyNetwork|DestroyNetwork]] | ||
|- | |- | ||
| 205 || [[#Reject]] | | 205 || [[#Reject|Reject]] | ||
|- | |- | ||
| 206 || [[#SetAdvertiseData]] | | 206 || [[#SetAdvertiseData|SetAdvertiseData]] | ||
|- | |- | ||
| 207 || [[#SetStationAcceptPolicy]] | | 207 || [[#SetStationAcceptPolicy|SetStationAcceptPolicy]] | ||
|- | |- | ||
| 208 || [[#AddAcceptFilterEntry]] | | 208 || [[#AddAcceptFilterEntry|AddAcceptFilterEntry]] | ||
|- | |- | ||
| 209 || [[#ClearAcceptFilter]] | | 209 || [[#ClearAcceptFilter|ClearAcceptFilter]] | ||
|- | |- | ||
| 300 || [[#OpenStation]] | | 300 || [[#OpenStation|OpenStation]] | ||
|- | |- | ||
| 301 || [[#CloseStation]] | | 301 || [[#CloseStation|CloseStation]] | ||
|- | |- | ||
| 302 || [[#Connect]] | | 302 || [[#Connect|Connect]] | ||
|- | |- | ||
| 303 || [[#ConnectPrivate]] | | 303 || [[#ConnectPrivate|ConnectPrivate]] | ||
|- | |- | ||
| 304 || [[#Disconnect]] | | 304 || [[#Disconnect|Disconnect]] | ||
|- | |- | ||
| 400 || [[# | | 400 || [[#Initialize_1|Initialize]] | ||
|- | |- | ||
| 401 || [[# | | 401 || [[#Finalize_1|Finalize]] | ||
|- | |- | ||
| 402 || [4.0.0+] [[#SetOperationMode]] | | 402 || [4.0.0+] [[#SetOperationMode|SetOperationMode]] | ||
|- | |- | ||
| 403 || [7.0.0+] [[# | | 403 || [7.0.0+] [[#InitializeWithVersion|InitializeWithVersion]] | ||
|- | |- | ||
| 404 || [19.0.0+] | | 404 || [19.0.0+] [[#InitializeWithPriority|InitializeWithPriority]] | ||
|- | |- | ||
| 500 || [18.0.0+] EnableActionFrame | | 500 || [18.0.0+] EnableActionFrame | ||
Line 212: | Line 212: | ||
No input, returns an output [[#NetworkConfig]]. | No input, returns an output [[#NetworkConfig]]. | ||
=== | === GetStateChangeEvent === | ||
No input, returns an output Event handle. | No input, returns an output Event handle. | ||
sdknso uses EventClearMode=1 with this. sdknso will Abort if this cmd fails. | sdknso uses EventClearMode=1 with this. sdknso will Abort if this cmd fails. | ||
This is signaled when the data returned by [[#GetNetworkInfo]]/[[# | This is signaled when the data returned by [[#GetNetworkInfo]]/[[#GetNetworkInfoAndHistory]] is updated. | ||
=== | === GetNetworkInfoAndHistory === | ||
Takes a type-0x1A output buffer containing a [[#NetworkInfo]] and a type-0xA output buffer containing an array of [[#NodeLatestUpdate]]. | Takes a type-0x1A output buffer containing a [[#NetworkInfo]] and a type-0xA output buffer containing an array of [[#NodeLatestUpdate]]. | ||
Line 242: | Line 242: | ||
See [[#Scan]]. | See [[#Scan]]. | ||
=== | === SetWirelessControllerPolicy === | ||
Takes an input [[#WirelessControllerRestriction]], no output. | Takes an input [[#WirelessControllerRestriction]], no output. | ||
Line 249: | Line 249: | ||
The input value is written into state. | The input value is written into state. | ||
=== | === SetWirelessAudioPolicy === | ||
Takes an input [[#BluetoothAudioDeviceConnectableMode]], no output. | Takes an input [[#BluetoothAudioDeviceConnectableMode]], no output. | ||
=== | === SetProtocol === | ||
Takes an input u32, no output. | Takes an input u32, no output. | ||
Line 360: | Line 360: | ||
[[#GetState|State]] must be 5, this cmd eventually sets the State to value 4. | [[#GetState|State]] must be 5, this cmd eventually sets the State to value 4. | ||
=== | === Initialize === | ||
Takes an input PID and an u64 pid_placeholder. | Takes an input PID and an u64 pid_placeholder. | ||
This is used immediately after object creation. | This is used immediately after object creation. | ||
With [7.0.0+] [[# | With [7.0.0+] [[#InitializeWithVersion|InitializeWithVersion]] is used instead. | ||
=== | === Finalize === | ||
No input/output. | No input/output. | ||
Line 383: | Line 383: | ||
The input value is written into state. | The input value is written into state. | ||
=== | === InitializeWithVersion === | ||
Takes an input PID, an u32, and an u64 pid_placeholder. | Takes an input PID, an u32, and an u64 pid_placeholder. | ||
Official sw uses hard-coded value 0x1 for the u32. | Official sw uses hard-coded value 0x1 for the u32. | ||
The input u32 is ignored, the impl for this cmd is identical to [[# | The input u32 is ignored, the impl for this cmd is identical to [[#Initialize_1|Initialize]]. | ||
Internally this calls a func with params: (..., PID, &{u16 value 0x38}). On success, this then calls another func (which sets two state fields to the input) with params: (state, 0) (these state fields are used during [[#Authentication]] to check which service is being used). | Internally this calls a func with params: (..., PID, &{u16 value 0x38}). On success, this then calls another func (which sets two state fields to the input) with params: (state, 0) (these state fields are used during [[#Authentication]] to check which service is being used). | ||
Line 396: | Line 396: | ||
[[#GetState|State]] must be 0, this cmd eventually sets the State to value 1. | [[#GetState|State]] must be 0, this cmd eventually sets the State to value 1. | ||
=== | === InitializeWithPriority === | ||
Takes an input PID, an u32, an u32, and an u64 pid_placeholder. | Takes an input PID, an u32, an u32, and an u64 pid_placeholder. | ||
This is similar to [[# | This is similar to [[#InitializeWithVersion_1|InitializeWithVersion]], with the additional cmd input u32 now being passed directly to the init func which is called here. | ||
=== SetHomeChannel === | === SetHomeChannel === | ||
Line 423: | Line 423: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || [[#CreateUserLocalCommunicationService]] | | 0 || [[#CreateUserLocalCommunicationService|CreateUserLocalCommunicationService]] | ||
|- | |- | ||
| 1 || [18.0.0+] [[#CreateClientProcessMonitor]] | | 1 || [18.0.0+] [[#CreateClientProcessMonitor|CreateClientProcessMonitor]] | ||
|} | |} | ||
Line 436: | Line 436: | ||
This is "nn::ldn::detail::IUserLocalCommunicationService". | This is "nn::ldn::detail::IUserLocalCommunicationService". | ||
This is identical to [[#ISystemLocalCommunicationService]], except for the System-only cmd(s), and [[#Initialize]]/[[# | This is identical to [[#ISystemLocalCommunicationService]], except for the System-only cmd(s), and [[#Initialize_2|Initialize]]/[[#Initialize_2|InitializeWithVersion]] differ. | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 442: | Line 442: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || [[#GetState]] | | 0 || [[#GetState_1|GetState]] | ||
|- | |- | ||
| 1 || [[#GetNetworkInfo]] | | 1 || [[#GetNetworkInfo_1|GetNetworkInfo]] | ||
|- | |- | ||
| 2 || [[#GetIpv4Address]] | | 2 || [[#GetIpv4Address_1|GetIpv4Address]] | ||
|- | |- | ||
| 3 || [[#GetDisconnectReason]] | | 3 || [[#GetDisconnectReason_1|GetDisconnectReason]] | ||
|- | |- | ||
| 4 || [[#GetSecurityParameter]] | | 4 || [[#GetSecurityParameter_1|GetSecurityParameter]] | ||
|- | |- | ||
| 5 || [[#GetNetworkConfig]] | | 5 || [[#GetNetworkConfig_1|GetNetworkConfig]] | ||
|- | |- | ||
| 100 || [[# | | 100 || [[#GetStateChangeEvent|GetStateChangeEvent]] | ||
|- | |- | ||
| 101 || [[# | | 101 || [[#GetNetworkInfoAndHistory|GetNetworkInfoAndHistory]] | ||
|- | |- | ||
| 102 || [[#Scan]] | | 102 || [[#Scan|Scan]] | ||
|- | |- | ||
| 103 || [[#ScanPrivate]] | | 103 || [[#ScanPrivate|ScanPrivate]] | ||
|- | |- | ||
| 104 || [5.0.0+] [[# | | 104 || [5.0.0+] [[#SetWirelessControllerPolicy|SetWirelessControllerPolicy]] | ||
|- | |- | ||
| 105 || [13.1.0+] [[# | | 105 || [13.1.0+] [[#SetWirelessAudioPolicy|SetWirelessAudioPolicy]] | ||
|- | |- | ||
| 106 || [18.0.0+] | | 106 || [18.0.0+] [[#SetProtocol|SetProtocol]] | ||
|- | |- | ||
| 200 || [[#OpenAccessPoint]] | | 200 || [[#OpenAccessPoint|OpenAccessPoint]] | ||
|- | |- | ||
| 201 || [[#CloseAccessPoint]] | | 201 || [[#CloseAccessPoint|CloseAccessPoint]] | ||
|- | |- | ||
| 202 || [[#CreateNetwork]] | | 202 || [[#CreateNetwork|CreateNetwork]] | ||
|- | |- | ||
| 203 || [[#CreateNetworkPrivate]] | | 203 || [[#CreateNetworkPrivate|CreateNetworkPrivate]] | ||
|- | |- | ||
| 204 || [[#DestroyNetwork]] | | 204 || [[#DestroyNetwork|DestroyNetwork]] | ||
|- | |- | ||
| 205 || [[#Reject]] | | 205 || [[#Reject|Reject]] | ||
|- | |- | ||
| 206 || [[#SetAdvertiseData]] | | 206 || [[#SetAdvertiseData|SetAdvertiseData]] | ||
|- | |- | ||
| 207 || [[#SetStationAcceptPolicy]] | | 207 || [[#SetStationAcceptPolicy|SetStationAcceptPolicy]] | ||
|- | |- | ||
| 208 || [[#AddAcceptFilterEntry]] | | 208 || [[#AddAcceptFilterEntry|AddAcceptFilterEntry]] | ||
|- | |- | ||
| 209 || [[#ClearAcceptFilter]] | | 209 || [[#ClearAcceptFilter|ClearAcceptFilter]] | ||
|- | |- | ||
| 300 || [[#OpenStation]] | | 300 || [[#OpenStation|OpenStation]] | ||
|- | |- | ||
| 301 || [[#CloseStation]] | | 301 || [[#CloseStation|CloseStation]] | ||
|- | |- | ||
| 302 || [[#Connect]] | | 302 || [[#Connect|Connect]] | ||
|- | |- | ||
| 303 || [[#ConnectPrivate]] | | 303 || [[#ConnectPrivate|ConnectPrivate]] | ||
|- | |- | ||
| 304 || [[#Disconnect]] | | 304 || [[#Disconnect|Disconnect]] | ||
|- | |- | ||
| 400 || [[#Initialize]] | | 400 || [[#Initialize_2|Initialize]] | ||
|- | |- | ||
| 401 || [[#Finalize]] | | 401 || [[#Finalize_2|Finalize]] | ||
|- | |- | ||
| 402 || [7.0.0+] [[# | | 402 || [7.0.0+] [[#InitializeWithVersion_2|InitializeWithVersion]] | ||
|- | |- | ||
| 403 || [19.0.0+] | | 403 || [19.0.0+] [[#InitializeWithPriority|InitializeWithPriority]] | ||
|- | |- | ||
| 500 || [18.0.0+] EnableActionFrame | | 500 || [18.0.0+] EnableActionFrame | ||
Line 526: | Line 526: | ||
This is used immediately after object creation. | This is used immediately after object creation. | ||
With [7.0.0+] [[# | With [7.0.0+] [[#InitializeWithVersion_2|InitializeWithVersion]] is used instead. | ||
This is identical to [[# | This is identical to [[#Initialize_1|Initialize]] except different params are used for the funcs called internally. | ||
=== Finalize === | === Finalize === | ||
Line 535: | Line 535: | ||
This is used during service exit, prior to closing the object. Official sw will Abort if this fails. | This is used during service exit, prior to closing the object. Official sw will Abort if this fails. | ||
=== InitializeWithVersion === | |||
=== | |||
Takes an input PID, an u32, and an u64 pid_placeholder. | Takes an input PID, an u32, and an u64 pid_placeholder. | ||
Official sw uses hard-coded value 0x1 for the u32. | Official sw uses hard-coded value 0x1 for the u32. | ||
The input u32 is ignored, the impl for this cmd is identical to [[#Initialize]]. | The input u32 is ignored, the impl for this cmd is identical to [[#Initialize_2|Initialize]]. | ||
This is identical to [[# | This is identical to [[#InitializeWithVersion_2|InitializeWithVersion]] except different params are used for the funcs called internally: the u16 value is 0x5A, and the value for the second func is 1. | ||
= ndd = | = ndd = | ||
Line 617: | Line 615: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || [[#CreateNetworkService]] | | 0 || [[#CreateNetworkService|CreateNetworkService]] | ||
|- | |- | ||
| 8 || [[#CreateNetworkServiceMonitor]] | | 8 || [[#CreateNetworkServiceMonitor|CreateNetworkServiceMonitor]] | ||
|} | |} | ||
Line 637: | Line 635: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || [[# | | 0 || [[#Initialize_3|Initialize]] | ||
|- | |- | ||
| [9.0.0-9.0.1] | | 256 || [9.0.0-9.0.1] [[#AttachNetworkInterfaceStateChangeEvent|AttachNetworkInterfaceStateChangeEvent]] | ||
|- | |- | ||
| [9.0.0-9.0.1] | | 264 || [9.0.0-9.0.1] [[#GetNetworkInterfaceLastError|GetNetworkInterfaceLastError]] | ||
|- | |- | ||
| [9.0.0-9.0.1] | | 272 || [9.0.0-9.0.1] [[#GetRole|GetRole]] | ||
|- | |- | ||
| [9.0.0-9.0.1] | | 280 || [9.0.0-9.0.1] [[#GetAdvertiseData|GetAdvertiseData]] | ||
|- | |- | ||
| [9.0.0-9.0.1] | | 288 || [9.0.0-9.0.1] [[#GetGroupInfo|GetGroupInfo]] | ||
|- | |- | ||
| [9.0.0-9.0.1] | | 296 || [9.0.0-9.0.1] [[#GetGroupInfo2|GetGroupInfo2]] | ||
|- | |- | ||
| [9.0.0-9.0.1] | | 304 || [9.0.0-9.0.1] [[#GetGroupOwner|GetGroupOwner]] | ||
|- | |- | ||
| [9.0.0-9.0.1] | | 312 || [9.0.0-9.0.1] [[#GetIpConfig|GetIpConfig]] | ||
|- | |- | ||
| [9.0.0-9.0.1] | | 320 || [9.0.0-9.0.1] [[#GetLinkLevel|GetLinkLevel]] | ||
|- | |- | ||
| 512 || [[#Scan]] | | 512 || [[#Scan_1|Scan]] | ||
|- | |- | ||
| 768 || [[#CreateGroup]] | | 768 || [[#CreateGroup|CreateGroup]] | ||
|- | |- | ||
| 776 || [[#DestroyGroup]] | | 776 || [[#DestroyGroup|DestroyGroup]] | ||
|- | |- | ||
| 784 || [[#SetAdvertiseData]] | | 784 || [[#SetAdvertiseData|SetAdvertiseData]] | ||
|- | |- | ||
| 1536 || [[#SendToOtherGroup]] | | 1536 || [[#SendToOtherGroup|SendToOtherGroup]] | ||
|- | |- | ||
| 1544 || [[#RecvFromOtherGroup]] | | 1544 || [[#RecvFromOtherGroup|RecvFromOtherGroup]] | ||
|- | |- | ||
| 1552 || [[#AddAcceptableGroupId]] | | 1552 || [[#AddAcceptableGroupId|AddAcceptableGroupId]] | ||
|- | |- | ||
| 1560 || [9.1.0+] [[#ClearAcceptableGroupId]] | | 1560 || [9.1.0+] [[#ClearAcceptableGroupId|ClearAcceptableGroupId]] | ||
|} | |} | ||
Line 750: | Line 748: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || [[# | | 0 || [[#Initialize_4|Initialize]] | ||
|- | |- | ||
| 256 || [[#AttachNetworkInterfaceStateChangeEvent]] | | 256 || [[#AttachNetworkInterfaceStateChangeEvent|AttachNetworkInterfaceStateChangeEvent]] | ||
|- | |- | ||
| 264 || [[#GetNetworkInterfaceLastError]] | | 264 || [[#GetNetworkInterfaceLastError|GetNetworkInterfaceLastError]] | ||
|- | |- | ||
| 272 || [[#GetRole]] | | 272 || [[#GetRole|GetRole]] | ||
|- | |- | ||
| 280 || [[#GetAdvertiseData]] | | 280 || [[#GetAdvertiseData|GetAdvertiseData]] | ||
|- | |- | ||
| 281 || [[#GetAdvertiseData2]] | | 281 || [[#GetAdvertiseData2|GetAdvertiseData2]] | ||
|- | |- | ||
| 288 || [[#GetGroupInfo]] | | 288 || [[#GetGroupInfo|GetGroupInfo]] | ||
|- | |- | ||
| 296 || [[#GetGroupInfo2]] | | 296 || [[#GetGroupInfo2|GetGroupInfo2]] | ||
|- | |- | ||
| 304 || [[#GetGroupOwner]] | | 304 || [[#GetGroupOwner|GetGroupOwner]] | ||
|- | |- | ||
| 312 || [[#GetIpConfig]] | | 312 || [[#GetIpConfig|GetIpConfig]] | ||
|- | |- | ||
| 320 || [[#GetLinkLevel]] | | 320 || [[#GetLinkLevel|GetLinkLevel]] | ||
|- | |- | ||
| 328 || [[#AttachJoinEvent]] | | 328 || [[#AttachJoinEvent|AttachJoinEvent]] | ||
|- | |- | ||
| 336 || [[#GetMembers]] | | 336 || [[#GetMembers|GetMembers]] | ||
|} | |} | ||
Line 845: | Line 843: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || [[#CreateMonitorService]] | | 0 || [[#CreateMonitorService|CreateMonitorService]] | ||
|} | |} | ||
Line 858: | Line 856: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || [[# | | 0 || [[#Initialize_5|Initialize]] | ||
|- | |- | ||
| 288 || [[#GetGroupInfo]] | | 288 || [[#GetGroupInfo|GetGroupInfo]] | ||
|- | |- | ||
| 320 || [[#GetLinkLevel]] | | 320 || [[#GetLinkLevel|GetLinkLevel]] | ||
|} | |} | ||
Line 889: | Line 887: | ||
|- | |- | ||
| 6 || Error | | 6 || Error | ||
|} | |} | ||
Line 920: | Line 917: | ||
|} | |} | ||
= | = MacAddress = | ||
This is "nn::ldn:: | This is "nn::ldn::MacAddress". This is a 6-byte struct with 1-byte alignment. | ||
= NodeInfo = | |||
This is "nn::ldn::NodeInfo". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 || 0x4 || [[#Ipv4Address|Ipv4Address]] | |||
|- | |||
| 0x4 || 0x6 || [[#MacAddress|MacAddress]] | |||
|- | |||
| 0xA || 0x1 || NodeId | |||
|- | |||
| 0xB || 0x1 || IsConnected | |||
|- | |||
| 0xC || 0x21 || UserName | |||
|- | |||
| 0x2D || 0x1 || Reserved | |||
|- | |||
| 0x2E || 0x2 || LocalCommunicationVersion | |||
|- | |||
| 0x30 || 0x10 || Reserved | |||
|} | |||
= NodeLatestUpdate = | |||
This is "nn::ldn::NodeLatestUpdate". This is a 0x8-byte struct. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 || 0x1 || StateChange | |||
|- | |||
| 0x1 || 0x7 || Reserved | |||
|} | |||
= IntentId = | |||
This is "nn::ldn::IntentId". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 935: | Line 973: | ||
| 0x8 || 0x2 || Reserved | | 0x8 || 0x2 || Reserved | ||
|- | |- | ||
| 0xA || 0x2 || | | 0xA || 0x2 || SceneId | ||
|- | |- | ||
| 0xC || 0x4 || Reserved | | 0xC || 0x4 || Reserved | ||
|} | |||
= SessionId = | |||
This is "nn::ldn::SessionId". | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
! Offset | |||
! Size | |||
! Description | |||
|- | |- | ||
| | | 0x0 || 0x10 || Random | ||
|} | |||
= NetworkId = | |||
This is "nn::ldn::NetworkId". This is a 0x20-byte struct. | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
! Offset | |||
! Size | |||
! Description | |||
|- | |- | ||
| | | 0x0 || 0x10 || [[#IntentId|IntentId]] | ||
|- | |- | ||
| | | 0x10 || 0x10 || [[#SessionId|SessionId]] | ||
|} | |||
= CommonNetworkInfo = | |||
This is "nn::ldn::CommonNetworkInfo". This is a 0x30-byte struct. | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
! Offset | |||
! Size | |||
! Description | |||
|- | |- | ||
| | | 0x0 || 0x6 || [[#MacAddress|Bssid]] | ||
|- | |- | ||
| | | 0x6 || 0x22 || [[#Ssid|Ssid]] | ||
|- | |- | ||
| | | 0x28 || 0x2 || Channel | ||
|- | |- | ||
| | | 0x2A || 0x1 || LinkLevel | ||
|- | |- | ||
| | | 0x2B || 0x1 || NetworkType | ||
|- | |||
| 0x2C || 0x4 || Reserved | |||
|} | |||
= LdnNetworkInfo = | |||
This is "nn::ldn::LdnNetworkInfo". This is a 0x430-byte struct. | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
! Offset | |||
! Size | |||
! Description | |||
|- | |- | ||
| | | 0x0 || 0x10 || ServerRandom | ||
|- | |- | ||
| | | 0x10 || 0x2 || SecurityMode | ||
|- | |- | ||
| | | 0x12 || 0x1 || StationAcceptPolicy | ||
|- | |- | ||
| | | 0x13 || 0x1 || Version | ||
|- | |- | ||
| | | 0x14 || 0x2 || Reserved | ||
|- | |- | ||
| | | 0x16 || 0x1 || NodeCountMax | ||
|- | |- | ||
| | | 0x17 || 0x1 || NodeCount | ||
|- | |- | ||
| | | 0x18 || 0x200 (0x40 * 8) || [[#NodeInfo|Nodes]] | ||
|- | |||
| 0x218 || 0x2 || Reserved | |||
|- | |||
| 0x21A || 0x2 || AdvertiseDataSize | |||
|- | |||
| 0x21C || 0x180 || AdvertiseData | |||
|- | |||
| 0x39C || 0x8C || Reserved | |||
|- | |||
| 0x428 || 0x8 || [6.0.0+] Challenge (set to the output from [[ETicket_services|es]] cmd1501 during network creation) | |||
|} | |} | ||
= | = NetworkInfo = | ||
This is "nn::ldn:: | This is "nn::ldn::NetworkInfo". This is a 0x480-byte struct. | ||
The fields listed as Reserved (besides the fields before +0x10) are cleared during the memset and are not written to again afterwards, with cmds which return NetworkInfo. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 991: | Line 1,073: | ||
! Description | ! Description | ||
|- | |- | ||
| 0x0 || | | 0x0 || 0x20 || [[#NetworkId|NetworkId]] | ||
|- | |- | ||
| | | 0x20 || 0x30 || [[#CommonNetworkInfo|Common]] | ||
|- | |- | ||
| | | 0x50 || 0x430 || [[#LdnNetworkInfo|Ldn]] | ||
|} | |||
= ScanFilter = | |||
This is "nn::ldn::ScanFilter". This is a 0x60-byte struct with 8-byte alignment. | |||
sdknso copies the input ScanFilter to a tmp struct on stack, which is then used with the cmd. | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
! Offset | |||
! Size | |||
! Description | |||
|- | |- | ||
| | | 0x0 || 0x20 || [[#NetworkId|NetworkId]] | ||
|- | |- | ||
| 0x20 || 0x4 || | | 0x20 || 0x4 || NetworkType | ||
|- | |- | ||
| 0x24 || 0x6 || [[#MacAddress| | | 0x24 || 0x6 || [[#MacAddress|Bssid]] | ||
|- | |- | ||
| 0x2A || 0x22 || [[#Ssid | | 0x2A || 0x22 || [[#Ssid|Ssid]] | ||
|- | |- | ||
| 0x4C || 0x10 || | | 0x4C || 0x10 || Reserved | ||
|- | |- | ||
| 0x5C || 0x4 || [[#ScanFilterFlag|Flag]] | | 0x5C || 0x4 || [[#ScanFilterFlag|Flag]] | ||
|} | |} | ||
Line 1,052: | Line 1,144: | ||
! Description | ! Description | ||
|- | |- | ||
| 0x0 || | | 0x0 || 0x10 || [[#IntentId|IntentId]] | ||
|- | |- | ||
| | | 0x10 || 0x2 || Channel | ||
|- | |- | ||
| | | 0x12 || 0x1 || NodeCountMax | ||
|- | |- | ||
| | | 0x13 || 0x1 || Reserved | ||
|- | |- | ||
| | | 0x14 || 0x2 || LocalCommunicationVersion | ||
|- | |- | ||
| 0x16 || 0xA || Reserved | |||
| 0x16 || 0xA || | |||
|} | |} | ||
Line 1,100: | Line 1,172: | ||
|} | |} | ||
= | = WirelessAudioRestriction = | ||
This is "nn::ldn:: | This is "nn::ldn::WirelessAudioRestriction". This is an u32 enum. | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 1,165: | Line 1,237: | ||
|- | |- | ||
| 0x10 || 0x10 || [[#SessionId|SessionId]] | | 0x10 || 0x10 || [[#SessionId|SessionId]] | ||
|} | |} | ||
Line 1,226: | Line 1,286: | ||
|- | |- | ||
| 3 || WhiteList (only addresses in the [[#AddAcceptFilterEntry|list]] are allowed) | | 3 || WhiteList (only addresses in the [[#AddAcceptFilterEntry|list]] are allowed) | ||
|} | |} | ||
Line 1,308: | Line 1,337: | ||
|- | |- | ||
| 1 || HighSpeed | | 1 || HighSpeed | ||
|} | |||
= Protocol = | |||
This is "nn::ldn::Protocol". This is an u32 enum. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Value | |||
! Description | |||
|- | |||
| 0 || Default | |||
|- | |||
| 1 || NX | |||
|} | |} | ||