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

Starting any packet type from a RawState? #6

Open
AaronKutch opened this issue Jul 31, 2024 · 1 comment
Open

Starting any packet type from a RawState? #6

AaronKutch opened this issue Jul 31, 2024 · 1 comment

Comments

@AaronKutch
Copy link

I am trying to create packets in-place without ethernet frames (e.x. for direct Wireguard encapsulation), but this library seems useless because it does not allow starting from just any kind of packet.

@J-Schoepplenberg
Copy link
Owner

J-Schoepplenberg commented Jul 31, 2024

Hey!

Right now the builder pattern only deems starting from Ethernet as a valid transition from the starting state (RawState). However, this can easily be changed/fixed by adjusting the state machine to implement any type of packet from RawState.

If you think this would be helpful, I can quickly change the code to accommodate for this. Then you can create packets in-place without Ethernet headers.

But I just want to mention that you could still build this kind of packet right now with this library. You would just need to not use the builder pattern, but the packet writers directly. Although, it would be nicer if the builder would handle this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants