Lines Matching refs:p
62 buf->p = NULL; in netbuf_new()
90 if (buf->p != NULL) { in netbuf_delete()
91 pbuf_free(buf->p); in netbuf_delete()
92 buf->p = buf->ptr = NULL; in netbuf_delete()
112 if (buf->p != NULL) { in netbuf_alloc()
113 pbuf_free(buf->p); in netbuf_alloc()
115 buf->p = pbuf_alloc(PBUF_TRANSPORT, size, PBUF_RAM); in netbuf_alloc()
116 if (buf->p == NULL) { in netbuf_alloc()
120 (buf->p->len >= size)); in netbuf_alloc()
121 buf->ptr = buf->p; in netbuf_alloc()
122 return buf->p->payload; in netbuf_alloc()
134 if (buf->p != NULL) { in netbuf_free()
135 pbuf_free(buf->p); in netbuf_free()
137 buf->p = buf->ptr = NULL; in netbuf_free()
153 if (buf->p != NULL) { in netbuf_ref()
154 pbuf_free(buf->p); in netbuf_ref()
156 buf->p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF); in netbuf_ref()
157 if (buf->p == NULL) { in netbuf_ref()
161 buf->p->payload = (void*)dataptr; in netbuf_ref()
162 buf->p->len = buf->p->tot_len = size; in netbuf_ref()
163 buf->ptr = buf->p; in netbuf_ref()
178 pbuf_cat(head->p, tail->p); in netbuf_chain()
179 head->ptr = head->p; in netbuf_chain()
242 buf->ptr = buf->p; in netbuf_first()