10.1 Becoming a Source
<rsi/source.h> is where a registry source begins. A source is a storage
backend for the LCS registry — the provider
counterpart to libpeios's registry client. Where a client opens keys and
reads values, a source is what actually holds those keys and values and
answers the kernel's requests for them.
This header has one job: registration. You declare which hives your
process backs, register with the kernel, and get back a source fd. From
that point on you serve the RSI (Registry Source Interface) protocol on that
fd — reading
requests and writing
responses.
Registration requires SeTcbPrivilege. The RSI wire constants
(RSI_HIVE_PRIVATE, RSI_*) come from <pkm/lcs.h>.
This is part of librsi, a separate library from libpeios — link -lrsi
and include <rsi.h> (or the individual <rsi/*.h>). It follows the same
library conventions: raw fds,
int returning 0/-1+errno, and the errno passed straight through from the
kernel.
10.1.1 See also #
- Registry sources overview — what a source is and how the RSI protocol flows.
- The registry — the operator-side model of hives, layers, and sources.