#include "lwip/opt.h"
#include "lwip/netbuf.h"
#include "lwip/memp.h"
#include <string.h>
Go to the source code of this file.
Functions | |
struct netbuf * | netbuf_new (void) |
void | netbuf_delete (struct netbuf *buf) |
void * | netbuf_alloc (struct netbuf *buf, u16_t size) |
void | netbuf_free (struct netbuf *buf) |
err_t | netbuf_ref (struct netbuf *buf, const void *dataptr, u16_t size) |
void | netbuf_chain (struct netbuf *head, struct netbuf *tail) |
err_t | netbuf_data (struct netbuf *buf, void **dataptr, u16_t *len) |
s8_t | netbuf_next (struct netbuf *buf) |
void | netbuf_first (struct netbuf *buf) |
Network buffer management
Definition in file netbuf.c.
Allocate memory for a packet buffer for a given netbuf.
buf | the netbuf for which to allocate a packet buffer | |
size | the size of the packet buffer to allocate |
Definition at line 102 of file netbuf.c.
Chain one netbuf to another (
head | the first netbuf | |
tail | netbuf to chain after head, freed by this function, may not be reference after returning |
Definition at line 169 of file netbuf.c.
Get the data pointer and length of the data inside a netbuf.
buf | netbuf to get the data from | |
dataptr | pointer to a void pointer where to store the data pointer | |
len | pointer to an u16_t where the length of the data is stored |
void netbuf_delete | ( | struct netbuf * | buf | ) |
Deallocate a netbuf allocated by netbuf_new().
buf | pointer to a netbuf allocated by netbuf_new() |
Definition at line 82 of file netbuf.c.
void netbuf_first | ( | struct netbuf * | buf | ) |
void netbuf_free | ( | struct netbuf * | buf | ) |
struct netbuf* netbuf_new | ( | void | ) | [read] |
s8_t netbuf_next | ( | struct netbuf * | buf | ) |
Move the current data pointer of a packet buffer contained in a netbuf to the next part. The packet buffer itself is not modified.
buf | the netbuf to modify |
Let a netbuf reference existing (non-volatile) data.
buf | netbuf which should reference the data | |
dataptr | pointer to the data to reference | |
size | size of the data |
Definition at line 145 of file netbuf.c.