wait_queue_head_t *sk_sleep;

struct sk_buff_head sk_receive_queue;

void (*sk_data_ready)(struct sock *sk, int bytes);

Control is transferred to udp_queue_rcv_skb once udp_rcv has found the appropriate sock instance and immediately afterward to sock_queue_rcv_skb, where 2 important actions are performed to complete data delivery to the application layer.

□ Processes waiting for data delivery via the socket sleep on the sleep wait queue.

□ Invoking skb_queue_tail inserts the socket buffer with the packet data at the end of the receive_queue list whose head is held in the socket-specific sock structure.

□ The function pointed to by data_ready (typically, sock_def_readable if the sock instance is initialized with the standard function sock_init_data) is invoked to inform the socket that new data has arrived. It wakes all processes sleeping on sleep while waiting for data to arrive.

Continue reading here: Tcp

Was this article helpful?

0 0