Documentation
¶
Overview ¶
Package ipmath provides IP/CIDR parsing, safety validation, deduplication, CIDR merging and allowlist subtraction. It is pure (no I/O) and is the only place address math happens.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Policy ¶
type Policy struct {
// AllowPrivate accepts RFC1918/ULA and other special-purpose ranges.
AllowPrivate bool
// MinV4Bits rejects IPv4 prefixes broader than this (default 8,
// i.e. /7 and shorter are refused). 0 uses the default.
MinV4Bits int
// MinV6Bits is the IPv6 equivalent (default 16).
MinV6Bits int
}
Policy controls which prefixes are accepted into a blocklist.
type Result ¶
Result is the merged, family-split outcome of a build.
Click to show internal directories.
Click to hide internal directories.