An opinionated Domain Name System (DNS) library
Library dns
Module Dns . Soa
type t = {
nameserver : [ `raw ] Domain_name.t;
hostmaster : [ `raw ] Domain_name.t;
serial : int32;
refresh : int32;
retry : int32;
expiry : int32;
minimum : int32;

The type of a start of authority.

val 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.

val pp : t Fmt.t

pp ppf t pretty-prints the start of authority.

val compare : t -> t -> int

compare a b compare all fields of a with b.

val 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.