tcp_create_segment() is only used within LwIP.
 
Symbols
loading...
Files
loading...

tcp_create_segment() function

Create a TCP segment with prefilled header. Called by tcp_write, tcp_enqueue_flags and tcp_split_unsent_seg

Syntax

static struct tcp_seg * tcp_create_segment(const struct tcp_pcb *pcb,     struct pbuf *p,     u8_t hdrflags,     u32_t seqno,     u8_t optflags);

Arguments

pcb

Protocol control block for the TCP connection.

p

pbuf that is used to hold the TCP header.

hdrflags

TCP flags for header.

seqno

TCP sequence number of this packet

optflags

options to include in TCP header

Return value

a new tcp_seg pointing to p, or NULL. The TCP header is filled in except ackno and wnd. p is freed on failure.

References

LocationReferrerText
tcp_out.c:158
tcp_create_segment(const struct tcp_pcb *pcb, struct pbuf *p, u8_t hdrflags, u32_t seqno, u8_t optflags)
tcp_out.c:666tcp_write()
if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) {
tcp_out.c:914tcp_split_unsent_seg()
seg = tcp_create_segment(pcb, p, remainder_flags, lwip_ntohl(useg->tcphdr->seqno) + split, optflags);
tcp_out.c:1085tcp_enqueue_flags()
if ((seg = tcp_create_segment(pcb, p, flags, pcb->snd_lbb, optflags)) == NULL) {

Call Tree

Functions calling tcp_create_segment()
Functions called by tcp_create_segment()
tcp_create_segment()
Type of tcp_create_segment()
tcp_create_segment()
all items filtered out