* Count number of pbufs in a chain * * @param p first pbuf of chain * @return the number of pbufs in a chain */
| 806 | * @return the number of pbufs in a chain |
| 807 | */ |
| 808 | u16_t |
| 809 | pbuf_clen(const struct pbuf *p) |
| 810 | { |
| 811 | u16_t len; |
| 812 | |
| 813 | len = 0; |
| 814 | while (p != NULL) { |
| 815 | ++len; |
| 816 | p = p->next; |
| 817 | } |
| 818 | return len; |
| 819 | } |
| 820 | |
| 821 | /** |
| 822 | * @ingroup pbuf |
no outgoing calls