package dns-client

  1. Overview
  2. Docs
Pure DNS resolver API

Install

Dune Dependency

Authors

Maintainers

Sources

dns-v5.0.1.tbz
sha256=72c0a1a91c8e409bd448c8e0ea28d16d13177c326aea403ee1c30ddcb5969adc
sha512=f5067d4ef6aca863bd06e6721a63a03da80052ab8e361440e72fae07ca45773763e0321236c6810afe80bd679d68763dc63fb57aec2e953173cc9a944785c93c

doc/src/dns-client.resolvconf/dns_resolvconf.ml.html

Source file dns_resolvconf.ml

1
2
3
4
5
6
7
8
9
10
let parse buf =
  try
    let buf =
      if String.(get buf (pred (length buf))) = '\n' then buf else buf ^ "\n"
    in
    let lexbuf = Lexing.from_string buf in
    Ok (Resolvconf_parser.resolvconf Resolvconf_lexer.lex lexbuf)
  with
    | Parsing.Parse_error -> Error (`Msg "parse error")
    | exn -> Error (`Msg (Printexc.to_string exn))
OCaml

Innovation. Community. Security.