package dns-client

  1. Overview
  2. Docs
DNS client API

Install

Dune Dependency

Authors

Maintainers

Sources

dns-9.1.0.tbz
sha256=8f3ec95acf14f574219b5440a689eae1acc2a49cb1d8a066f9b23a7ac68f44f0
sha512=7bf2d099919a410f270d157a04a8d2e1c499269cca868e19a80396cdfc84a9b844c353267cf9183f585bb9b975445b8e2d0a6dd64d85b8de19e7752ec495cbe9

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.