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

FieldBytesDescription
CH (challenge)16Standard 16-byte challenge (challenge-response / replay protection).
SI (session id)4Client-chosen session id (echoed/used to correlate the later switch + pickup).
OP1Operation selector; must be 3 or 4.
DN bitmap16One byte per denomination (index = den + 8). Nonzero byte = include that denomination in the search.
EOF2Terminator (0x3E3E).

Response Body parameters

FieldBytesDescription
(per denomination, repeating)varFor 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)).