Moving Away From Macro Magic #559
infosechoudini
started this conversation in
General
Replies: 1 comment
-
Also, moving away from Macro Magic allows pnet to not import more external dependencies. Makes it a better choice for low level networking when no_std and futures are needed |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
Should pnet move away from macro magic and many traits and implementation magic?
Current
Right now the lib uses "magic" in many ways that are very confusing for most. Some traits and impl require the need to parse the packet buffer again before getting access to the underlying struct. Although parsing is very fast with macros, accessing fields within the struct is very slow using functions that copy and parse the buffer again to gain access to the field.
Possible Solution
Move to a new streaming parser method that allows quick parsing with fast access to the underlying data and fields from the struct.
Beta Was this translation helpful? Give feedback.
All reactions