Liking cljdoc? Tell your friends :D

inet.data.dns

Functions for interacting with DNS domain names.

This namespace represents domain names internally in a normalized byte-oriented form. The normalized form has these properties:

  • IDN labels use IDNA encoding.
  • Domain labels go from top-level to bottom-level. This is the reverse of the usual order.
  • A byte comes before each label. The byte gives the count of bytes in the label.

This form has these benefits:

  • It can represent any binary data accurately, the same as the DNS wire form.
  • Lexicographic byte order is also hierarchical order.
  • For a given child domain and ancestor domain, you can find the next longer child of the ancestor.

The main disadvantage is that this form makes it more difficult to find the immediate parent of a given domain.

Functions for interacting with DNS domain names.

This namespace represents domain names internally in a normalized
byte-oriented form. The normalized form has these properties:

- IDN labels use IDNA encoding.
- Domain labels go from top-level to bottom-level. This is the reverse of the
  usual order.
- A byte comes before each label. The byte gives the count of bytes in the
  label.

This form has these benefits:

- It can represent any binary data accurately, the same as the DNS wire form.
- Lexicographic byte order is also hierarchical order.
- For a given child domain and ancestor domain, you can find the next longer
  child of the ancestor.

The main disadvantage is that this form makes it more difficult to find the
immediate parent of a given domain.
raw docstring

->domainclj

(->domain dom)

Coerce dom to a DNSDomain. Throws when it cannot interpret dom.

Coerce `dom` to a DNSDomain. Throws when it cannot interpret `dom`.
sourceraw docstring

->domain-setclj

(->domain-set coll)

Create a hierarchical set from the domains in coll.

Create a hierarchical set from the domains in `coll`.
sourceraw docstring

domainclj

(domain dom)

Return the DNS domain for representation dom.

Return the DNS domain for representation `dom`.
sourceraw docstring

domain-ancestorsclj

(domain-ancestors child)
(domain-ancestors child parent)

Generate a seq of all the domains for which the domain child is a proper subdomain. The seq starts with the domain after parent and ends with the domain itself. Uses the implied empty root domain as parent if you do not supply one.

Generate a seq of all the domains for which the domain `child` is a proper
subdomain. The seq starts with the domain after `parent` and ends with the
domain itself. Uses the implied empty root domain as `parent` if you do not
supply one.
sourceraw docstring

domain-byte-seqclj

(domain-byte-seq dom)

Return the internal normalized byte form of the domain dom as a sequence of bytes.

Return the internal normalized byte form of the domain `dom` as a
sequence of bytes.
sourceraw docstring

domain-compareclj

(domain-compare left right)
(domain-compare stable left right)

Compare two domains. The result semantics are the same as compare. When stable is true (the default), the result is 0 only when the domains are value-identical. When stable is false, the result is 0 when the domains are identical up to their minimum common full-label length. Domain comparison always ignores case.

Compare two domains. The result semantics are the same as `compare`. When
`stable` is true (the default), the result is 0 only when the domains are
value-identical. When `stable` is false, the result is 0 when the domains are
identical up to their minimum common full-label length. Domain comparison
always ignores case.
sourceraw docstring

domain-contains?clj

(domain-contains? parent child)

Determine if the domain child is a subdomain of or identical to the domain parent.

Determine if the domain `child` is a subdomain of or identical to the domain
`parent`.
sourceraw docstring

domain-hostname?clj

(domain-hostname? dom)
(domain-hostname? dom underscores)

Determine if the domain dom is a valid hostname. Let hostnames contain underscores if underscores is true (default false).

Determine if the domain `dom` is a valid hostname.  Let hostnames contain
underscores if `underscores` is true (default false).
sourceraw docstring

domain-labelsclj

(domain-labels dom)

Seq of labels in the domain dom.

Seq of labels in the domain `dom`.
sourceraw docstring

domain-nextclj

(domain-next child)
(domain-next child parent)

For the domain child which is a subdomain of the domain parent, return the immediate child domain of parent. This domain is identical to child, or it is a parent domain of child. Returns nil if there is no such domain. Uses the implied empty root domain as parent if you do not supply one.

For the domain `child` which is a subdomain of the domain `parent`, return
the immediate child domain of `parent`. This domain is identical to `child`,
or it is a parent domain of `child`. Returns `nil` if there is no such domain.
Uses the implied empty root domain as `parent` if you do not supply one.
sourceraw docstring

domain-parentclj

(domain-parent dom)

Return the domain of which dom is an immediate subdomain.

Return the domain of which `dom` is an immediate subdomain.
sourceraw docstring

domain-setclj

(domain-set & doms)

Create a hierarchical set from domains doms.

Create a hierarchical set from domains `doms`.
sourceraw docstring

domain-subdomain?clj

(domain-subdomain? parent child)

Determine if child is a subdomain of parent.

Determine if `child` is a subdomain of `parent`.
sourceraw docstring

domain?clj

(domain? dom)

Determine if dom represents a DNS domain.

Determine if `dom` represents a DNS domain.
sourceraw docstring

idn-strclj

(idn-str dom)

Convert dom to IDN string form. Interpret Punycode.

Convert `dom` to IDN string form. Interpret Punycode.
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