Pcap.net VS Sharppcap [英] Pcap.net vs Sharppcap

查看:1402
本文介绍了Pcap.net VS Sharppcap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想听听网络设备,捕获的数据包和写入数据包到一个虚拟文件。此外,我需要一边听着如此贫乏只写它的数据包通过过滤器来过滤数据包。我需要在.NET C#做这些。这是我的要求。所以我应该使用哪一个?高传输速率和最低的丢包是非常重要的。 感谢您的阅读。

I just want to listen a network device, capture packets and write the packets to a dummy file. Also i need to filter packets while listening so ill only write packets which passes the filter. I need to do these on .net c#. These are my requirements. So which one should i use? High transfer rate and minimum packet loss is really important. Thanks for reading.

推荐答案

由于SharpPcap的作者,我可以说,你就可以与库执行所有这些操作。性能是一个关键的设计目标。

As the author of SharpPcap I can say that you'll be able to perform all of those operations with the library. Performance was a critical design goal.

Packet.Net有一系列的数据包,它可分析并与SharpPcap用于分组解剖和代捆绑沿库。它的架构确实懒惰的评价随时随地有可能,以便尽可能快。

Packet.Net has a range of packets that it can parse and is the library bundled along with SharpPcap for packet dissection and generation. It's architecture does lazy evaluation anywhere it is possible in order to be as fast as possible.

性能是棘手的,特别是因为网络数据包捕获往往是一个低优先级任务操作系统。更快的应用程序中处理更多的数据包可以在不滴处理数据包。我已经能够捕获数据包的3MB / s的没有任何下降。我还没有尝试过以更高的数据速率或写入大量测试生成和采集数据,以评估性能。测试和现实世界的结果,欢迎数据点被添加到文档和网站虽然。

Performance is tricky, especially because network packet capture is often a lower priority task for an operating system. The faster your application handles the packet the more packets can be handled without drops. I've been able to capture 3MB/s of packets without any drops. I haven't tried it at higher data rates or written extensive tests to generate and capture data in order to evaluate performance. Tests and real world results are welcome data points to be added to the documentation and website though.

这篇关于Pcap.net VS Sharppcap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆