(cidr-parts cidr)
Parse an ip network string into its prefix and signifcant bits
cidr
must be given in CIDR notation, as defined in RFC 4632 section 3.1
Returns a vector of [^InetAddress prefix ^Integer bits]
Parse an ip network string into its prefix and signifcant bits `cidr` must be given in CIDR notation, as defined in [RFC 4632 section 3.1](https://tools.ietf.org/html/rfc4632#section-3.1) Returns a vector of [^InetAddress prefix ^Integer bits]
(contains? cidr ip)
(contains? cidr-ip cidr-mask ip)
Check if the given CIDR contains the given IP address.
Arguments: cidr - CIDR notation string (e.g. "192.168.0.0/24" or "2001:db8::/32") ip - IP address to check (can be InetAddress or string)
Check if the given CIDR contains the given IP address. Arguments: cidr - CIDR notation string (e.g. "192.168.0.0/24" or "2001:db8::/32") ip - IP address to check (can be InetAddress or string)
(reserved? ip)
Check if an IP is in a reserved range (loopback or private network).
Check if an IP is in a reserved range (loopback or private network).
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |