pub struct AuthenticatedChannel { /* private fields */ }Expand description
Authenticated private control channel with a pollable peer-lifecycle handle.
Implementations§
Source§impl AuthenticatedChannel
impl AuthenticatedChannel
Sourcepub fn new(
stream: UnixStream,
expected: PeerCredentials,
nonce: [u8; 32],
) -> Result<Self, LinuxError>
pub fn new( stream: UnixStream, expected: PeerCredentials, nonce: [u8; 32], ) -> Result<Self, LinuxError>
Authenticates an already-private post-exec Unix connection.
Sourcepub const fn peer(&self) -> PeerCredentials
pub const fn peer(&self) -> PeerCredentials
Returns the kernel-authenticated peer credentials.
Sourcepub fn peer_exited(&self) -> Result<bool, LinuxError>
pub fn peer_exited(&self) -> Result<bool, LinuxError>
Returns whether the peer pidfd currently reports exit without blocking.
Sourcepub fn transfer_writer(
&mut self,
prepared: PreparedWriter,
) -> Result<WriterRegion<LinuxWriterMapping>, LinuxError>
pub fn transfer_writer( &mut self, prepared: PreparedWriter, ) -> Result<WriterRegion<LinuxWriterMapping>, LinuxError>
Transfers a prepared reader capability and withholds the local writer until authenticated peer validation completes the READY/COMMIT barrier.
prepared must come from QuiescentRegion::prepare_writer. This call
owns the complete serialized transaction and returns only after the peer
validates the exact manifest and accepts COMMIT.
§Errors
Returns an error for peer exit, timeout, malformed or stale control frames, descriptor-transfer failure, or a mismatched READY transcript. Any ambiguous failure poisons the channel and terminates an owned helper.
Sourcepub fn receive_reader(
&mut self,
expected_len: usize,
expected: ValidationExpectations,
topology: RegionSetLayout,
) -> Result<ReaderRegion<LinuxReaderMapping>, LinuxError>
pub fn receive_reader( &mut self, expected_len: usize, expected: ValidationExpectations, topology: RegionSetLayout, ) -> Result<ReaderRegion<LinuxReaderMapping>, LinuxError>
Receives, validates, maps, and binds one read-only capability.
expected_len is the exact page-rounded native capability length;
expected and topology identify the canonical region. The returned
reader remains unavailable internally until COMMIT is received.
§Errors
Returns an error for peer exit, timeout, malformed ancillary data, invalid seals or length, layout rejection, or a mismatched COMMIT.