摘要
研究了Linux操作系统中使用底层抓包函数库Libpcap处理高量数据包监听的原理,利用网卡设备在网络的旁路处进行数据捕捉后预处理,利用NAPI技术实现设备半轮询机制以加快数据在缓冲区的处理速度,最后利用排队论原理计算最优带宽值并设置相关参数以达到最佳处理效率。实验表明,该方法不仅提高数据包的捕捉率,并且在系统资源占用率等多项指标中都有显著改善。
The principle of packet monitor to handle high volume packets using the underlying library Libpcap capture in Linux operation system was studied. Network Interface Card (NIC) was used to capture data in bypass monitor to carry out pre-processing. Semi-polling with New API (NAPI) was also used to speed up the processing of packets in input buffer. Finally the queuing theory was used to ensure the optimal bandwidth value and relevant parameters were set to achieve the best efficiency. Experimental results demonstrate that the scheme not only increases the rate of packet capture, but also improves the occupancy rate of system resources in many figures significantly.
出处
《计算机应用》
CSCD
北大核心
2009年第5期1244-1247,1250,共5页
journal of Computer Applications
基金
四川省计算机软件重点实验室重点项目