package dns-client

  1. Overview
  2. Docs
DNS client API

Install

Dune Dependency

Authors

Maintainers

Sources

dns-7.0.3.tbz
sha256=36afa54678979acb27a8760d3bc361e9970da7b12110f373685f7400002e16c4
sha512=71e1f6a4f7ee334de419dda2d9ef23efd2ac1a9a27194d99952a3f9f03025adcb113f8ca1de0ae41e44fa4201ff92dc77134a772356167edd70a199e2df16149

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.