package dnssd

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

* Copyright (C) 2017 Docker Inc <dave.scott@docker.com> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *

Bindings to the macOS DNS SD API

These functions allow DNS queries to be made via the macOS resolver.

val is_supported_on_this_platform : unit -> bool

is_supported_on_this_platform () is true if this library is supported on this platform. On other platforms the APIs may throw runtime failures.

type error =
  1. | Unknown
  2. | NoSuchName
  3. | NoMemory
  4. | BadParam
  5. | BadReference
  6. | BadState
  7. | BadFlags
  8. | Unsupported
  9. | NotInitialized
  10. | AlreadyRegistered
  11. | NameConflict
  12. | Invalid
  13. | Firewall
  14. | Incompatible
  15. | BadInterfaceIndex
  16. | Refused
  17. | NoSuchRecord
  18. | NoAuth
  19. | NoSuchKey
  20. | NATTraversal
  21. | DoubleNAT
  22. | BadTime
  23. | BadSig
  24. | BadKey
  25. | Transient
  26. | ServiceNotRunning
  27. | NATPortMappingUnsupported
  28. | NATPortMappingDisabled
  29. | NoRouter
  30. | PollingMode
  31. | Timeout
    (*

    Possible errors from query

    *)
val string_of_error : error -> string
val query : string -> Dns.Packet.q_type -> (Dns.Packet.rr list, error) Pervasives.result

query name ty returns a list of resource records of type ty bound to name

module LowLevel : sig ... end

A low-level interface which exposes the Unix domain socket used to talk to the daemon.

OCaml

Innovation. Community. Security.