cidr() = {Start::inet:ip4_address(), End::inet:ip4_address(), MaskLen::0..32} | {Start::inet:ip6_address(), End::inet:ip6_address(), MaskLen::0..128}
| address_count/2 | return the number of IP addresses included in the CIDR block. |
| contains/2 | return true if the CIDR block contains the IP address or CIDR block, false otherwise. |
| ip_gte/2 | |
| ip_lte/2 | |
| is_ipv4/1 | return true if the value is an ipv4 address. |
| is_ipv6/1 | return true if the value is an ipv6 address. |
| merge_cidrs/1 | Unique sort and merge a list of CIDR blocks, ordering IPv4 ranges before IPv6 ranges. |
| parse/1 | parses S as a CIDR notation IP address and mask. |
| parse/2 | parses S as a CIDR notation IP address and mask. |
| to_binary/1 | return a CIDR block as a binary string. |
| to_string/1 | return a CIDR block as a string. |
| usort_cidrs/1 | Unique sort a list of CIDR blocks, ordering IPv4 ranges before IPv6 ranges. |
address_count(IP::inet:ip4_address(), MaskLen::0..32) -> pos_integer()
address_count(IP::inet:ip6_address(), MaskLen::0..128) -> pos_integer()
return the number of IP addresses included in the CIDR block
contains(X1::cidr(), Addr::inet:ip_address() | cidr()) -> boolean()
return true if the CIDR block contains the IP address or CIDR block, false otherwise.
ip_gte(X1, X2) -> any()
ip_lte(X1, X2) -> any()
is_ipv4(X1::inet:ip_address()) -> boolean()
return true if the value is an ipv4 address
is_ipv6(X1::inet:ip_address()) -> boolean()
return true if the value is an ipv6 address
Unique sort and merge a list of CIDR blocks, ordering IPv4 ranges before IPv6 ranges. For merging, CIDR blocks that are contained by other CIDR blocks are removed and adjacent CIDR blocks are merged into larger ones.
parse(S::string() | binary()) -> cidr()
parses S as a CIDR notation IP address and mask
parse(B::string() | binary(), Adjust::boolean()) -> cidr()
parses S as a CIDR notation IP address and mask.
If Adjust = true, allow the IP to contain values beyond the mask and
silently ignore them. Otherwise, enforce that the IP address is fully inside
the specified mask (the default behavior of parse/1).
to_binary(X1::cidr()) -> binary()
return a CIDR block as a binary string.
to_string(X1::cidr()) -> string()
return a CIDR block as a string.
Unique sort a list of CIDR blocks, ordering IPv4 ranges before IPv6 ranges
Generated by EDoc