Struct bl602_sdk::wifi::pbuf [−][src]
#[repr(C)]pub struct pbuf { pub next: *mut pbuf, pub payload: *mut c_void, pub tot_len: u16_t, pub len: u16_t, pub type_internal: u8_t, pub flags: u8_t, pub ref_: u8_t, pub if_idx: u8_t, }
Expand description
Main packet buffer struct
Fields
next: *mut pbufnext pbuf in singly linked pbuf chain
payload: *mut c_voidpointer to the actual data in the buffer
tot_len: u16_ttotal length of this buffer and all next buffers in chain belonging to the same packet.
For non-queue packet chains this is the invariant: p->tot_len == p->len + (p->next? p->next->tot_len: 0)
len: u16_tlength of this buffer
type_internal: u8_ta bit field indicating pbuf type and allocation sources (see PBUF_TYPE_FLAG_, PBUF_ALLOC_FLAG_ and PBUF_TYPE_ALLOC_SRC_MASK)
flags: u8_tmisc flags
ref_: u8_tthe reference count always equals the number of pointers that refer to this pbuf. This can be pointers from an application, the stack itself, or pbuf->next pointers from a chain.
if_idx: u8_tFor incoming packets, this contains the input netif’s index
Trait Implementations
Auto Trait Implementations
Blanket Implementations
pub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
pub fn from(t: T) -> T
pub fn from(t: T) -> TPerforms the conversion.
pub fn into(self) -> U
pub fn into(self) -> UPerforms the conversion.