package dns-resolver

  1. Overview
  2. Docs
type rank =
  1. | ZoneFile
  2. | ZoneTransfer
  3. | AuthoritativeAnswer
  4. | AuthoritativeAuthority
  5. | ZoneGlue
  6. | NonAuthoritativeAnswer
  7. | Additional
val pp_rank : rank Fmt.t
val compare_rank : rank -> rank -> int
type t
type stats
val pp_stats : stats Fmt.t
val stats : unit -> stats
val empty : int -> t
val size : t -> int
val capacity : t -> int
val pp : t Fmt.t
val pp_question : ([ `raw ] Domain_name.t * Dns.Packet.Question.qtype) Fmt.t
type res = [
  1. | `Alias of int32 * [ `raw ] Domain_name.t
  2. | `Entry of Dns.Rr_map.b
  3. | `No_data of [ `raw ] Domain_name.t * Dns.Soa.t
  4. | `No_domain of [ `raw ] Domain_name.t * Dns.Soa.t
  5. | `Serv_fail of [ `raw ] Domain_name.t * Dns.Soa.t
]
val pp_res : res Fmt.t
val cached : t -> int64 -> 'a Dns.Rr_map.key -> [ `raw ] Domain_name.t -> (res * t, [ `Cache_miss | `Cache_drop ]) Stdlib.result
val maybe_insert : 'a Dns.Rr_map.key -> [ `raw ] Domain_name.t -> int64 -> rank -> res -> t -> t
val follow_cname : t -> int64 -> 'a Dns.Rr_map.key -> name:[ `raw ] Domain_name.t -> int32 -> alias:[ `raw ] Domain_name.t -> [ `Out of Dns.Rcode.t * Dns.Name_rr_map.t * Dns.Name_rr_map.t * t | `Query of [ `raw ] Domain_name.t * t ]
val answer : t -> int64 -> [ `raw ] Domain_name.t -> Dns.Packet.Question.qtype -> [ `Query of [ `raw ] Domain_name.t * t | `Packet of Dns.Packet.Flags.t * Dns.Packet.reply * t ]
val resolve : t -> rng:(int -> Cstruct.t) -> int64 -> [ `raw ] Domain_name.t -> Dns.Rr_map.k -> [ `raw ] Domain_name.t * [ `raw ] Domain_name.t * Dns.Rr_map.k * Ipaddr.t * t
val handle_query : t -> rng:(int -> Cstruct.t) -> int64 -> [ `raw ] Domain_name.t -> Dns.Packet.Question.qtype -> [ `Reply of Dns.Packet.Flags.t * Dns.Packet.reply | `Nothing | `Query of [ `raw ] Domain_name.t * ([ `raw ] Domain_name.t * Dns.Packet.Question.qtype) * Ipaddr.t ] * t
OCaml

Innovation. Community. Security.