Functions for interacting with IP addresses and networks.
Functions for interacting with IP addresses and networks.
(->network-set coll)Create a hierarchical set from networks in coll.
Create a hierarchical set from networks in `coll`.
(address addr)The IP address for representation addr.
The IP address for representation `addr`.
(address-add addr n)The nth address following addr numerically.
The `n`th address following `addr` numerically.
(address-networks start stop)Minimal set of networks containing only the addresses in the range from
start to stop inclusive.
Minimal set of networks containing only the addresses in the range from `start` to `stop` *inclusive*.
(address-range start stop)Sequence of addresses from start to stop inclusive.
Sequence of addresses from `start` to `stop` *inclusive*.
(address-zero? addr)True iff address addr is the zero address.
True iff address `addr` is the zero address.
(address? addr)Determine if addr is a value which represents an IP address.
Determine if `addr` is a value which represents an IP address.
(inet-address addr)Generate a java.net.InetAddress from the provided value.
Generate a java.net.InetAddress from the provided value.
(network net)(network prefix length)The IP network for representation net or prefix & length.
The IP network for representation `net` or `prefix` & `length`.
(network-compare left right)(network-compare stable left right)Compare the prefixes of networks left and right, with the same result
semantics as compare. When stable is true (the default), 0 will only be
returned when the networks are value-identical; when stable is false, 0 will
be returned as long as the networks are identical up to their minimum common
prefix length.
Compare the prefixes of networks `left` and `right`, with the same result semantics as `compare`. When `stable` is true (the default), 0 will only be returned when the networks are value-identical; when `stable` is false, 0 will be returned as long as the networks are identical up to their minimum common prefix length.
(network-contains? net addr)Determine if network net contains the address/network addr.
Determine if network `net` contains the address/network `addr`.
(network-count net)Count of addresses in network net.
Count of addresses in network `net`.
(network-nth net n)The nth address in the network net. Negative ns count backwards
from the final address at -1.
The `n`th address in the network `net`. Negative `n`s count backwards from the final address at -1.
(network-set & nets)Create a hierarchical set from networks nets.
Create a hierarchical set from networks `nets`.
(network-subnets net)(network-subnets net n)Set of networks within the network net which have n additional bits of
network prefix, default 1.
Set of networks within the network `net` which have `n` additional bits of network prefix, default 1.
(network-supernet net)(network-supernet net n)Network containing the network net with a prefix shorter by n bits,
default 1.
Network containing the network `net` with a prefix shorter by `n` bits, default 1.
(network-trunc prefix)(network-trunc prefix length)Create a network with a prefix consisting of the first length bits of
prefix and a length of length.
Create a network with a prefix consisting of the first `length` bits of `prefix` and a length of `length`.
(network? net)(network? addr length)Determine if net is a value which represents an IP network.
Determine if `net` is a value which represents an IP 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 |