Note: to modify the TCP protocol, you have encountered the serial number of the tcp group to be modified, however, if the end_seq of SKB is found in the tcp_sendmsg function, but it is not clear that seq is not found, it is initialized there, and
Notes about SKB serial number
To modify the TCP protocol, the serial number of the tcp group to be modified is encountered, but the end_seq of SKB is not found in the tcp_sendmsg function.
I don't know where to initialize it. I tracked the sk_stream_alloc_skb () function for SKB allocation and found it in function skb_entail:
Static inline void skb_entail (struct sock * sk, struct sk_buff * skb)
{
Struct tcp_sock * tp = tcp_sk (sk );
Struct tcp_skb_cb * tcb = TCP_SKB_CB (skb );
Skb-> csum = 0;
Tcb-> seq = tcb-> end_seq = tp-> write_seq;
Tcb-> flags = TCPHDR_ACK;
Tcb-> sacked = 0;
Skb_header_release (skb );
Tcp_add_write_queue_tail (sk, skb );
Sk-> sk_wmem_queued + = skb-> truesize;
Sk_mem_charge (sk, skb-> truesize );
If (tp-> nonagle & TCP_NAGLE_PUSH)
Tp-> nonagle & = ~ TCP_NAGLE_PUSH;
}