Lines Matching defs:buf
581 void *buf = NULL;
600 if (sys_arch_mbox_tryfetch(&conn->recvmbox, &buf) == SYS_MBOX_EMPTY) {
615 if (sys_arch_mbox_fetch(&conn->recvmbox, &buf, conn->recv_timeout) == SYS_ARCH_TIMEOUT) {
620 sys_arch_mbox_fetch(&conn->recvmbox, &buf, 0);
626 if (lwip_netconn_is_deallocated_msg(buf)) {
641 if (lwip_netconn_is_err_msg(buf, &err)) {
649 len = ((struct pbuf *)buf)->tot_len;
657 LWIP_ASSERT("buf != NULL", buf != NULL);
658 len = netbuf_len((struct netbuf *)buf);
668 LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_recv_data: received %p, len=%"U16_F"\n", buf, len));
670 *new_buf = buf;
706 struct pbuf *buf;
734 buf = *new_buf;
737 u16_t len = buf ? buf->tot_len : 1;
745 if (buf == NULL) {
863 struct netbuf *buf = NULL;
879 buf = (struct netbuf *)memp_malloc(MEMP_NETBUF);
880 if (buf == NULL) {
886 memp_free(MEMP_NETBUF, buf);
891 buf->p = p;
892 buf->ptr = p;
893 buf->port = 0;
894 ip_addr_set_zero(&buf->addr);
895 *new_buf = buf;
916 * @param buf a netbuf containing the data to send
922 netconn_sendto(struct netconn *conn, struct netbuf *buf, const ip_addr_t *addr, u16_t port)
924 if (buf != NULL) {
925 ip_addr_set(&buf->addr, addr);
926 buf->port = port;
927 return netconn_send(conn, buf);
937 * @param buf a netbuf containing the data to send
941 netconn_send(struct netconn *conn, struct netbuf *buf)
948 LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_send: sending %"U16_F" bytes\n", buf->p->tot_len));
952 API_MSG_VAR_REF(msg).msg.b = buf;