package dns

  1. Overview
  2. Docs
An opinionated Domain Name System (DNS) library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

dns-10.2.2.tbz
sha256=5123d7167f5fb3a5ab70cf0b3ccc965089ec440dc07edeabf8c0568ee737a7f0
sha512=4e5945435f280591c158ab03fec19dc0c807fb713d6ee68873939899c49175f39af1fbcd135517514a3ab088993356a4c303f7dce5e18d403d4630a33bad9076

doc/dns/Dns/Soa/index.html

Module Dns.SoaSource

Start of authority

The start of authority (SOA) is a resource record at domain boundaries. It contains metadata (serial number, refresh interval, hostmaster) of the domain.

Sourcetype t = {
  1. nameserver : [ `raw ] Domain_name.t;
  2. hostmaster : [ `raw ] Domain_name.t;
  3. serial : int32;
  4. refresh : int32;
  5. retry : int32;
  6. expiry : int32;
  7. minimum : int32;
}

The type of a start of authority.

Sourceval create : ?serial:int32 -> ?refresh:int32 -> ?retry:int32 -> ?expiry:int32 -> ?minimum:int32 -> ?hostmaster:'a Domain_name.t -> 'b Domain_name.t -> t

create ~serial ~refresh ~retry ~expiry ~minimum ~hostmaster nameserver returns a start of authority. The default for hostmaster is replacing the first domain name part of nameserver with "hostmaster" (to result in hostmaster@foo.com if ns1.foo.com is the nameserver.

Sourceval pp : t Fmt.t

pp ppf t pretty-prints the start of authority.

Sourceval compare : t -> t -> int

compare a b compare all fields of a with b.

Sourceval newer : old:t -> t -> bool

newer ~old new checks if the serial of old is smaller than new. To accomodate wraparounds, the formula used is new - old > 0.