Open robs-zeynet opened 12 months ago
Hi @robs-zeynet ,
Sure I would love it.
Here are some notes from my side:
serde
as non default feature, and make it optional (the PR bellow already does this).Serialize
and Deserialize
traits manually for structs that contain a buffer (e.g. for header options). Specifically you will have to do it in a way so only the actually used data gets serialized and deserialization fails if the data is not fulfilling the length constraints for. I think the following headers will need a custom implementation: Ipv4Options
, TcpOptions
, Ipv6RawExtHeader
, IpAuthHeader
.Greets Julian
Hmm... I guess I never did this; ended up hacking around it in my own code. Sorry to bait and switch here.
I've run into some issues where I've wanted to write packets to disk in their parsed form, not in their on-the-wire format. What are folks thoughts about peppering all of the major structs (PacketHeaders, PacketSlice, and transitively) to auto-derive Serialize and Deserialize? Happy to write it myself - just wanted to ask first.