Packet.NetHigh performance .NET assembly for dissecting and constructing network packets such as Ethernet, IP, TCP, UDP, etc. | |
Download |
Packet.Net Ranking & Summary
Advertisement
Packet.Net Tags
Packet.Net Description
High performance .NET assembly for dissecting and constructing network packets such as Ethernet, IP, TCP, UDP, etc. Packet.Net is a high performance .NET assembly for constructing and dissecting network packets such as Ethernet, IP, UDP, TCP, etc.Packet.Net started as a rewrite of the packet parser in SharpPcap with the goal of making a more consistent and better documented API.Usage:The source code package, available via the Downloads link on the project page, contains an Examples/ directory. Below are some snippets that illustrate usage but are not intended to be complete.Packet.Net can be used to create packets from scratch:using PacketDotNet;int sourcePort = 10;int destinationPort = 20;TcpPacket tcpPacket = new TcpPacket(sourcePort, destinationPort);Many people will use Packet.Net in conjunction with existing data, either captured from the network via SharpPcap or Pcap.Net to decode packets:using PacketDotNet;// open the capture fileSharpPcap.LivePcapDevice dev = new SharpPcap.LivePcapDevice("SomeCapturedPackets.pcap");// read a raw packetrawPacket = dev.GetNextRawPacket();// parse the packetPacket p = Packet.ParsePacket((LinkLayers)rawPacket.LinkLayerType, new PosixTimeval(rawPacket.Timeval.Seconds, rawPacket.Timeval.MicroSeconds), rawPacket.Data);// print out the packet contentsConsole.WriteLine(p);This program would produce output like: ] Requirements: · Mono Project
Packet.Net Related Software