package dns-client

  1. Overview
  2. Docs
DNS client API

Install

dune-project
 Dependency

Authors

Maintainers

Sources

dns-10.2.0.tbz
sha256=ad27c09256f9848658ee625d69140c898c24694aca43550bfb6fee5bc83e74e8
sha512=d5d6a0580d55485cbe46841fb8d5acd7de801bf6ce980f31888836425e39f23f3ff2e909c5f195b15a36166ae97ecd68d24429318028ae8d1ea9322df2f5a65d

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

Source file dns_resolvconf.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
let parse buf =
  try
    Resolvconf_state.reset ();
    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 (Fmt.str "parse error at line %d" Resolvconf_state.(state.lineno)))
  | exn ->
    Error (`Msg (Fmt.str "error at line %d: %s" Resolvconf_state.(state.lineno)
                   (Printexc.to_string exn)))
OCaml

Innovation. Community. Security.