I need small sniffer for my report so I went with C# and SharpPcap.
packet = Packet.ParsePacket(rawCapture.LinkLayerType, rawCapture.Data);
tcpPacket = TcpPacket.GetEncapsulated(packet);
I have raw packet with all packet data. Then I get Packet out of it with some info such as source/destination/protocol/etc. After that I get tcp packet out of that.
Now how do I get only actual packet data that software sent/received?
Was simple enough.
packet.PayloadPacket.PayloadPacket.PayloadData