* @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 */
| 219 | * 0 if moved to the next part and there are still more parts |
| 220 | */ |
| 221 | s8_t |
| 222 | netbuf_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 |
no outgoing calls