.NET Framework for network data packet parsing/assembling?
when programming Tcp/IP program, we often will do data packet assembling and parsing, so is there a framework to make our life easier?
I know this is hard to implement.
Edit: to clarify:
- application level packet
- it may need to talk to c++ application, so .net serialization is not appl开发者_如何学Goicable.
Pcap.NET may be what you're after:
Pcap.Net is a .NET wrapper for WinPcap written in C++/CLI and C#.
It features almost all WinPcap features and includes a packet interpretation framework.
If you can use your own application protocol, Protocol Buffers might be the right tool to use.
Otherwise it depends on the protocol you are dealing with. For MIME based protocols you can leverage Sharp MIME tools.
Sharppcap, http://sharppcap.sf.net also provides this functionality and supports a wide range of packet types. Also works on windows, mac and Linux.
精彩评论