/**
* Pass a received packet to tcpip_thread for input processing
*
* @param p the received packet, p->payload pointing to the Ethernet header or
* to an IP header (if netif doesn't got NETIF_FLAG_ETHARP flag)
* @param inp the network interface on which the packet was received
*/
tcpip_input
会向tcpip_thread线程发送id为TCPIP_MSG_INPKT的mbox邮箱消息[luther.gliethttp]
然后tcpip_thread线程将进一步调用ip_input处理方法做细分处理[luther.gliethttp]
ip_input
/**
* This function is called by the network interface device driver when
* an IP packet is received. The function does the basic checks of the
* IP header such as packet size being at least larger than the header
* size etc. If the packet was not destined for us, the packet is
* forwarded (using ip_forward). The IP checksum is always checked.
*
* Finally, the packet is sent to the upper layer protocol input function.
*
* @param p the received IP packet (p->payload points to IP header)
* @param inp the netif on which this packet was received
* @return ERR_OK if the packet was processed (could return ERR_* if it wasn't
* processed, but currently always returns ERR_OK)
*/
阅读(2703) | 评论(0) | 转发(0) |