package dns-client

  1. Overview
  2. Docs
DNS resolver API

Install

Dune Dependency

Authors

Maintainers

Sources

dns-6.4.0.tbz
sha256=00472d566bbfd66da13642eab5fade12fde56b20dd7ac5c50415b88d052d6175
sha512=0ddeee4a155852c7ffa619de603e54dabe9ec315b79e4a1cb22a13884f9d3893458f1fa3c7b97f2eda60b29f1bfa401e53d531d8ded1089dcd8497ffa3ad1afb

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.