pub struct AdspPacket {
pub descriptor: AdspDescriptor,
pub connection_id: u16,
pub first_byte_seq: u32,
pub next_recv_seq: u32,
pub recv_window: u16,
pub flags: u8,
}Expand description
ADSP packet header structure
ADSP (AppleTalk Data Stream Protocol) provides connection-oriented, full-duplex byte-stream communication over DDP.
Packet format:
- Byte 0: Descriptor (packet type)
- Bytes 1-2: Connection ID (u16, big-endian)
- Bytes 3-6: First Byte Sequence number (u32, big-endian)
- Bytes 7-10: Next Receive Sequence number (u32, big-endian)
- Bytes 11-12: Receive Window size (u16, big-endian)
- Remaining bytes: Data payload (not owned by this struct)
Fields§
§descriptor: AdspDescriptorPacket type/descriptor
connection_id: u16Connection identifier
first_byte_seq: u32Sequence number of the first data byte in this packet
next_recv_seq: u32Next expected receive sequence number
recv_window: u16Receive window size (flow control)
flags: u8Flags (Control, Ack, EOM, Attention)
Implementations§
Source§impl AdspPacket
impl AdspPacket
Sourcepub const HEADER_LEN: usize = 13
pub const HEADER_LEN: usize = 13
ADSP header length in bytes
pub const FLAG_CONTROL: u8 = 0x80
pub const FLAG_ACK: u8 = 0x40
pub const FLAG_EOM: u8 = 0x20
pub const FLAG_ATTENTION: u8 = 0x10
Trait Implementations§
Source§impl Clone for AdspPacket
impl Clone for AdspPacket
Source§fn clone(&self) -> AdspPacket
fn clone(&self) -> AdspPacket
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AdspPacket
impl Debug for AdspPacket
Source§impl PartialEq for AdspPacket
impl PartialEq for AdspPacket
Source§fn eq(&self, other: &AdspPacket) -> bool
fn eq(&self, other: &AdspPacket) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for AdspPacket
impl StructuralPartialEq for AdspPacket
Auto Trait Implementations§
impl Freeze for AdspPacket
impl RefUnwindSafe for AdspPacket
impl Send for AdspPacket
impl Sync for AdspPacket
impl Unpin for AdspPacket
impl UnsafeUnpin for AdspPacket
impl UnwindSafe for AdspPacket
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
Mutably borrows from an owned value. Read more