Liking cljdoc? Tell your friends :D

com.dmo-t.ipaddress.core


->ipaddressclj

(->ipaddress ip)

Tries to create an IPv4Address, if unsucessful: tries IPv6Address.

Tries to create an IPv4Address, if unsucessful: tries IPv6Address.
sourceraw docstring

->ipinterfaceclj

(->ipinterface net)

Tries to create an IPv4Interface, if unsucessful: tries IPv6Interface.

Tries to create an IPv4Interface, if unsucessful: tries IPv6Interface.
sourceraw docstring

->ipnetworkclj

(->ipnetwork net)

Tries to create an IPv4Network, if unsucessful: tries IPv6Network.

Tries to create an IPv4Network, if unsucessful: tries IPv6Network.
sourceraw docstring

->ipv4addresscljmultimethod

Used to create and IPv4Address. 'ip' can be a 'Long' or a 'String'.

Used to create and IPv4Address.
'ip' can be a 'Long' or a 'String'.
sourceraw docstring

->ipv4interfaceclj

(->ipv4interface intf)

Creates an IPv4Interface. 'intf' must in format: ip/netmask or ip/prefixlen

Creates an IPv4Interface.
'intf' must in format: ip/netmask or ip/prefixlen 
sourceraw docstring

->ipv4networkcljmultimethod

Creates an IPv4Network. 'arg' must be in form network/prefixlen or network/netmask

Creates an IPv4Network.
'arg' must be in form network/prefixlen or network/netmask
sourceraw docstring

->ipv6addresscljmultimethod

Used to create IPV6address. The input must be string or a clojure.lang.BigInt.

Used to create IPV6address.
The input must be string or a clojure.lang.BigInt.
sourceraw docstring

->ipv6interfaceclj

(->ipv6interface net)

Create and IPv6Interface. 'net' must be a string in format addr/prefixlen

Create and IPv6Interface. 
'net' must be a string in format addr/prefixlen
sourceraw docstring

->ipv6networkcljmultimethod

Create and IPv6Network. 'net' must be a string in format addr/prefixlen

Create and IPv6Network. 
'net' must be a string in format addr/prefixlen
sourceraw docstring

collapse-addressesclj

(collapse-addresses coll)

Collapse a list of IPNetwork

Collapse a list of IPNetwork
sourceraw docstring

IIPAddrConvcljprotocol

to-intclj

(to-int this)

Convert an IPv[46]Address to int

Convert an IPv[46]Address to int
source

IIPAddresscljprotocol

in?clj

(in? this net)

Returns true if the IPv[46]Address is contained in IPv[46]Network

Returns true if the IPv[46]Address is contained in IPv[46]Network
source

IIPBasecljprotocol

<=?clj

(<=? this other)

Returns (or (=? this other) (<? this other)

Returns (or (=? this other) (<? this other)

<?clj

(<? this other)

Returns (neg? (compare this other))

Returns (neg? (compare this other))

=?clj

(=? this other)

Returns (zero? (compare this other))

Returns (zero? (compare this other))

>=?clj

(>=? this other)

Returns (or (=? this other) (>? this other)

Returns (or (=? this other) (>? this other)

>?clj

(>? this other)

Returns (pos? (compare this other))

Returns (pos? (compare this other))

max-prefixlenclj

(max-prefixlen this)

Returns the maximum value of prefix length (size in bits of IP object)

Returns the maximum value of prefix length (size in bits of IP object)

toStringclj

(toString this)

Returns the default string representation of the type.

  • IPv[46]Address and IPv[46]Netmask: the address representation,
  • IPv[46]Network, IPv[46]Interface: address/prefixlen 'str' calls this function.
Returns the default string representation of the type.
- IPv[46]Address and IPv[46]Netmask: the address representation,
- IPv[46]Network, IPv[46]Interface: address/prefixlen
'str' calls this function.

versionclj

(version this)

Returns the IPAddress version: 4 or 6.

Returns the IPAddress version: 4 or 6.
source

IIPInterfacecljprotocol

addressclj

(address this)

Returns the IPv[46]Address of the IPv[46]Interface.

Returns the IPv[46]Address of the IPv[46]Interface.

networkclj

(network this)

Returns the IPv[46]Network containing the IPv[46]Interface.

Returns the IPv[46]Network containing the IPv[46]Interface.
source

IIPItercljprotocol

next-oneclj

(next-one this)

Returns the next entry of same type.

  • IPv[46]Address: returns the next IPv[46]Address
  • IPv[46]Network: returns the next IPv[46]Network with same netmask,
  • IPv[46]Interface: returns the next IPv[46]Interface in the same network. Returns nil when no more entry is available. (next-one nil) returns nil
Returns the next entry of same type.
- IPv[46]Address: returns the next IPv[46]Address
- IPv[46]Network: returns the next IPv[46]Network with same netmask,
- IPv[46]Interface: returns the next IPv[46]Interface in the same network.
Returns nil when no more entry is available.
(next-one nil) returns nil
source

IIPNetmaskcljprotocol

to-hostmaskclj

(to-hostmask this)

Converts an IPv[46]Netmask to an IPv[46]Address representing the hostmask

Converts an IPv[46]Netmask to an IPv[46]Address representing the hostmask

to-prefixlenclj

(to-prefixlen this)

Converts an IPv[46]Netmask to a prefixlen (that is an int)

Converts an IPv[46]Netmask to a prefixlen (that is an int)
source

IIPNetworkcljprotocol

to-seqclj

(to-seq this)

Returns a lazy seq of all IPv[46]Address contained in the network.

Returns a lazy seq of all IPv[46]Address contained in the network.

netmaskclj

(netmask this)

Returns the network netmask: IPv[46]Netmask type.

Returns the network netmask: IPv[46]Netmask type.

hostmaskclj

(hostmask this)

Returns the network hostmask: IPv[46]Address

Returns the network hostmask: IPv[46]Address

network-addressclj

(network-address this)

Returns the network address: IPv[46]Address type. (Same base-address)

Returns the network address: IPv[46]Address type. (Same base-address)

broadcast-addressclj

(broadcast-address this)

Returns the network broadcast address: IPv[46]Address type.

Returns the network broadcast address: IPv[46]Address type.

contains-ip?clj

(contains-ip? this ip)

Tests if the network contains the IPv[46]Address

Tests if the network contains the IPv[46]Address

overlaps?clj

(overlaps? this other)

Tests is the two IPv[46]Network overlap.

Tests is the two IPv[46]Network overlap.

hostsclj

(hosts this)

Returns the IPv[46]Address usable for host addressing in this network. Lazy seq.

Returns the IPv[46]Address usable for host addressing in this network. Lazy seq.

address-excludeclj

(address-exclude this other)

Returns a list of subnets of the network, with the exclusion of other

Returns a list of subnets of the network, with the exclusion of other

supernet-of?clj

(supernet-of? this other)

Tests if the network is a superneet of other network.

Tests if the network is a superneet of other network.

subnetsclj

(subnets this new-prefixlen)

Returns a list of IPv[46]Network with new-prefixlen which are subnets of this.

Returns a list of IPv[46]Network with new-prefixlen which are subnets of this.

prefixlenclj

(prefixlen this)

Returns the network prefixlen: int

Returns the network prefixlen: int

num-addressesclj

(num-addresses this)

Compute the number of addresses in the network.

Compute the number of addresses in the network.

supernetclj

(supernet this new-prefixlen)

Returns the supernet with new-prefixlen that contains the network.

Returns the supernet with new-prefixlen that contains the network.

subnet-of?clj

(subnet-of? this other)

Tests if the nerwork is a subnet of other network

Tests if the nerwork is a subnet of other network

base-addressclj

(base-address this)

(Legacy: use network-address instead). Returns the network address: IPv[46]Address type.

(Legacy: use `network-address` instead). Returns the network address: IPv[46]Address type. 
source

IIPScopecljprotocol

Various predicates, testing the address, network type/scope.

Various predicates, testing the address, network type/scope.

global?clj

(global? this)
(link-local? this)

loopback?clj

(loopback? this)

multicast?clj

(multicast? this)

private?clj

(private? this)

reserved?clj

(reserved? this)

unspecified?clj

(unspecified? this)
sourceraw docstring

IIPStrcljprotocol

with-hostmaskclj

(with-hostmask this)

returns a string representation in the format: addr/hostmask

returns a string representation in the format: addr/hostmask

with-netmaskclj

(with-netmask this)

Returns a string representation in the format: addr/netmask

Returns a string representation in the format: addr/netmask

with-prefixlenclj

(with-prefixlen this)

Returns a string representation in the format: addr/prefixlen

Returns a string representation in the format: addr/prefixlen
source

IIPv6Scopecljprotocol

site-local?clj

(site-local? this)
source

IIPv6Specificcljprotocol

ipv4-mappedclj

(ipv4-mapped this)

Returns the IPv4Address if it is an ipv4 mapped address. Returns nil otherwise.

Returns the IPv4Address if it is an ipv4 mapped address. 
Returns nil otherwise.

scopeidclj

(scopeid this)
source

summarize-address-rangeclj

(summarize-address-range ip1 ip2)

Given the first and last IP Address: returns a list of IP Network representing the range.

Given the first and last IP Address: returns a list of IP Network representing the range. 
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