Trait smoltcp::socket::IpPayload
[−]
[src]
pub trait IpPayload { fn buffer_len(&self) -> usize; fn emit(&self, ip_repr: &IpRepr, payload: &mut [u8]); }
An IP-encapsulated packet representation.
This trait abstracts the various types of packets layered under the IP protocol, and serves as an accessory to trait Socket.
Required Methods
fn buffer_len(&self) -> usize
Return the length of the buffer required to serialize this high-level representation.
fn emit(&self, ip_repr: &IpRepr, payload: &mut [u8])
Emit this high-level representation into a sequence of octets.