Migration services: Difference between revisions
| (5 intermediate revisions by the same user not shown) | |||
| Line 844: | Line 844: | ||
| 0x0 || 0x1 || MessageId | | 0x0 || 0x1 || MessageId | ||
|- | |- | ||
| 0x1 || 0x7 || | | 0x1 || 0x7 || Reserved | ||
|} | |} | ||
| Line 867: | Line 867: | ||
| 0x1 || [[#Initialize|Initialize]] | | 0x1 || [[#Initialize|Initialize]] | ||
|- | |- | ||
| 0x8 || | | 0x8 || [[#Challenge|Challenge]] | ||
|- | |- | ||
| 0x9 || [[#Initialize|Initialize2]] | | 0x9 || [[#Initialize|Initialize2]] | ||
|- | |- | ||
| 0x10 || | | 0x10 || [[#Leave|Leave]] | ||
|- | |||
| 0x80 || [[#Data|Data]] | |||
|- | |||
| 0xFF || [[#Error|Error]] | |||
|} | |} | ||
| Line 907: | Line 911: | ||
| 0x0 || 0x28 || Passphrase for key derivation. | | 0x0 || 0x28 || Passphrase for key derivation. | ||
|- | |- | ||
| 0x28 || 0x20 || Must match the random data previously sent by the | | 0x28 || 0x20 || Must match the random data previously sent by the client. | ||
|- | |- | ||
| 0x48 || 0x20 || | | 0x48 || 0x20 || | ||
| Line 917: | Line 921: | ||
=== Initialize === | === Initialize === | ||
This request is sent after [[#KeyExchange|KeyExchange]]. | This request is sent after [[#KeyExchange|KeyExchange]]. The Initialize2 request is sent after [[#Challenge|Challenge]]. | ||
Plaintext request payload: | Plaintext request payload: | ||
| Line 931: | Line 935: | ||
When handling the response, the client sets a state flag. The Initialize2 message is the same as Initialize, except that state field isn't updated during response handling. | When handling the response, the client sets a state flag. The Initialize2 message is the same as Initialize, except that state field isn't updated during response handling. | ||
=== Challenge === | |||
This is the first request sent after reconnecting to the server, when an existing connection was previously in use. | |||
Plaintext request payload: | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x20 || Data from [[SPL_services|GenerateRandomBytes]]. | |||
|} | |||
Plaintext response payload: | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x20 || Must match the random data previously sent by the client. | |||
|- | |||
| 0x20 || 0x20 || Copied into state by the client. | |||
|} | |||
=== Leave === | |||
This is sent by the client prior to closing the socket and temporarily leaving the ldn network. | |||
The plaintext request/response payload are empty. | |||
=== Data === | |||
This is used by the server/client to send additional data following the message. | |||
Plaintext payload: | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x4 || | |||
|- | |||
| 0x4 || 0x4 || | |||
|- | |||
| 0x8 || 0x8 || Big-endian field from state. | |||
|} | |||
The additional data is encrypted the same as if it were a message without the message-header, in chunks of up to 0x100000-bytes. | |||
=== Error === | |||
This can be sent by the server to the client to signal that an error occurred. | |||
Plaintext response payload: | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x1 || ErrorType | |||
|} | |||
If a state field is valid, it's used to load a Result from an array, otherwise the Result is determined from the above ErrorType. | |||
= Notes = | = Notes = | ||