dotpcap / packetnet

Official repository - High performance .Net assembly for dissecting and constructing network packets such as ethernet, ip, tcp, udp etc.
Mozilla Public License 2.0
469 stars 105 forks source link

Implementing Application Layer Packets #194

Closed Z0rdak closed 1 year ago

Z0rdak commented 1 year ago

Hey there, I have found your repo while searching for an Implementation/Wrapper of pcap für .NET for a university project.

I am thinking about extending your work/contribute to your work by writing some Dissectors/Packets for some Application Layer Protocols. Namely, HTTP, MQTT and maybe OPC UA.

Before I start, I just want to make sure I know my way around in your code. So I was wondering what would be the class to extend for my purposes. The mentioned protocols are all TCP based (some also support UDP, but that's not what my focus is about).

My guess is to start by extending TransportPacket to implement my Packets - is this correct, or is there another Type for this purpose I missed?

Also, are there any examples for implementations of Application Layer Packets which I could follow?

And finally, are there any contribution guidelines?

Best regards

PhyxionNL commented 1 year ago

That would be appreciated. The class you need to extend is Packet. TransportPacket is only for packets with a source/destination port. There are no guidelines, but you might find this useful: https://github.com/dotpcap/packetnet/blob/master/ArchitectureNotes. Also checking some existing classes to see how they're structured is a good way to start. Furthermore, if possible, properties should be possible to set as well.