TCP transport (tcp.c)
Send Packet
複製userspace 的payload到kernel space上。當skb被建置完成之後,就會tcp_transmit_skb()
static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
gfp_t gfp_mask)
{
icsk_af_ops object (INET Connection Socket ops) is an address-family specific object.
queue_xmit() callback is set to be the generic ip_queue_xmit() method
(net/ipv4/tcp_ipv4.c.)
The icsk_af_ops object (INET Connection Socket ops) is an address-family specific object. In the case of IPv4
TCP, it is set to be an inet_connection_sock_af_ops object named ipv4_specific in the tcp_v4_init_sock()
method. The queue_xmit() callback is set to be the generic ip_queue_xmit() method. See net/ipv4/tcp_ipv4.c.
. . .
err = icsk->icsk_af_ops->queue_xmit(skb, &inet->cork.fl);
. . .
}