Lines Matching refs:netbuf
5 * @defgroup netbuf Network buffers
49 #include "lwip/netbuf.h"
55 * @ingroup netbuf
56 * Create (allocate) and initialize a new netbuf.
57 * The netbuf doesn't yet contain a packet buffer!
59 * @return a pointer to a new netbuf
63 netbuf *netbuf_new(void)
65 struct netbuf *buf;
67 buf = (struct netbuf *)memp_malloc(MEMP_NETBUF);
69 memset(buf, 0, sizeof(struct netbuf));
75 * @ingroup netbuf
76 * Deallocate a netbuf allocated by netbuf_new().
78 * @param buf pointer to a netbuf allocated by netbuf_new()
81 netbuf_delete(struct netbuf *buf)
93 * @ingroup netbuf
94 * Allocate memory for a packet buffer for a given netbuf.
96 * @param buf the netbuf for which to allocate a packet buffer
102 netbuf_alloc(struct netbuf *buf, u16_t size)
121 * @ingroup netbuf
122 * Free the packet buffer included in a netbuf
124 * @param buf pointer to the netbuf which contains the packet buffer to free
127 netbuf_free(struct netbuf *buf)
141 * @ingroup netbuf
142 * Let a netbuf reference existing (non-volatile) data.
144 * @param buf netbuf which should reference the data
151 netbuf_ref(struct netbuf *buf, const void *dataptr, u16_t size)
169 * @ingroup netbuf
170 * Chain one netbuf to another (@see pbuf_chain)
172 * @param head the first netbuf
173 * @param tail netbuf to chain after head, freed by this function, may not be reference after returning
176 netbuf_chain(struct netbuf *head, struct netbuf *tail)
186 * @ingroup netbuf
187 * Get the data pointer and length of the data inside a netbuf.
189 * @param buf netbuf to get the data from
196 netbuf_data(struct netbuf *buf, void **dataptr, u16_t *len)
211 * @ingroup netbuf
212 * Move the current data pointer of a packet buffer contained in a netbuf
216 * @param buf the netbuf to modify
222 netbuf_next(struct netbuf *buf)
236 * @ingroup netbuf
237 * Move the current data pointer of a packet buffer contained in a netbuf
241 * @param buf the netbuf to modify
244 netbuf_first(struct netbuf *buf)