Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
net_buf Struct Reference

Network buffer representation. More...

#include <buf.h>

Data Fields

sys_snode_t node
 Allow placing the buffer into sys_slist_t.
 
struct net_buffrags
 Fragments associated with this buffer.
 
uint8_t ref
 Reference count.
 
uint8_t flags
 Bit-field of buffer flags.
 
uint8_t pool_id
 Where the buffer should go when freed up.
 
uint8_t user_data_size
 
union {
   struct {
      uint8_t *   data
 Pointer to the start of data in the buffer. More...
 
      uint16_t   len
 Length of the data behind the data pointer. More...
 
      uint16_t   size
 Amount of data that this buffer can store. More...
 
   } 
 
   struct net_buf_simple   b
 
}; 
 
uint8_t user_data []
 System metadata for this buffer.
 

Detailed Description

Network buffer representation.

This struct is used to represent network buffers. Such buffers are normally defined through the NET_BUF_POOL_*_DEFINE() APIs and allocated using the net_buf_alloc() API.

Field Documentation

◆ 

union { ... } net_buf::@274

◆ b

struct net_buf_simple net_buf::b

◆ data

uint8_t* net_buf::data

Pointer to the start of data in the buffer.

◆ flags

uint8_t net_buf::flags

Bit-field of buffer flags.

◆ frags

struct net_buf* net_buf::frags

Fragments associated with this buffer.

◆ len

uint16_t net_buf::len

Length of the data behind the data pointer.

◆ node

sys_snode_t net_buf::node

Allow placing the buffer into sys_slist_t.

◆ pool_id

uint8_t net_buf::pool_id

Where the buffer should go when freed up.

◆ ref

uint8_t net_buf::ref

Reference count.

◆ size

uint16_t net_buf::size

Amount of data that this buffer can store.

◆ user_data

uint8_t net_buf::user_data[]

System metadata for this buffer.

◆ user_data_size

uint8_t net_buf::user_data_size

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