DRD Server Get — Group 16, Code 150

Open read of one or many server-role descriptors stored by DRD Server Post.

Quick reference

Command Group16 (DRD)
Command Code150
Server functioncmd_drd_server_get
Header versionHV=2 only (HV=1 returns 219)
AccessOpen read (no identity block in body)
TransportSingle-row selectors fit UDP; large listings may require TCP (218)
IdempotentYes

Request body

OffsetSizeFieldDescription
01role0..4 for one role, or 0xFF for all roles.
11selector0x00 all rows, 0x01 one row by dn+sn, 0x02 one RAIDA by raida_id, 0x03 paginated rows (see below).
2...varselector payload0x00: none; 0x01: dn(1)+sn(4); 0x02: raida_id(1).

Response body

Body starts with count (2-byte BE), followed by that many records.

FieldSizeDescription
count2Number of returned records. 0 is valid success.
recordvariablerole(1), dn(1), sn(4), created_at(8), updated_at(8), last_seen_at(8), field_count(2), TLVs.

Selector semantics

  • role=0xFF is valid only with selector 0x00; otherwise 198.
  • Selector 0x02 is valid only when role is RAIDA (0) and raida_id is 0..24.
  • Selector miss returns 193 (ERROR_NO_ENTRY).
  • All-rows result is capped by server-side list maximum (DRD_SERVER_LIST_MAX).
  • On UDP, oversized listings return 218 and must be retried over TCP.

QMail discovery pagination (selector 0x03)

Use role 1 for independent QMail Content Servers. Selector 0x03 adds bounded pagination without changing legacy selectors. Its payload is exactly 10 bytes: role(1), selector=3(1), cursor_present(1, 0 or 1), cursor_dn(1), cursor_sn(4, BE), page_size(2, BE, 1..DRD_SERVER_LIST_MAX). For the first page set cursor_present=0. Subsequent requests use the returned cursor on the same directory replica.

The response starts with count(2, BE), has_more(1), next_dn(1), next_sn(4, BE), then count records in the format above. With no rows, the returned cursor is zero. Listings order by denomination and serial number. A cursor is not a snapshot lock; concurrent publications can change a later page. Withdrawn QMail records are excluded. Selector 0 remains a capped legacy listing and does not supply a cursor.

Retry an oversized UDP reply over TCP. A failed or unsupported page is an error, not an empty directory. QMail currently reads at most 8 pages / 64 compatible endpoints and labels a truncated view as partial. It may fail over before accepting the first page, but never moves an accepted cursor to another replica.

QMail reported data and client caching

QMail software version is returned in TLV 0x25 (four-byte unsigned BE, YYYYMMDD). Zero or absent means unknown. It identifies the reported running Content Server build; it is not an authenticated capability guarantee.

Response TLVs use the tags documented in Server Post, including jurisdiction (0x02), storage_available (0x22, bytes), upload_bps (0x28, bits/second), and download_bps (0x29, bits/second). These are owner-reported values, not directory measurements. An absent numeric TLV means unknown; a present zero means reported zero.

QMail accepts nonnegative values up to INT64_MAX. It caches these reports for an exact configured endpoint, including identity, host, port, framing profile, key ID, and node ID. Reports never replace user settings, select an upload destination, or imply a successful authenticated connection. Separate endpoints of one provider remain separate rows; they are not separate providers for stripe diversity.

Successful discovery refreshes matching configured endpoints. A failed page or database transaction preserves the previous cache. Endpoints absent from the received view are left unchanged. A missing metric in a received descriptor becomes unknown. The client's reported_at timestamp records local receipt/cache time, not the age of the owner's measurement or a lease. No lease or automatic trust expiry is implied.

Status codes

CodeSymbolMeaning
250STATUS_SUCCESSRead succeeded (including count=0).
16ERROR_INVALID_PACKET_LENGTHMalformed body length for selected selector.
36ERROR_EMPTY_REQUESTBody missing.
193ERROR_NO_ENTRYRequested row or slot does not exist.
198ERROR_INVALID_PARAMETERInvalid role/selector combination or bad selector argument.
218ERROR_TCP_REQUIREDUDP response exceeded one datagram budget.
219ERROR_UNSUPPORTED_PROTOCOLCommand 150 sent as HV=1.
252ERROR_INTERNALStorage-layer failure.
254ERROR_MEMORY_ALLOCAllocation failure while building response.