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
net/netip: add IPv6LinkLocalAllRouters #51766
Comments
Out of curiosity, why a func rather than a var? |
I don't know the original motivation for this, but that's how all the other "constants" are implemented in netip as well: Lines 74 to 82 in c6244b5
For consistency's sake it would make sense to stick to this design. |
I seem to remember some discussion around avoiding package level allocation and that these calls would be inlined anyway. The immutability is an added bonus. |
This proposal has been added to the active column of the proposals project |
Based on the discussion above, this proposal seems like a likely accept. |
No change in consensus, so accepted. 🎉 |
Change https://go.dev/cl/412475 mentions this issue: |
Fixes golang#51766 Fixes golang#51777 Change-Id: I0510175c20c06442d78b2581cfe218e66be1c35b Reviewed-on: https://go-review.googlesource.com/c/go/+/412475 Auto-Submit: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Damien Neil <dneil@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Matt Layher <mdlayher@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Auto-Submit: Damien Neil <dneil@google.com>
I'm working on porting some of my networking packages to Go 1.18's
net/netip
, but it seems that I had forgotten about my uses ofnet.IPv6linklocalallrouters
when I was making regular additions to inet.af/netaddr.I'd like to suggest adding exactly the following to
net/netip
, akin to what already exists asnetip.IPv6LinkLocalAllNodes
:Along with link-local all nodes, this is one of the most fundamental IPv6 multicast group addresses. Package
net
exposes it today as a variable: https://pkg.go.dev/net#pkg-variablesThanks!
/cc @bradfitz @danderson @josharian
The text was updated successfully, but these errors were encountered: