Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
net_buf Struct Reference

Network buffer representation. More...

#include <buf.h>

Data Fields

union {
   sys_snode_t   node
 
   struct net_buf *   frags
 
}; 
 
uint8_t ref
 
uint8_t flags
 
uint8_t pool_id
 
union {
   struct {
      uint8_t *   data
 
      uint16_t   len
 
      uint16_t   size
 
   } 
 
   struct net_buf_simple   b
 
}; 
 
uint8_t user_data [0]
 

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::@132

◆ 

union { ... } net_buf::@134

◆ 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[0]

System metadata for this buffer.


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