MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / netbuf_next

Function netbuf_next

components/net/lwip/lwip-2.1.2/src/api/netbuf.c:221–233  ·  view source on GitHub ↗

* @ingroup netbuf * Move the current data pointer of a packet buffer contained in a netbuf * to the next part. * The packet buffer itself is not modified. * * @param buf the netbuf to modify * @return -1 if there is no next part * 1 if moved to the next part but now there is no next part * 0 if moved to the next part and there are still more parts */

Source from the content-addressed store, hash-verified

219 * 0 if moved to the next part and there are still more parts
220 */
221s8_t
222netbuf_next(struct netbuf *buf)
223{
224 LWIP_ERROR("netbuf_next: invalid buf", (buf != NULL), return -1;);
225 if (buf->ptr->next == NULL) {
226 return -1;
227 }
228 buf->ptr = buf->ptr->next;
229 if (buf->ptr->next == NULL) {
230 return 1;
231 }
232 return 0;
233}
234
235/**
236 * @ingroup netbuf

Callers 1

tcpecho_entryFunction · 0.50

Calls

no outgoing calls

Tested by 1

tcpecho_entryFunction · 0.40