pub struct IpcPeer {
pub uid: Option<u32>,
pub gid: Option<u32>,
pub pid: Option<i32>,
pub off_box_source: bool,
pub injector: Option<InjectorClaim>,
pub conn: u64,
}Expand description
Who wrote an inbound payload, as the accepting socket can tell.
The credentials come from the kernel (SO_PEERCRED and its equivalents),
so they cannot be forged by the writer. off_box_source and injector are
the writer’s own declarations (see IPC_DECLARE_OFF_BOX_SOURCE /
IPC_DECLARE_INJECTOR_PREFIX) and are sticky for the life of the
connection, except that a plugin-plane writer (is_plugin_peer) starts
out as an injector whatever it declares. Not Copy: the injector claim
carries owned strings.
Fields§
§uid: Option<u32>§gid: Option<u32>§pid: Option<i32>§off_box_source: boolThe writing process has declared that it is forwarding bytes that reached this node from somewhere else.
injector: Option<InjectorClaim>The writer is an autonomous injector, so its commands are subject to
the PIC arbiter: it declared itself one, or its kernel credentials put
it on the plugin plane. None = an operator/human writer, never gated.
conn: u64This connection’s serial, unique within the accepting process, so a consumer can keep per-connection state (a partial frame) apart.
Trait Implementations§
impl Eq for IpcPeer
impl StructuralPartialEq for IpcPeer
Auto Trait Implementations§
impl Freeze for IpcPeer
impl RefUnwindSafe for IpcPeer
impl Send for IpcPeer
impl Sync for IpcPeer
impl Unpin for IpcPeer
impl UnsafeUnpin for IpcPeer
impl UnwindSafe for IpcPeer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.