get_sns — Group 10, Code 172
Find free destination serial numbers on this RAIDA for a shard switch.
Source-derived reference
Field layout below is read from raidax/cmd_shards.c (cmd_get_sns). Minimum body size: 39 bytes. Verify against the current build before relying.
Purpose
Scans up to 1024 free serial numbers per denomination (free = MFS byte 0). Returns them compactly as ranges plus individual SNs. This is the discovery step before a switch.
Request Body parameters
| Field | Bytes | Description |
|---|---|---|
| CH (challenge) | 16 | Standard 16-byte challenge (challenge-response / replay protection). |
| SI (session id) | 4 | Client-chosen session id (echoed/used to correlate the later switch + pickup). |
| OP | 1 | Operation selector; must be 3 or 4. |
| DN bitmap | 16 | One byte per denomination (index = den + 8). Nonzero byte = include that denomination in the search. |
| EOF | 2 | Terminator (0x3E3E). |
Response Body parameters
| Field | Bytes | Description |
|---|---|---|
| (per denomination, repeating) | var | For each requested denomination: DN(1) + NR(1 = number of ranges) + NS(1 = number of singles) + ranges(NR x 8: start SN(4) + end SN(4)) + singles(NS x 4: SN(4)). |