Liking cljdoc? Tell your friends :D

inet.data.ip

Functions for interacting with IP addresses and networks.

Functions for interacting with IP addresses and networks.
raw docstring

->addressclj

(->address addr)

Coerce addr to an IPAddress, throwing when it cannot be interpreted.

Coerce `addr` to an IPAddress, throwing when it cannot be interpreted.
sourceraw docstring

->networkclj

(->network net)

Coerce net to an IPNetwork, throwing when it cannot be interpreted.

Coerce `net` to an IPNetwork, throwing when it cannot be interpreted.
sourceraw docstring

->network-setclj

(->network-set coll)

Create a hierarchical set from networks in coll.

Create a hierarchical set from networks in `coll`.
sourceraw docstring

addressclj

(address addr)

The IP address for representation addr.

IPv6 zone IDs are accepted and carried in metadata for text round-tripping only. A zone is not part of address identity, equality, hashing, comparison, or network ordering, and is not preserved by serialization. Zones on IPv4 addresses and network literals are rejected.

The IP address for representation addr.

IPv6 zone IDs are accepted and carried in metadata for text round-tripping
only. A zone is not part of address identity, equality, hashing, comparison,
or network ordering, and is not preserved by serialization. Zones on IPv4
addresses and network literals are rejected.
sourceraw docstring

address-addclj

(address-add addr n)

The nth address following addr numerically.

The `n`th address following `addr` numerically.
sourceraw docstring

address-networksclj

(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*.
sourceraw docstring

address-rangeclj

(address-range start stop)

Sequence of addresses from start to stop inclusive.

Sequence of addresses from `start` to `stop` *inclusive*.
sourceraw docstring

address-zero?clj

(address-zero? addr)

True iff address addr is the zero address.

True iff address `addr` is the zero address.
sourceraw docstring

address?clj

(address? addr)

Determine if addr is a value which represents an IP address.

Determine if `addr` is a value which represents an IP address.
sourceraw docstring

aggregate-networksclj

(aggregate-networks values)

Return a minimal, ascending network-set covering values exactly.

Values may be addresses or networks, and bare addresses become host networks. IPv4 and IPv6 values are aggregated independently. Invalid or unsupported values are skipped, like invalid values rejected by the namespace's address and network predicates.

Return a minimal, ascending `network-set` covering `values` exactly.

Values may be addresses or networks, and bare addresses become host
networks. IPv4 and IPv6 values are aggregated independently. Invalid or
unsupported values are skipped, like invalid values rejected by the
namespace's address and network predicates.
sourceraw docstring

benchmarking?clj

(benchmarking? value)

Return true when value is in the IPv4 benchmarking block.

For a network value, true requires the entire network to be inside the benchmarking block. IPv4-mapped IPv6 addresses are not unwrapped.

Return true when `value` is in the IPv4 benchmarking block.

For a network value, true requires the entire network to be inside the
benchmarking block.  IPv4-mapped IPv6 addresses are not unwrapped.
sourceraw docstring

broadcast?clj

(broadcast? value)

Return true when value is the IPv4 limited broadcast address.

For a network value, true requires the entire network to be 255.255.255.255/32. IPv4-mapped IPv6 addresses are not unwrapped.

Return true when `value` is the IPv4 limited broadcast address.

For a network value, true requires the entire network to be
`255.255.255.255/32`. IPv4-mapped IPv6 addresses are not unwrapped.
sourceraw docstring

documentation?clj

(documentation? value)

Return true when value is in an IPv4 or IPv6 documentation block.

For a network value, true requires the entire network to be inside a documentation block. IPv4-mapped IPv6 addresses are not unwrapped.

Return true when `value` is in an IPv4 or IPv6 documentation block.

For a network value, true requires the entire network to be inside a
documentation block.  IPv4-mapped IPv6 addresses are not unwrapped.
sourceraw docstring

global?clj

(global? value)

Return true when value is valid and matches no special-use block.

For a network value, true requires the entire network to be outside every special-use block. IPv4-mapped IPv6 addresses are not unwrapped.

Return true when `value` is valid and matches no special-use block.

For a network value, true requires the entire network to be outside every
special-use block.  IPv4-mapped IPv6 addresses are not unwrapped.
sourceraw docstring

inet-addressclj

(inet-address addr)

Generate a java.net.InetAddress from the provided value.

Generate a java.net.InetAddress from the provided value.
sourceraw docstring

(link-local? value)

Return true when value is in an IPv4 or IPv6 link-local block.

For a network value, true requires the entire network to be inside a link-local block. IPv4-mapped IPv6 addresses are not unwrapped.

Return true when `value` is in an IPv4 or IPv6 link-local block.

For a network value, true requires the entire network to be inside a
link-local block.  IPv4-mapped IPv6 addresses are not unwrapped.
sourceraw docstring

loopback?clj

(loopback? value)

Return true when value is in an IPv4 or IPv6 loopback block.

For a network value, true requires the entire network to be inside a loopback block. IPv4-mapped IPv6 addresses are not unwrapped.

Return true when `value` is in an IPv4 or IPv6 loopback block.

For a network value, true requires the entire network to be inside a
loopback block.  IPv4-mapped IPv6 addresses are not unwrapped.
sourceraw docstring

multicast?clj

(multicast? value)

Return true when value is in an IPv4 or IPv6 multicast block.

For a network value, true requires the entire network to be inside a multicast block. IPv4-mapped IPv6 addresses are not unwrapped.

Return true when `value` is in an IPv4 or IPv6 multicast block.

For a network value, true requires the entire network to be inside a
multicast block.  IPv4-mapped IPv6 addresses are not unwrapped.
sourceraw docstring

networkclj

(network net)
(network prefix length)

The IP network for representation net or prefix & length.

The IP network for representation `net` or `prefix` & `length`.
sourceraw docstring

network-compareclj

(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.
sourceraw docstring

network-contains?clj

(network-contains? net addr)

Determine if network net contains the address/network addr.

Determine if network `net` contains the address/network `addr`.
sourceraw docstring

network-countclj

(network-count net)

Count of addresses in network net.

Count of addresses in network `net`.
sourceraw docstring

network-nthclj

(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.
sourceraw docstring

network-setclj

(network-set & nets)

Create a hierarchical set from networks nets.

Create a hierarchical set from networks `nets`.
sourceraw docstring

network-subnetsclj

(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.
sourceraw docstring

network-supernetclj

(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.
sourceraw docstring

network-truncclj

(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`.
sourceraw docstring

network?clj

(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.
sourceraw docstring

private?clj

(private? value)

Return true when value is in an RFC 1918 private block.

For a network value, true requires the entire network to be inside one private block. IPv4-mapped IPv6 addresses are not unwrapped.

Return true when `value` is in an RFC 1918 private block.

For a network value, true requires the entire network to be inside one
private block.  IPv4-mapped IPv6 addresses are not unwrapped.
sourceraw docstring

reserved?clj

(reserved? value)

Return true when value is in the IPv4 reserved-for-future-use block.

For a network value, true requires the entire network to be inside the reserved block. IPv4-mapped IPv6 addresses are not unwrapped.

Return true when `value` is in the IPv4 reserved-for-future-use block.

For a network value, true requires the entire network to be inside the
reserved block.  IPv4-mapped IPv6 addresses are not unwrapped.
sourceraw docstring

shared-address-space?clj

(shared-address-space? value)

Return true when value is in the IPv4 shared address space block.

For a network value, true requires the entire network to be inside the shared address space block. IPv4-mapped IPv6 addresses are not unwrapped.

Return true when `value` is in the IPv4 shared address space block.

For a network value, true requires the entire network to be inside the
shared address space block.  IPv4-mapped IPv6 addresses are not unwrapped.
sourceraw docstring

special-useclj

(special-use value)

Return the most-specific special-use concept keyword for value, or nil.

Address-like and network-like values are accepted. For a network value, the result is non-nil only when the entire network is inside one special-use block. IPv4-mapped IPv6 addresses are classified as :ipv4-mapped; they are not unwrapped and classified as IPv4 addresses.

Return the most-specific special-use concept keyword for `value`, or nil.

Address-like and network-like values are accepted.  For a network value, the
result is non-nil only when the entire network is inside one special-use
block.  IPv4-mapped IPv6 addresses are classified as `:ipv4-mapped`; they
are not unwrapped and classified as IPv4 addresses.
sourceraw docstring

unique-local?clj

(unique-local? value)

Return true when value is in the IPv6 unique-local block.

For a network value, true requires the entire network to be inside the unique-local block. IPv4-mapped IPv6 addresses are not unwrapped.

Return true when `value` is in the IPv6 unique-local block.

For a network value, true requires the entire network to be inside the
unique-local block.  IPv4-mapped IPv6 addresses are not unwrapped.
sourceraw docstring

unspecified?clj

(unspecified? value)

Return true when value is the IPv6 unspecified address.

For a network value, true requires the entire network to be ::/128. IPv4-mapped IPv6 addresses are not unwrapped.

Return true when `value` is the IPv6 unspecified address.

For a network value, true requires the entire network to be `::/128`.
IPv4-mapped IPv6 addresses are not unwrapped.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close