summary
Two packets will be proessed by tcp server side:
- SYN pakcet: For the first packet(syn) of handshake, it first lookup the listen socket,
and create a req socket as temporary. Send SYN+ACK packet to client. - ACK packet: For the third packet(ack) of handshake, it will lookup the req socket created
in previous steps.
SYN 报文calltrace
内核版本 v6.14
####
1 | => tcp_v4_rcv(struct sk_buff *skb) |
注意
tcp_request_sock_ops
: 是一个结构体的名字,同时又是一个变量的名字。icsk_accept_queue
: 在结构体struct inet_connection_sock
里的这个队列并不在保存半链接队列的 req socket,而是计数。