Skip to content

net/netip: IP address bit manipulation functions #49379

Closed
@zx2c4

Description

@zx2c4

This seems like a potentially much larger topic than the "little things" of #49298 so I've made a separate issue for it.

I have a trie data structure that works over net.IP with lots of bit twiddling. It works well, but of course I want to switch it over to netip.Addr, and benefit from performance there. However, there currently is no way of getting at its internal uint128 guts, or doing any arithmetic therein.

Seems like this would be a nice thing to add. I don't have a concrete proposal for how to do this yet (so this isn't a "proposal: " issue), but I thought I should still start the discussion.


CC @bradfitz @crawshaw @josharian @danderson @ianlancetaylor

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions