Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ip packet #753

Closed
wants to merge 5 commits into from
Closed

Conversation

thvdveld
Copy link
Contributor

@thvdveld thvdveld commented Mar 17, 2023

I refactored the IpPacket struct, such that we can add more extensions headers to it for IPv6

Previously it was not possible to create packets that had hop-by-hop options (for emitting). Reading hop-by-hop options was no problem though. However, I need to be able to emit hop-by-hop for RPL, which with these changes would be easier to add.

The only downside of this, is that we need alloc, or we could change it such that Ipv6HopByHop has a heapless Vec instead. This would then increase the size of the IpPacket struct.

I think this approach is better than #752, since now the structure of the IP packets is better represented than in #752.

@thvdveld
Copy link
Contributor Author

I think I have figured out a better way of doing this. Instead of adding the hop-by-hop data to the IpPacket (in the processing stage of packets), the hop-by-hop data should just be added when in the dispatching stage of the packets.

@thvdveld thvdveld closed this Apr 13, 2023
@thvdveld thvdveld deleted the refactor-ip-packet branch April 13, 2023 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant