首页 | 本学科首页   官方微博 | 高级检索  
     

利用Winsock编程捕获局域网上所有IP包
引用本文:吴勇军. 利用Winsock编程捕获局域网上所有IP包[J]. 计算机工程与设计, 2004, 25(5): 691-693,739
作者姓名:吴勇军
作者单位:重庆邮电学院,计算机学院,重庆,400065
基金项目:重庆市科委科技攻关基金(7220-8-20)
摘    要:在高速网络中捕获所有IP包面临如何快速处理数据包和减少丢包的问题。提出通过建立链表来实现对捕获数据包的批量处理,以减少系统创建线程的开销。同时通过创建线程可以使数据包的分析处理和数据包的捕获并行进行,可减少在处理包数据时可能出现的丢包。在捕获过程中增加了对丢包的统计,可以给出丢包车。同时在创建线程不成功时,通过一个较少延时的重复尝试以尽量减少丢包数。这种方法在100Mbps的局域网中,丢包率可控制在5%之内。

关 键 词:Winsock  IP包  线程  链表
文章编号:1000-7024(2004)05-0691-03

Capturing all IP packets in LAN through programing with winsock
Abstract:The problem of capturing all packets of high-speed network is how to fast handle packets and reduce packet losses.Creating links could handle packets in bulk,so the overhead of creating threads could be reduced.Through creating threads,theanalysis of packets and the capture of packets could be done in parallel.In the capturing process,the lost packts the rate of packetsloss could be given by counting the lost packes.While creating thread failed the loss of packet could be reduced by repeating.In100Mbps LAN,the losses of packet is lower than 5%.
Keywords:winsock  IP packet  thread  links  
本文献已被 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号