Struct smoltcp::wire::SixlowpanIphcRepr
source · pub struct SixlowpanIphcRepr {
pub src_addr: Address,
pub ll_src_addr: Option<LlAddress>,
pub dst_addr: Address,
pub ll_dst_addr: Option<LlAddress>,
pub next_header: NextHeader,
pub hop_limit: u8,
pub ecn: Option<u8>,
pub dscp: Option<u8>,
pub flow_label: Option<u16>,
}
Expand description
A high-level representation of a 6LoWPAN IPHC header.
Fields§
§src_addr: Address
§ll_src_addr: Option<LlAddress>
§dst_addr: Address
§ll_dst_addr: Option<LlAddress>
§next_header: NextHeader
§hop_limit: u8
§ecn: Option<u8>
§dscp: Option<u8>
§flow_label: Option<u16>
Implementations§
source§impl Repr
impl Repr
sourcepub fn parse<T: AsRef<[u8]> + ?Sized>(
packet: &Packet<&T>,
ll_src_addr: Option<LlAddress>,
ll_dst_addr: Option<LlAddress>,
addr_context: &[AddressContext]
) -> Result<Self>
pub fn parse<T: AsRef<[u8]> + ?Sized>(
packet: &Packet<&T>,
ll_src_addr: Option<LlAddress>,
ll_dst_addr: Option<LlAddress>,
addr_context: &[AddressContext]
) -> Result<Self>
Parse a 6LoWPAN IPHC header and return a high-level representation.
The ll_src_addr
and ll_dst_addr
are the link-local addresses used for resolving the
IPv6 packets.
sourcepub fn buffer_len(&self) -> usize
pub fn buffer_len(&self) -> usize
Return the length of a header that will be emitted from this high-level representation.