Skip to main content

scope_cidrs

Function scope_cidrs 

pub fn scope_cidrs(scopes: IpScopes) -> Vec<IpNet>
Available on crate feature net only.
Expand description

The CIDR ranges that make up the given scopes mask, across IPv4 and IPv6.

Intended for turning a scope mask into concrete network rules (e.g. excluding every local range from interception in one call). IpScopes::GLOBAL has no finite CIDR list and contributes nothing. Only the well-defined, rule-shaped ranges are emitted; partial/sparse sets (the v4 protocol-assignment carve-outs) are intentionally omitted from IpScopes::RESERVED since they don’t form a clean prefix.