A comprehensive Go library for manipulating IP addresses and networks, inspired by Python's ipaddress and Ruby's ipaddr.
IPLib is a Go library designed for working with IP addresses and networks, providing tools to manipulate, compare, and manage both IPv4 and IPv6 addresses. It solves the problem of handling IP address arithmetic, subnetting, and network enumeration by offering a comprehensive set of functions built on top of Go's standard net package.
Go developers who need to perform IP address calculations, network management, or build networking tools that require efficient and accurate IP manipulation.
Developers choose IPLib for its performance optimizations, especially for IPv6 operations using uint128, and its feature-rich API that simplifies complex IP networking tasks compared to using the standard library alone.
A library for working with IP addresses and networks in Go
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses uint128.Uint128 instead of math/big, with benchmarks showing up to 28x speed improvement for operations like DeltaIP6, as documented in the README.
Provides functions for comparing, converting, enumerating, and manipulating IP addresses, such as IPToHexString and subnet allocation, extending Go's standard net package.
Implements separate Net4 and Net6 types that correctly handle IPv4 broadcast addresses and IPv6 hostmasks, accounting for protocol-specific nuances like RFC3021 point-to-point links.
Includes sub-modules for referencing IANA special registries and generating RFC-compliant IPv6 Interface Identifiers, adding regulatory and standards compliance features.
Version 2.0.0 introduces breaking changes for IPv6 operations, requiring code updates and potentially disrupting existing projects, as noted in the README's attention section.
Relies on uint128.Uint128 for IPv6 performance, adding a third-party library that the author hopes to replace in a future version, introducing maintenance and compatibility risks.
The rich API, including hostmasks and version-specific implementations, may be overkill for developers needing only basic IP functions, leading to unnecessary learning overhead.