Migration services: Difference between revisions

No edit summary
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 28: Line 28:
| 201 || [7.0.0+] [[#ResumeUserMigrationClient|ResumeUserMigrationClient]] ([4.0.0-6.2.0] ResumeClient)
| 201 || [7.0.0+] [[#ResumeUserMigrationClient|ResumeUserMigrationClient]] ([4.0.0-6.2.0] ResumeClient)
|-
|-
| 1001 || [8.0.0+] [[#GetSaveDataMigrationPolicyInfoAsync|GetSaveDataMigrationPolicyInfoAsync]]
| 1001 || [8.0.0-20.5.0] [[#GetSaveDataMigrationPolicyInfoAsync|GetSaveDataMigrationPolicyInfoAsync]]
|-
|-
| 1010 || [7.0.0+] TryGetLastSaveDataMigrationInfo
| 1010 || [7.0.0+] TryGetLastSaveDataMigrationInfo
Line 311: Line 311:
|-
|-
| 210 || [8.0.0+] WaitAcceptanceAsync
| 210 || [8.0.0+] WaitAcceptanceAsync
|-
| 220 || [21.0.0+]
|-
|-
| 300 || ProcessTransferAsync
| 300 || ProcessTransferAsync
Line 318: Line 320:
| 500 || [7.0.0-19.0.1] Abort
| 500 || [7.0.0-19.0.1] Abort
|-
|-
| 510 || [19.0.0+]
| 510 || [19.0.0-20.5.0]
|-
| 511 || [21.0.0+]
|-
|-
| 998 || [8.0.0+] DebugTryGetState
| 998 || [8.0.0+] DebugTryGetState
Line 384: Line 388:
| 220 || [8.0.0+] AcceptAsync
| 220 || [8.0.0+] AcceptAsync
|-
|-
| 221 || [8.0.0+] DeclineAsync
| 221 || [8.0.0-20.5.0] DeclineAsync
|-
| 222 || [21.0.0+]  
|-
|-
| 300 || GetStorageShortfall
| 300 || GetStorageShortfall
Line 454: Line 460:
| 111 ||  
| 111 ||  
|-
|-
| 120 ||  
| 120 || [20.0.0-20.5.0]
|-
| 121 || [21.0.0+]
|-
|-
| 130 ||  
| 130 ||  
Line 468: Line 476:
| 400 ||  
| 400 ||  
|-
|-
| 510 ||  
| 510 || [20.0.0-20.5.0]
|-
| 511 || [21.0.0+]
|-
|-
| 900 ||  
| 900 ||  
Line 577: Line 587:
| 90 ||  
| 90 ||  
|-
|-
| 100 ||  
| 100 || [20.0.0-20.5.0]
|-
| 101 || [21.0.0+]
|-
|-
| 310 ||  
| 310 ||  
Line 593: Line 605:
| 500 ||  
| 500 ||  
|-
|-
| 610 ||  
| 610 || [20.0.0-20.5.0]
|-
| 611 || [21.0.0+]
|-
|-
| 900 ||  
| 900 ||  
Line 644: Line 658:
|-
|-
| 330 ||  
| 330 ||  
|-
| 390 || [21.0.0+]
|-
|-
| 400 ||  
| 400 ||  
Line 672: Line 688:


Any data here which is initialized is usually zeros?
Any data here which is initialized is usually zeros?
= Protocol =
Once connected with [[LDN_services|ldn]], the client node connects to the server with TCP port 441.
The first byte of messages is the message-type.
Messages are encrypted with AES-128-GCM. The key is derived during the initial message-handling loop (WaitConnectionAsync).


= AdvertiseData =
= AdvertiseData =
Line 678: Line 701:
The global constant used with hashing below is the same regardless of the AdvertiseData.
The global constant used with hashing below is the same regardless of the AdvertiseData.


Later the server also sets the AdvertiseData to {0x10-byte data}.
Later the server also sets the AdvertiseData to {0x10-byte Uuid previously used below}.
 
The Uuid used below is generated with <code>nn::util::GenerateUuid</code>.


== user ==
== user ==
Line 731: Line 756:
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x10 ||  
| 0x0 || 0x10 || Uuid
|-
|-
| 0x10 || 0x8 || AccountId
| 0x10 || 0x8 || AccountId
Line 747: Line 772:


The hash is calculated by using SHA256-update with each field separately, followed by global constant:
The hash is calculated by using SHA256-update with each field separately, followed by global constant:
* +0x0 size 0x10
* Uuid
* AccountId
* AccountId
* ApplicationId
* ApplicationId
Line 761: Line 786:
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x10 ||  
| 0x0 || 0x10 || Uuid
|-
|-
| 0x10 || 0x40 (0x8*0x8) || Array of u64s with the below count.
| 0x10 || 0x40 (0x8*0x8) || Array of u64s with the below count.
Line 775: Line 800:


The hash is calculated by using SHA256-update with each field separately, followed by global constant:
The hash is calculated by using SHA256-update with each field separately, followed by global constant:
* +0x0 size 0x10-bytes
* Uuid
* +0x10 size 0x40-bytes
* +0x10 size 0x40-bytes
* +0x50 size 0x4-bytes
* +0x50 size 0x4-bytes