ipbits
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package ipbits contains utilities for manipulatingnetip.Addr values asnumbers or bitfields.
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
funcField¶
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 thanip.BitLen().
funcSubnetsBetween¶
SubnetsBetween computes the number of subnets of size 'sz' available between 'a1'and 'a2'. The result is capped atmath.MaxUint64. It returns 0 when one of'a1' or 'a2' is invalid, if both aren't of the same family, or when 'a2' isless than 'a1'.
Types¶
This section is empty.