Lines Matching refs:buf
344 void *buf = NULL;
366 if (sys_arch_mbox_fetch(&conn->recvmbox, &buf, conn->recv_timeout) == SYS_ARCH_TIMEOUT) {
371 sys_arch_mbox_fetch(&conn->recvmbox, &buf, 0);
379 if (!netconn_get_noautorecved(conn) || (buf == NULL)) {
385 if (buf != NULL) {
386 msg.msg.msg.r.len = ((struct pbuf *)buf)->tot_len;
395 if (buf == NULL) {
401 len = ((struct pbuf *)buf)->tot_len;
409 LWIP_ASSERT("buf != NULL", buf != NULL);
410 len = netbuf_len((struct netbuf *)buf);
420 LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_recv_data: received %p, len=%"U16_F"\n", buf, len));
422 *new_buf = buf;
457 struct netbuf *buf = NULL;
474 buf = (struct netbuf *)memp_malloc(MEMP_NETBUF);
475 if (buf == NULL) {
482 memp_free(MEMP_NETBUF, buf);
487 buf->p = p;
488 buf->ptr = p;
489 buf->port = 0;
490 ip_addr_set_any(&buf->addr);
491 *new_buf = buf;
543 * @param buf a netbuf containing the data to send
549 netconn_sendto(struct netconn *conn, struct netbuf *buf, ip_addr_t *addr, u16_t port)
551 if (buf != NULL) {
552 ip_addr_set(&buf->addr, addr);
553 buf->port = port;
554 return netconn_send(conn, buf);
563 * @param buf a netbuf containing the data to send
567 netconn_send(struct netconn *conn, struct netbuf *buf)
574 LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_send: sending %"U16_F" bytes\n", buf->p->tot_len));
577 msg.msg.msg.b = buf;