Lines Matching refs:p
84 if (buf->p != NULL) { in netbuf_delete()
85 pbuf_free(buf->p); in netbuf_delete()
86 buf->p = buf->ptr = NULL; in netbuf_delete()
107 if (buf->p != NULL) { in netbuf_alloc()
108 pbuf_free(buf->p); in netbuf_alloc()
110 buf->p = pbuf_alloc(PBUF_TRANSPORT, size, PBUF_RAM); in netbuf_alloc()
111 if (buf->p == NULL) { in netbuf_alloc()
115 (buf->p->len >= size)); in netbuf_alloc()
116 buf->ptr = buf->p; in netbuf_alloc()
117 return buf->p->payload; in netbuf_alloc()
130 if (buf->p != NULL) { in netbuf_free()
131 pbuf_free(buf->p); in netbuf_free()
133 buf->p = buf->ptr = NULL; in netbuf_free()
154 if (buf->p != NULL) { in netbuf_ref()
155 pbuf_free(buf->p); in netbuf_ref()
157 buf->p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF); in netbuf_ref()
158 if (buf->p == NULL) { in netbuf_ref()
162 ((struct pbuf_rom *)buf->p)->payload = dataptr; in netbuf_ref()
163 buf->p->len = buf->p->tot_len = size; in netbuf_ref()
164 buf->ptr = buf->p; in netbuf_ref()
180 pbuf_cat(head->p, tail->p); in netbuf_chain()
181 head->ptr = head->p; in netbuf_chain()
247 buf->ptr = buf->p; in netbuf_first()