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

Return the length of the buffer required to serialize this high-level representation.

Emit this high-level representation into a sequence of octets.

Implementors