Skip to content
The Internet Compass

crates.io

ipnet

Provides types and useful methods for working with IPv4 and IPv6 network addresses, commonly called IP prefixes. The new `IpNet`, `Ipv4Net`, and `Ipv6Net` types build on the existing `IpAddr`, `Ipv4Addr`, and `Ipv6Addr` types already provided in Rust's standard library and align to their design to stay consistent. The module also provides useful traits that extend `Ipv4Addr` and `Ipv6Addr` with methods for `Add`, `Sub`, `BitAnd`, and `BitOr` operations. The module only uses stable feature so it is guaranteed to compile using the stable toolchain.

Security

No known vulnerabilities in the OSV database as of the last sync.

Repository

https://github.com/krisprice/ipnet ↗

Sourced from crates.io · Updated September 6, 2026

Package metadata from crates.io, the Rust community's crate registry.

View original source ↗Spot an error on this page? Let us know →

FAQ

Common questions

What is ipnet?

Provides types and useful methods for working with IPv4 and IPv6 network addresses, commonly called IP prefixes. The new `IpNet`, `Ipv4Net`, and `Ipv6Net` types build on the existing `IpAddr`, `Ipv4Addr`, and `Ipv6Addr` types already provided in Rust's standard library and align to their design to stay consistent. The module also provides useful traits that extend `Ipv4Addr` and `Ipv6Addr` with methods for `Add`, `Sub`, `BitAnd`, and `BitOr` operations. The module only uses stable feature so it is guaranteed to compile using the stable toolchain.

Is ipnet safe to use?

No known vulnerabilities in the OSV database as of the last sync.

What license does ipnet use?

ipnet does not specify a license.