随笔分类 - TCP-IP
摘要:本文主要对比Muduo多线程模型方案8 和方案9 。 方案8:reactor + thread pool ,有一个线程来充当reactor 接受连接分发事件,将要处理的事件分配给thread pool中的线程,由thread pool 来完成事件处理。实例代码见:examples/sudoku...
阅读全文
摘要:Packet, Raw, Netlink, and Routing Sockets :Netlink, routing, packet, and raw are all types ofspecialized sockets.Netlink provides a socket-based interface for communication of messages and settings between the user and the internal protocolsRtnetlinkis forapplication-level managementof theneighbor t
阅读全文
摘要:Chapter 5: Linux SocketsSockets provide a standardprotocol-independent interfacebetween the application-level programs and the TCP/IP stack.From the viewpoint of TCP/IP,everything above the transport layer is part ofthe application.The socket API is the best known networking interface for Unix appli
阅读全文
摘要:/***netif_rx-post buffer to the network code*@skb: buffer to post**This function receives a packet from a device driver and queues it for*the upper (protocol) levels to process. It always succeeds. The buffer*may be dropped during processing for congestion control or by the*protocol layers.**return
阅读全文
摘要:Chap-3:TCP/IP in Embedded SystemsTwo guiding principlesallow protocol stacks to be implemented as shown in the OSI model:information hidingandencapsulation.Thephysical layer(PHY) isresponsible forthemodulationandelectrical details of data transmission.One of theresponsibilitiesof thedata link layeri
阅读全文