LDN services: Difference between revisions

No edit summary
No edit summary
Line 109: Line 109:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#GetState_1|GetState]]
| 0 || [[#GetState_2|GetState]]
|-
|-
| 1 || [[#GetNetworkInfo_1|GetNetworkInfo]]
| 1 || [[#GetNetworkInfo_2|GetNetworkInfo]]
|-
|-
| 2 || [[#GetIpv4Address_1|GetIpv4Address]]
| 2 || [[#GetIpv4Address_2|GetIpv4Address]]
|-
|-
| 3 || [[#GetDisconnectReason_1|GetDisconnectReason]]
| 3 || [[#GetDisconnectReason_2|GetDisconnectReason]]
|-
|-
| 4 || [[#GetSecurityParameter_1|GetSecurityParameter]]
| 4 || [[#GetSecurityParameter_2|GetSecurityParameter]]
|-
|-
| 5 || [[#GetNetworkConfig_1|GetNetworkConfig]]
| 5 || [[#GetNetworkConfig_2|GetNetworkConfig]]
|-
|-
| 100 || [[#GetStateChangeEvent|GetStateChangeEvent]]
| 100 || [[#GetStateChangeEvent|GetStateChangeEvent]]
Line 165: Line 165:
| 304 || [[#Disconnect|Disconnect]]
| 304 || [[#Disconnect|Disconnect]]
|-
|-
| 400 || [[#Initialize_1|Initialize]]
| 400 || [[#Initialize_2|Initialize]]
|-
|-
| 401 || [[#Finalize_1|Finalize]]
| 401 || [[#Finalize_2|Finalize]]
|-
|-
| 402 || [4.0.0+] [[#SetOperationMode|SetOperationMode]]
| 402 || [4.0.0+] [[#SetOperationMode|SetOperationMode]]
Line 388: Line 388:
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_1|Initialize]].
The input u32 is ignored, the impl for this cmd is identical to [[#Initialize_2|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 399: Line 399:
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 [[#InitializeWithVersion_1|InitializeWithVersion]], with the additional cmd input u32 now being passed directly to the init func which is called here.
This is similar to [[#InitializeWithVersion_2|InitializeWithVersion]], with the additional cmd input u32 now being passed directly to the init func which is called here.


=== SetHomeChannel ===
=== SetHomeChannel ===
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_2|Initialize]]/[[#Initialize_2|InitializeWithVersion]] differ.
This is identical to [[#ISystemLocalCommunicationService]], except for the System-only cmd(s), and [[#Initialize_3|Initialize]]/[[#Initialize_3|InitializeWithVersion]] differ.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 442: Line 442:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#GetState_1|GetState]]
| 0 || [[#GetState_2|GetState]]
|-
|-
| 1 || [[#GetNetworkInfo_1|GetNetworkInfo]]
| 1 || [[#GetNetworkInfo_2|GetNetworkInfo]]
|-
|-
| 2 || [[#GetIpv4Address_1|GetIpv4Address]]
| 2 || [[#GetIpv4Address_2|GetIpv4Address]]
|-
|-
| 3 || [[#GetDisconnectReason_1|GetDisconnectReason]]
| 3 || [[#GetDisconnectReason_2|GetDisconnectReason]]
|-
|-
| 4 || [[#GetSecurityParameter_1|GetSecurityParameter]]
| 4 || [[#GetSecurityParameter_2|GetSecurityParameter]]
|-
|-
| 5 || [[#GetNetworkConfig_1|GetNetworkConfig]]
| 5 || [[#GetNetworkConfig_2|GetNetworkConfig]]
|-
|-
| 100 || [[#GetStateChangeEvent|GetStateChangeEvent]]
| 100 || [[#GetStateChangeEvent|GetStateChangeEvent]]
Line 498: Line 498:
| 304 || [[#Disconnect|Disconnect]]
| 304 || [[#Disconnect|Disconnect]]
|-
|-
| 400 || [[#Initialize_2|Initialize]]
| 400 || [[#Initialize_3|Initialize]]
|-
|-
| 401 || [[#Finalize_2|Finalize]]
| 401 || [[#Finalize_3|Finalize]]
|-
|-
| 402 || [7.0.0+] [[#InitializeWithVersion_2|InitializeWithVersion]]
| 402 || [7.0.0+] [[#InitializeWithVersion_3|InitializeWithVersion]]
|-
|-
| 403 || [19.0.0+] [[#InitializeWithPriority|InitializeWithPriority]]
| 403 || [19.0.0+] [[#InitializeWithPriority|InitializeWithPriority]]
Line 526: Line 526:
This is used immediately after object creation.
This is used immediately after object creation.


With [7.0.0+] [[#InitializeWithVersion_2|InitializeWithVersion]] is used instead.
With [7.0.0+] [[#InitializeWithVersion_3|InitializeWithVersion]] is used instead.


This is identical to [[#Initialize_1|Initialize]] except different params are used for the funcs called internally.
This is identical to [[#Initialize_2|Initialize]] except different params are used for the funcs called internally.


=== Finalize ===
=== Finalize ===
Line 540: Line 540:
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_2|Initialize]].
The input u32 is ignored, the impl for this cmd is identical to [[#Initialize_3|Initialize]].


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.
This is identical to [[#InitializeWithVersion_3|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 635: Line 635:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#Initialize_3|Initialize]]
| 0 || [[#Initialize_4|Initialize]]
|-
|-
| 256 || [9.0.0-9.0.1] [[#AttachNetworkInterfaceStateChangeEvent|AttachNetworkInterfaceStateChangeEvent]]
| 256 || [9.0.0-9.0.1] [[#AttachNetworkInterfaceStateChangeEvent|AttachNetworkInterfaceStateChangeEvent]]
Line 655: Line 655:
| 320 || [9.0.0-9.0.1] [[#GetLinkLevel|GetLinkLevel]]
| 320 || [9.0.0-9.0.1] [[#GetLinkLevel|GetLinkLevel]]
|-
|-
| 512 || [[#Scan_1|Scan]]
| 512 || [[#Scan_2|Scan]]
|-
|-
| 768 || [[#CreateGroup|CreateGroup]]
| 768 || [[#CreateGroup|CreateGroup]]
Line 748: Line 748:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#Initialize_4|Initialize]]
| 0 || [[#Initialize_5|Initialize]]
|-
|-
| 256 || [[#AttachNetworkInterfaceStateChangeEvent|AttachNetworkInterfaceStateChangeEvent]]
| 256 || [[#AttachNetworkInterfaceStateChangeEvent|AttachNetworkInterfaceStateChangeEvent]]
Line 856: Line 856:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#Initialize_5|Initialize]]
| 0 || [[#Initialize_6|Initialize]]
|-
|-
| 288 || [[#GetGroupInfo|GetGroupInfo]]
| 288 || [[#GetGroupInfo|GetGroupInfo]]