pub struct SixlowpanIphcRepr {
pub src_addr: Address,
pub ll_src_addr: Option<Address>,
pub dst_addr: Address,
pub ll_dst_addr: Option<Address>,
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<Address>§dst_addr: Address§ll_dst_addr: Option<Address>§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.
Trait Implementations§
impl Copy for Repr
impl Eq for Repr
impl StructuralPartialEq for Repr
Auto Trait Implementations§
impl Freeze for Repr
impl RefUnwindSafe for Repr
impl Send for Repr
impl Sync for Repr
impl Unpin for Repr
impl UnwindSafe for Repr
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