Lines Matching full:net_buf
9 #define LOG_MODULE_NAME net_buf
21 #include <zephyr/net_buf.h>
62 int net_buf_id(const struct net_buf *buf) in net_buf_id()
65 size_t struct_size = ROUND_UP(sizeof(struct net_buf) + pool->user_data_size, in net_buf_id()
66 __alignof__(struct net_buf)); in net_buf_id()
72 static inline struct net_buf *pool_get_uninit(struct net_buf_pool *pool, in pool_get_uninit()
75 size_t struct_size = ROUND_UP(sizeof(struct net_buf) + pool->user_data_size, in pool_get_uninit()
76 __alignof__(struct net_buf)); in pool_get_uninit()
78 struct net_buf *buf; in pool_get_uninit()
80 buf = (struct net_buf *)(((uint8_t *)pool->__bufs) + byte_offset); in pool_get_uninit()
88 void net_buf_reset(struct net_buf *buf) in net_buf_reset()
96 static uint8_t *generic_data_ref(struct net_buf *buf, uint8_t *data) in generic_data_ref()
106 static uint8_t *mem_pool_data_alloc(struct net_buf *buf, size_t *size, in mem_pool_data_alloc()
127 static void mem_pool_data_unref(struct net_buf *buf, uint8_t *data) in mem_pool_data_unref()
148 static uint8_t *fixed_data_alloc(struct net_buf *buf, size_t *size, in fixed_data_alloc()
159 static void fixed_data_unref(struct net_buf *buf, uint8_t *data) in fixed_data_unref()
171 static uint8_t *heap_data_alloc(struct net_buf *buf, size_t *size, in heap_data_alloc()
186 static void heap_data_unref(struct net_buf *buf, uint8_t *data) in heap_data_unref()
211 static uint8_t *data_alloc(struct net_buf *buf, size_t *size, k_timeout_t timeout) in data_alloc()
218 static uint8_t *data_ref(struct net_buf *buf, uint8_t *data) in data_ref()
226 struct net_buf *net_buf_alloc_len_debug(struct net_buf_pool *pool, size_t size, in net_buf_alloc_len_debug()
230 struct net_buf *net_buf_alloc_len(struct net_buf_pool *pool, size_t size, in net_buf_alloc_len_debug()
235 struct net_buf *buf; in net_buf_alloc_len_debug()
352 struct net_buf *net_buf_alloc_fixed_debug(struct net_buf_pool *pool, in net_buf_alloc_fixed_debug()
360 struct net_buf *net_buf_alloc_fixed(struct net_buf_pool *pool, in net_buf_alloc_fixed()
368 struct net_buf *net_buf_alloc_with_data_debug(struct net_buf_pool *pool, in net_buf_alloc_with_data_debug()
373 struct net_buf *net_buf_alloc_with_data(struct net_buf_pool *pool, in net_buf_alloc_with_data_debug()
378 struct net_buf *buf; in net_buf_alloc_with_data_debug()
396 struct net_buf *net_buf_get_debug(struct k_fifo *fifo, k_timeout_t timeout, in net_buf_get_debug()
399 struct net_buf *net_buf_get(struct k_fifo *fifo, k_timeout_t timeout) in net_buf_get_debug()
402 struct net_buf *buf; in net_buf_get_debug()
418 void net_buf_slist_put(sys_slist_t *list, struct net_buf *buf) in net_buf_slist_put()
430 struct net_buf *net_buf_slist_get(sys_slist_t *list) in net_buf_slist_get()
432 struct net_buf *buf; in net_buf_slist_get()
446 void net_buf_put(struct k_fifo *fifo, struct net_buf *buf) in net_buf_put()
455 void net_buf_unref_debug(struct net_buf *buf, const char *func, int line) in net_buf_unref_debug()
457 void net_buf_unref(struct net_buf *buf) in net_buf_unref_debug()
463 struct net_buf *frags = buf->frags; in net_buf_unref_debug()
500 struct net_buf *net_buf_ref(struct net_buf *buf) in net_buf_ref()
510 struct net_buf *net_buf_clone(struct net_buf *buf, k_timeout_t timeout) in net_buf_clone()
514 struct net_buf *clone; in net_buf_clone()
557 int net_buf_user_data_copy(struct net_buf *dst, const struct net_buf *src) in net_buf_user_data_copy()
575 struct net_buf *net_buf_frag_last(struct net_buf *buf) in net_buf_frag_last()
586 void net_buf_frag_insert(struct net_buf *parent, struct net_buf *frag) in net_buf_frag_insert()
598 struct net_buf *net_buf_frag_add(struct net_buf *head, struct net_buf *frag) in net_buf_frag_add()
612 struct net_buf *net_buf_frag_del_debug(struct net_buf *parent, in net_buf_frag_del_debug()
613 struct net_buf *frag, in net_buf_frag_del_debug()
616 struct net_buf *net_buf_frag_del(struct net_buf *parent, struct net_buf *frag) in net_buf_frag_del_debug()
619 struct net_buf *next_frag; in net_buf_frag_del_debug()
642 size_t net_buf_linearize(void *dst, size_t dst_len, const struct net_buf *src, in net_buf_linearize()
645 const struct net_buf *frag; in net_buf_linearize()
682 size_t net_buf_append_bytes(struct net_buf *buf, size_t len, in net_buf_append_bytes()
686 struct net_buf *frag = net_buf_frag_last(buf); in net_buf_append_bytes()
729 size_t net_buf_data_match(const struct net_buf *buf, size_t offset, const void *data, size_t len) in net_buf_data_match()