UbixOS V2 2.0

Data Fields
pbuf Struct Reference

`#include <pbuf.h>`

Collaboration diagram for pbuf:

## Data Fields
u8_t | flags
u16_t | len
struct pbuf * | next
void * | payload
u16_t | ref
u16_t | tot_len
u8_t | type

## Detailed Description

Main packet buffer struct

Definition at line 142 of file pbuf.h.

## Field Documentation

## ◆ flags

u8_t pbuf::flags

misc flags

Definition at line 165 of file pbuf.h.

Referenced by pbuf_alloc(), and pbuf_realloc().

## ◆ len

u16_t pbuf::len

length of this buffer

Definition at line 159 of file pbuf.h.

Referenced by inet_chksum(), inet_chksum_pbuf(), lwip_strnicmp(), pbuf_alloc(), pbuf_cat(), pbuf_copy(), pbuf_copy_partial(), pbuf_dechain(), pbuf_memcmp(), pbuf_put_at(), pbuf_realloc(), pbuf_take(), and pbuf_take_at().

## ◆ next

struct pbuf* pbuf::next

next pbuf in singly linked pbuf chain

Definition at line 144 of file pbuf.h.

Referenced by inet_chksum_pbuf(), pbuf_alloc(), pbuf_cat(), pbuf_clen(), pbuf_coalesce(), pbuf_copy_partial(), pbuf_dechain(), pbuf_free(), pbuf_memcmp(), pbuf_realloc(), pbuf_take(), and pbuf_take_at().

## ◆ payload

void* pbuf::payload

pointer to the actual data in the buffer

Definition at line 147 of file pbuf.h.

Referenced by arp_arp_input(), arp_ip_input(), arp_query(), inet_chksum_pbuf(), pbuf_alloc(), pbuf_copy_partial(), pbuf_put_at(), pbuf_realloc(), pbuf_take(), and pbuf_take_at().

## ◆ ref

u16_t pbuf::ref

the 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.

Definition at line 172 of file pbuf.h.

Referenced by pbuf_alloc(), pbuf_free(), and pbuf_ref().

## ◆ tot_len

u16_t pbuf::tot_len

total 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)

Definition at line 156 of file pbuf.h.

Referenced by arp_arp_input(), pbuf_alloc(), pbuf_cat(), pbuf_coalesce(), pbuf_dechain(), pbuf_memcmp(), pbuf_memfind(), pbuf_realloc(), pbuf_strstr(), and pbuf_take_at().

## ◆ type

u8_t pbuf::type

pbuf_type as u8_t instead of enum to save space

Definition at line 162 of file pbuf.h.

Referenced by pbuf_alloc(), pbuf_free(), and pbuf_realloc().

The documentation for this struct was generated from the following file:

- C:/Dev/git/UbixOS/sys/include/net/pbuf.h