Struct capsules::net::sixlowpan::RxState
[−]
[src]
pub struct RxState<'a> { packet: TakeCell<'static, [u8]>, bitmap: MapCell<Bitmap>, dst_mac_addr: Cell<MacAddress>, src_mac_addr: Cell<MacAddress>, dgram_tag: Cell<u16>, dgram_size: Cell<u16>, busy: Cell<bool>, start_time: Cell<u32>, next: ListLink<'a, RxState<'a>>, }
Tracks the decompression and defragmentation of an IPv6 packet
A list of RxState
s is maintained by Sixlowpan to
keep track of ongoing packet reassemblies. The number of RxState
s is the
number of packets that can be reassembled at the same time. Generally,
two RxState
s are sufficient for normal-case operation.
Fields
packet: TakeCell<'static, [u8]>
bitmap: MapCell<Bitmap>
dst_mac_addr: Cell<MacAddress>
src_mac_addr: Cell<MacAddress>
dgram_tag: Cell<u16>
dgram_size: Cell<u16>
busy: Cell<bool>
start_time: Cell<u32>
next: ListLink<'a, RxState<'a>>
Methods
impl<'a> RxState<'a>
[src]
pub fn new(packet: &'static mut [u8]) -> RxState<'a>
[src]
Creates a new RxState
Arguments
packet
- A buffer for reassembling an IPv6 packet. Currently, we
assume this to be 1280 bytes long (the minimum IPv6 MTU size).
fn is_my_fragment(
&self,
src_mac_addr: MacAddress,
dst_mac_addr: MacAddress,
dgram_size: u16,
dgram_tag: u16
) -> bool
[src]
&self,
src_mac_addr: MacAddress,
dst_mac_addr: MacAddress,
dgram_size: u16,
dgram_tag: u16
) -> bool
fn is_busy(&self, frequency: u32, current_time: u32) -> bool
[src]
fn start_receive(
&self,
src_mac_addr: MacAddress,
dst_mac_addr: MacAddress,
dgram_size: u16,
dgram_tag: u16,
current_tics: u32
)
[src]
&self,
src_mac_addr: MacAddress,
dst_mac_addr: MacAddress,
dgram_size: u16,
dgram_tag: u16,
current_tics: u32
)
fn receive_next_frame(
&self,
payload: &[u8],
payload_len: usize,
dgram_size: u16,
dgram_offset: usize,
ctx_store: &ContextStore
) -> Result<bool, ReturnCode>
[src]
&self,
payload: &[u8],
payload_len: usize,
dgram_size: u16,
dgram_offset: usize,
ctx_store: &ContextStore
) -> Result<bool, ReturnCode>