Lines Matching refs:pbuf
83 /** Allocate a pbuf and create a tcphdr at p->payload, used for output
89 * @param datalen length of tcp data to reserve in pbuf
91 * @return pbuf with p->payload being the tcp_hdr
93 static struct pbuf *
98 struct pbuf *p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM);
100 LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr",
150 * @param p pbuf that is used to hold the TCP header.
159 tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, u8_t optflags)
186 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_create_segment: no room for TCP header in pbuf.\n"));
203 * Allocate a PBUF_RAM pbuf, perhaps with extra space at the end.
209 * @param length size of the pbuf's payload.
212 * @param pcb The TCP connection that willo enqueue the pbuf.
214 * @param first_seg true when this pbuf will be used in the first enqueued segment.
218 static struct pbuf *
223 struct pbuf *p;
235 /* Should we allocate an oversized pbuf, or just the minimum
259 LWIP_ASSERT("need unchained pbuf", p->next == NULL);
356 struct pbuf *concat_p = NULL;
402 * 1. Copy data directly into an oversized pbuf.
403 * 2. Chain a new pbuf to the end of pcb->unsent.
435 * Phase 1: Copy data directly into an oversized pbuf.
461 * Phase 2: Chain a new pbuf to the end of pcb->unsent.
464 * (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at
471 /* Create a pbuf with a copy or reference to seglen bytes. We
478 ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n",
493 ("tcp_write: could not allocate memory for zero-copy pbuf\n"));
523 struct pbuf *p;
534 * into pbuf */
536 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n", seglen));
539 LWIP_ASSERT("tcp_write: check that first pbuf can hold the complete seglen",
543 /* Copy is not set: First allocate a pbuf for holding the data.
548 struct pbuf *p2;
553 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_write: could not allocate memory for zero-copy pbuf\n"));
563 /* Second, allocate a pbuf for the headers. */
565 /* If allocation fails, we have to deallocate the data pbuf as
568 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_write: could not allocate memory for header pbuf\n"));
623 * last_unsent, we update the length fields of the pbuf chain.
627 struct pbuf *p;
724 struct pbuf *p;
763 /* Allocate pbuf with room for TCP header + options */
769 LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen",
844 struct pbuf *p;
856 LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n"));
1199 struct pbuf *p;
1203 LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n"));
1206 LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr",
1366 struct pbuf *p;
1379 ("tcp_keepalive: could not allocate memory for pbuf\n"));
1416 struct pbuf *p;
1448 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n"));