#[repr(C, align(64))]pub struct IpcMessage {
pub sender: u64,
pub msg_type: u32,
pub flags: u32,
pub payload: [u8; 240],
}Expand description
Fixed-size IPC message (256 bytes, 64-byte aligned).
Used by IPC ports, channels, and the transport layer. The header occupies 16 bytes; the payload is 240 bytes.
Fields§
§sender: u64PID/TID of the sending process.
msg_type: u32Message type identifier (protocol-specific).
flags: u32Message flags (protocol-specific).
payload: [u8; 240]Payload data (up to 240 bytes).
Implementations§
Source§impl IpcMessage
impl IpcMessage
Sourcepub const WIRE_SIZE: usize = IPC_MESSAGE_SIZE
pub const WIRE_SIZE: usize = IPC_MESSAGE_SIZE
Total wire size of the message (including header).
Sourcepub const PAYLOAD_CAPACITY: usize = IPC_PAYLOAD_CAPACITY
pub const PAYLOAD_CAPACITY: usize = IPC_PAYLOAD_CAPACITY
Maximum payload bytes.
Sourcepub const OPEN_INLINE_CAPACITY: usize
pub const OPEN_INLINE_CAPACITY: usize
Usable payload capacity for OPEN inline path (240 - 6 bytes overhead).
Sourcepub const UNLINK_INLINE_CAPACITY: usize
pub const UNLINK_INLINE_CAPACITY: usize
Usable payload capacity for UNLINK inline path (240 - 2 bytes overhead).
Sourcepub const READ_INLINE_CAPACITY: usize
pub const READ_INLINE_CAPACITY: usize
Usable payload capacity for READ inline path (240 - 8 bytes overhead).
Sourcepub const WRITE_INLINE_CAPACITY: usize
pub const WRITE_INLINE_CAPACITY: usize
Usable payload capacity for WRITE inline path (240 - 18 bytes overhead).
Sourcepub fn error_reply(sender: u64, status: i32) -> Self
pub fn error_reply(sender: u64, status: i32) -> Self
Build a standard error reply carrying a status code in payload.
The msg_type is set to 0x80 (error reply marker).
The payload contains the error code as a little-endian i32.
Trait Implementations§
Source§impl Clone for IpcMessage
impl Clone for IpcMessage
Source§fn clone(&self) -> IpcMessage
fn clone(&self) -> IpcMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more