IPFS Packet Internals

I’m trying to build a simple IPFS client as part of a graduate research project, but I can’t find any documentation on how to decode IPFS packets. Is there any spec for the protocol? I’m looking for low level details (I work on the SMB2/3 protocol for my day job, so I was expecting something along the lines of the MS-SMB2 protocol doc). Does something like this exist?
Wireshark doesn’t even seem to be able to decode these raw packets.
I’m looking for how a node would transmit raw blocks to another node, etc.

I’d take a look at https://github.com/libp2p/specs and https://github.com/ipfs/specs/. The IPFS spec for bitswap may not cover some of the recent additions in https://github.com/ipfs/go-bitswap and the DHT implementations spec isn’t formalized yet (there’s a PR that has the correct wire format, but the protocol has changed substantially and so it needs an update).

Without investigating too much I’d suspect that if you make sure to enable QUIC and examine connections between QUIC nodes that your life will be much easier since it has transport security + multiplexing baked in and may already have some useful Wireshark tools available. However, if you want to examine the internals of secio, yamux and mplex then you can obviously do that as well.

If you have a particular work flow that you’re trying to examine it may be easier to point you in the right direction for which protocols and configurations you may want to look at.