Summary of receiving process of IP packets

xiaoxiao2021-03-06  69

Receiving process:

From the data arriving on the network, receive through the NIC, at which point the NIC will issue an interrupt to the system and tell the system processing. When the system knows the data, read the data from the network card in the cache during the interrupt processing, and the link layer puts the data in its own backlog in the column, then puts the NetWork Flag in BH_BASE. Setting, using the Bottom Half mechanism. When the process schduler sees the NetWork Flag is set, it will run the corresponding routine, the routine will pop up the packet from backlog, match the corresponding protocol (usually an IP protocol). Then, then pass the Packet to the acceptance function of the corresponding protocol. The IP layer is erroneously detected on the Packet, and then routes, packets, or enters Outgoing Queue (forwarding) or handled over the transport layer (sent to this unit). The transport layer performs error detection, finds the socket associated with the port, and then put the packet in the corresponding Socket's receiving column. Once Packet enters the column of Socket, Socket wakes up the process that has this Socket. This process may return from the READ system call, copy the data from the column into your own buffer.

转载请注明原文地址:https://www.9cbs.com/read-111371.html

New Post(0)