-
Notifications
You must be signed in to change notification settings - Fork 745
remove IPAddrPrefixDefault addrlen, use netip.Prefix and options to know/set the ip family #3081
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
base: master
Are you sure you want to change the base?
remove IPAddrPrefixDefault addrlen, use netip.Prefix and options to know/set the ip family #3081
Conversation
a97c298
to
5160d6b
Compare
I had planned to remove addrlen when consolidating the separate structs for v4 and v6, but since you’ve started working on it, let's discuss the With this change, since MarshallingOption becomes required to parse IPv6 addresses correctly, is the functional options pattern still appropriate? Better to use a normal argument? I think that
|
Furthermore, checking the AddPath map every time during serialization is not efficient. |
Sure, Marshaling option is only used in the On the |
Agreed, I tried to have minimal impact here on changes, and think it would be another PR as the marshaling option, should be accessed other way, like O(1) by merging MarshalingOptions in a single object, so no need to iterate on the options list afterwards |
the problem I don't like with the isAddPath lookup (in DecodeFromBytes) is the prefix is not aware on what to expect |
overall I think we need to talk on our next sync, via sharing some code, the conversation/ideas would probably be more effective |
5160d6b
to
e65e2df
Compare
e65e2df
to
b7ca3a9
Compare
Ok, I try to implement some ideas. btw, the second commit to use |
and handle multicast correctly