package ipbits
import "github.com/docker/docker/libnetwork/ipbits"
Package ipbits contains utilities for manipulating netip.Addr values as numbers or bitfields.
Index ¶
- func Add(ip netip.Addr, x uint64, shift uint) netip.Addr
- func Field(ip netip.Addr, u, v uint) uint64
Functions ¶
func Add ¶
Add returns ip + (x << shift).
func Field ¶
Field returns the value of the bitfield [u, v] in ip as an integer, where bit 0 is the most-significant bit of ip.
The result is undefined if u > v, if v-u > 64, or if u or v is larger than ip.BitLen().
Source Files ¶
- Version
- v26.1.4+incompatible
- Published
- Jun 5, 2024
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 1 hour ago –
Tools for package owners.