Lines Matching refs:buf
82 struct netbuf *buf;
107 buf = (struct netbuf *)memp_malloc(MEMP_NETBUF);
108 if (buf == NULL) {
113 buf->p = q;
114 buf->ptr = q;
115 ip_addr_copy(buf->addr, *ip_current_src_addr());
116 buf->port = pcb->protocol;
119 if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) {
120 netbuf_delete(buf);
147 struct netbuf *buf;
171 buf = (struct netbuf *)memp_malloc(MEMP_NETBUF);
172 if (buf == NULL) {
176 buf->p = p;
177 buf->ptr = p;
178 ip_addr_set(&buf->addr, addr);
179 buf->port = port;
186 buf->flags = NETBUF_FLAG_DESTADDR;
188 ip_addr_set(&buf->toaddr, ip_current_dest_addr());
189 buf->toport_chksum = udphdr->dest;
195 if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) {
196 netbuf_delete(buf);