diff --git a/.travis.yml b/.travis.yml index 308912865..3a89bb4f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,22 +6,15 @@ services: sudo: false env: global: - - PINS="dns.dev:. dns-certify.dev:. dns-client.dev:. dns-client-lwt.dev:. dns-mirage-client.dev:. dns-client-unix.dev:. dns-resolver.dev:. dns-server.dev:. dns-tsig.dev:. dns-zone.dev:. dns-cli.dev:. dns-mirage.dev:. dns-mirage-resolver.dev:. dns-mirage-server.dev:. dns-mirage-certify.dev:." + - PINS="dns.dev:. dns-certify.dev:. dns-client.dev:. dns-resolver.dev:. dns-server.dev:. dns-tsig.dev:. dns-cli.dev:. dns-mirage.dev:." matrix: - DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns" - - DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-zone" - DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-resolver" - DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-mirage" - - DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-mirage-resolver" - - DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-mirage-server" - DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-certify" - DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-client" - DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-server" - - DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-client-lwt" - DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-tsig" - - DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-mirage-certify" - DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-cli" - - DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-client-unix" - - DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-mirage-client" notifications: email: false diff --git a/CHANGES.md b/CHANGES.md index f54bcf5a0..2bd6c53de 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,34 @@ -### v2.0.0 (dev) - -* Switch to uDNS implementation. - TODO more details. +### v4.0.0 (2019-08-15) + +* Switch to uDNS implementation, developed from scratch since 2017, primarily + focusing on a recursive caching resolver. The server part supports dynamic + updates (RFC 2135), transaction authentication with HMAC (RFC 2845), zone + transfer (RFC 5936), incremental zone transfer (RFC 1995), change + notifications (RFC 1996) amongst others. +* The core library uses a GADT for resource record sets, where the key (resource + record type) specifies the value type. +* The API does not leak exceptions, but uses the result type where appropriate. +* TCP transport is well supported and used widely (client uses it by default) +* Naming: client is a DNS client, resolver is the recursive resolver library +* The DNS library is split into the following opam packages and sublibraries: + - `dns` - the core library + - `dns-tsig` - transaction signatures + - `dns-zone` - zone file parser (mostly taken from the 1.x series) + - `dns-cli` - command line utilities (odig, onotify, ..) + - `dns-client` - pure client implementation + - `.unix` - DNS client using the Unix module for communication + - `.lwt` - DNS client using Lwt_unix for communication + - `.mirage` - DNS client using MirageOS for communication + - `dns-certify` - helpers for let's encrypt provisioning + - `.mirage` - certificate provisioning with MirageOS + - `dns-mirage` - generic MirageOS communication layer + - `dns-server` - pure server implementation + - `.mirage` - MirageOS primary and secondary server + - `dns-resolver` - pure recursive resolver implementation + - `.mirage` - MirageOS recursive resolver +* Only OCaml 4.07.0 and above are supported +* Multicast DNS has been dropped for now +* A client using async from JS has not been implemented yet ### v1.1.2 (2019-02-28) diff --git a/README.md b/README.md index d91d820a0..635660c2c 100644 --- a/README.md +++ b/README.md @@ -97,10 +97,10 @@ API documentation [is available online](https://mirage.github.io/ocaml-dns/). ## Transition from older versions -The pre-2.0.0 versions of ocaml-dns had a significantly different interface, +The pre-4.0.0 versions of ocaml-dns had a significantly different interface, and so applications using them will need to be rewritten to follow the -stricter coding style used in the post-2.0.0 branches. The major improvements -from 1.x to the 2.x series are: +stricter coding style used in the post-4.0.0 branches. The major improvements +from 1.x to the 4.x series are: - data (rrset) is defined in a single GADT in `Rr_map` - add support for: notify, dynamic update, zone transfer, tsig (hmac authentication), edns @@ -123,7 +123,7 @@ you will have to pin the same *version* for all of them: ```csh : csh syntax -set version=2.0.0 +set version=4.0.0 set repo=git+https://github.com/mirage/ocaml-dns.git # the -y parameter means "force" or @@ -132,21 +132,17 @@ set repo=git+https://github.com/mirage/ocaml-dns.git # the -n parameter means # "just register the pin, don't actually install it yet" -foreach pkg ( dns dns-{certify,cli,client{,-lwt,-unix}} \ - dns-mirage{,-certify,-client,-resolver,-server} \ - dns-{resolver,server,tsig,zone} ) +foreach pkg ( dns dns-{certify,cli,client,resolver,server,mirage,tsig} ) opam pin add -y -n $pkg.$version --dev $repo end ``` ```bash : bash syntax -version=2.0.0 +version=4.0.0 repo=git+https://github.com/mirage/ocaml-dns.git -for pkg in dns dns-{certify,cli,client{,-lwt,-unix}} \ - dns-mirage{,-certify,-client,-resolver,-server} \ - dns-{resolver,server,tsig,zone} +for pkg in dns dns-{certify,cli,client,resolver,server,mirage,tsig} do opam pin add -y -n $pkg.$version --dev $repo done @@ -154,7 +150,7 @@ done Now you can install the packages you need, for instance: ```shell -opam install dns-client-lwt +opam install dns-client ``` or ```shell diff --git a/app/dune b/app/dune index 61ca9bc2c..76348aa2b 100644 --- a/app/dune +++ b/app/dune @@ -1,6 +1,5 @@ (library (name dns_cli) - (synopsis "A Domain Name system (DNS) library, unix applications") (public_name dns-cli) (wrapped false) (modules dns_cli) @@ -32,11 +31,11 @@ (public_name ozone) (package dns-cli) (modules ozone) - (libraries dns dns-cli dns-zone dns-server bos rresult)) + (libraries dns dns-cli dns-server.zone dns-server bos rresult)) (executable (name odns) (public_name odns) (modules odns) (package dns-cli) - (libraries dns dns-client-lwt dns-cli cmdliner lwt.unix hex rresult)) \ No newline at end of file + (libraries dns dns-client.lwt dns-cli cmdliner lwt.unix hex rresult)) \ No newline at end of file diff --git a/certify/dune b/certify/dune index 666a705d8..9b94ae5f3 100644 --- a/certify/dune +++ b/certify/dune @@ -1,6 +1,5 @@ (library (name dns_certify) - (synopsis "A Domain Name system (DNS) library, certificate integration") (public_name dns-certify) (wrapped false) (libraries dns dns-tsig x509 randomconv)) diff --git a/client/dune b/client/dune index 61d5b7467..acc6f25ca 100644 --- a/client/dune +++ b/client/dune @@ -2,5 +2,5 @@ (name dns_client) (public_name dns-client) (modules dns_client dns_client_flow) - (libraries domain-name mirage-flow dns randomconv rresult) + (libraries domain-name dns randomconv rresult) (wrapped false)) diff --git a/dns-certify.opam b/dns-certify.opam index 242a56371..02a88ddf6 100644 --- a/dns-certify.opam +++ b/dns-certify.opam @@ -12,9 +12,16 @@ depends: [ "ocaml" {>= "4.07.0"} "dns" {= version} "dns-tsig" {= version} - "randomconv" - "duration" + "dns-mirage" {= version} + "randomconv" {>= "0.1.2"} + "duration" {>= "0.1.2"} "x509" {>= "0.7.1"} + "lwt" {>= "4.2.1"} + "tls" {>= "0.10.3"} + "mirage-random" {>= "1.2.0"} + "mirage-time-lwt" {>= "1.3.0"} + "mirage-clock-lwt" {>= "2.0.0"} + "mirage-stack-lwt" {>= "1.4.0"} ] build: [ diff --git a/dns-cli.opam b/dns-cli.opam index 43bd7844d..1dfe1b184 100644 --- a/dns-cli.opam +++ b/dns-cli.opam @@ -12,21 +12,20 @@ depends: [ "ocaml" {>= "4.07.0"} "dns" {= version} "dns-tsig" {= version} - "dns-client-lwt" {= version} - "dns-zone" {= version} + "dns-client" {= version} "dns-server" {= version} "dns-certify" {= version} - "rresult" - "bos" + "rresult" {>= "0.6.0"} + "bos" {>= "0.2.0"} "cmdliner" {>= "1.0.0"} - "fpath" + "fpath" {>= "0.7.2"} "x509" {>= "0.7.1"} - "nocrypto" - "hex" - "ptime" - "logs" - "fmt" - "ipaddr" {>= "3.0.0"} + "nocrypto" {>= "0.5.4"} + "hex" {>= "1.4.0"} + "ptime" {>= "0.8.5"} + "logs" {>= "0.6.3"} + "fmt" {>= "0.8.8"} + "ipaddr" {>= "4.0.0"} "alcotest" {with-test} ] diff --git a/dns-client-lwt.opam b/dns-client-lwt.opam deleted file mode 100644 index 0e3a765e6..000000000 --- a/dns-client-lwt.opam +++ /dev/null @@ -1,24 +0,0 @@ -opam-version: "2.0" -maintainer: "team AT robur dot io" -authors: ["Joe Hill"] -homepage: "https://github.com/mirage/ocaml-dns" -bug-reports: "https://github.com/mirage/ocaml-dns/issues" -dev-repo: "git+https://github.com/mirage/ocaml-dns.git" -license: "BSD2" - -build: [ - [ "dune" "subst"] {pinned} - [ "dune" "build" "-p" name "-j" jobs ] -] - -depends: [ - "dune" {build & >="1.5.1"} - "ocaml" { >= "4.07.0"} - "lwt" - "dns" {= version} - "dns-client" {= version} -] -synopsis: "DNS client library, using lwt for IO" -description: """ -A DNS client library providing resolve that uses lwt for IO. -""" diff --git a/dns-client-unix.opam b/dns-client-unix.opam deleted file mode 100644 index 0683f8e36..000000000 --- a/dns-client-unix.opam +++ /dev/null @@ -1,27 +0,0 @@ -opam-version: "2.0" -maintainer: "team AT robur dot io" -authors: ["Joe Hill"] -homepage: "https://github.com/mirage/ocaml-dns" -bug-reports: "https://github.com/mirage/ocaml-dns/issues" -dev-repo: "git+https://github.com/mirage/ocaml-dns.git" -license: "BSD2" - -build: [ - [ "dune" "subst"] {pinned} - [ "dune" "build" "-p" name "-j" jobs ] -] - -depends: [ - "dune" {build & >="1.5.1"} - "ocaml" {>= "4.07.0"} - "domain-name" {>= "0.3.0"} - "fmt" {>= "0.8.4"} - "ipaddr" {>= "3.0.0"} - "dns-client" {= version} - "fmt" {>= "0.8.4"} - "rresult" {>= "0.6.0"} -] -synopsis: "Unix DNS resolver, providing resolve" -description: """ -An effectful layer for udns-client, that uses the Unix module from OCaml stdlib. -""" diff --git a/dns-client.opam b/dns-client.opam index 45f364cd6..4e2529f04 100644 --- a/dns-client.opam +++ b/dns-client.opam @@ -14,14 +14,17 @@ build: [ depends: [ "dune" {build & >="1.5.1"} "ocaml" {>= "4.07.0"} - "cstruct" {>= "3.1.1"} - "fmt" {>= "0.8.4"} - "logs" {>= "0.6.2"} + "cstruct" {>= "4.0.0"} + "fmt" {>= "0.8.8"} + "logs" {>= "0.6.3"} "dns" {= version} "rresult" {>= "0.6.0"} - "mirage-flow" - "randomconv" + "randomconv" {>= "0.1.2"} "domain-name" {>= "0.3.0"} + "ipaddr" {>= "4.0.0"} + "lwt" {>= "4.2.1"} + "mirage-stack-lwt" {>= "1.4.0"} + "mirage-random" {>= "1.2.0"} ] synopsis: "Pure DNS resolver API" description: """ diff --git a/dns-mirage-certify.opam b/dns-mirage-certify.opam deleted file mode 100644 index 30197de90..000000000 --- a/dns-mirage-certify.opam +++ /dev/null @@ -1,35 +0,0 @@ -opam-version: "2.0" -maintainer: "team AT robur dot io" -authors: ["Hannes Mehnert "] -homepage: "https://github.com/mirage/ocaml-dns" -doc: "https://mirage.github.io/ocaml-dns/" -dev-repo: "git+https://github.com/mirage/ocaml-dns.git" -bug-reports: "https://github.com/mirage/ocaml-dns/issues" -license: "BSD2" - -depends: [ - "dune" {build & >= "1.2.0"} - "ocaml" {>= "4.07.0"} - "dns" {= version} - "dns-mirage" {= version} - "dns-certify" {= version} - "mirage-random" - "mirage-time-lwt" - "mirage-clock-lwt" {>= "2.0.0"} - "lwt" - "duration" - "tls" - "mirage-stack-lwt" -] - -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] - -synopsis: "MirageOS let's encrypt certificate retrieval" -description: """ -A function to retrieve a certificate when providing a hostname, TSIG key, server -IP, and an optional key seed. Best used with an letsencrypt unikernel. -""" diff --git a/dns-mirage-client.opam b/dns-mirage-client.opam deleted file mode 100644 index 8adc9c99e..000000000 --- a/dns-mirage-client.opam +++ /dev/null @@ -1,27 +0,0 @@ -opam-version: "2.0" -maintainer: "team AT robur dot io" -homepage: "https://github.com/mirage/ocaml-dns" -bug-reports: "https://github.com/mirage/ocaml-dns/issues" -dev-repo: "git+https://github.com/mirage/ocaml-dns.git" -license: "BSD2" -authors: [ "Hannes Mehnert" ] -tags: "org:mirage" - -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] -] - -depends: [ - "dune" { build & >= "1.5.1"} - "ocaml" {>= "4.07.0" } - "domain-name" {>= "0.3.0"} - "ipaddr" {>= "3.0.0"} - "mirage-stack-lwt" - "mirage-random" - "dns-client" {= version} -] -synopsis: "DNS client library for MirageOS" -description: """ -A DNS client library for MirageOS. Based on uDNS. -""" diff --git a/dns-mirage-resolver.opam b/dns-mirage-resolver.opam deleted file mode 100644 index 32eed4b29..000000000 --- a/dns-mirage-resolver.opam +++ /dev/null @@ -1,35 +0,0 @@ -opam-version: "2.0" -maintainer: "team AT robur dot io" -authors: ["Hannes Mehnert "] -homepage: "https://github.com/mirage/ocaml-dns" -doc: "https://mirage.github.io/ocaml-dns/" -dev-repo: "git+https://github.com/mirage/ocaml-dns.git" -bug-reports: "https://github.com/mirage/ocaml-dns/issues" -license: "BSD2" - -depends: [ - "dune" {build & >= "1.2.0"} - "ocaml" {>= "4.07.0"} - "dns" {= version} - "dns-mirage" {= version} - "dns-server" {= version} - "dns-resolver" {= version} - "mirage-time-lwt" - "mirage-clock-lwt" - "mirage-random" - "lwt" - "randomconv" - "duration" - "mirage-stack-lwt" -] - -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] - -synopsis: "DNS caching resolver for MirageOS" -description: """ -A caching DNS resolver for MirageOS. -""" diff --git a/dns-mirage-server.opam b/dns-mirage-server.opam deleted file mode 100644 index def710d8f..000000000 --- a/dns-mirage-server.opam +++ /dev/null @@ -1,34 +0,0 @@ -opam-version: "2.0" -maintainer: "team AT robur dot io" -authors: ["Hannes Mehnert "] -homepage: "https://github.com/mirage/ocaml-dns" -doc: "https://mirage.github.io/ocaml-dns/" -dev-repo: "git+https://github.com/mirage/ocaml-dns.git" -bug-reports: "https://github.com/mirage/ocaml-dns/issues" -license: "BSD2" - -depends: [ - "dune" {build & >= "1.2.0"} - "ocaml" {>= "4.07.0"} - "dns" {= version} - "dns-mirage" {= version} - "dns-server" {= version} - "mirage-time-lwt" - "mirage-clock-lwt" {>= "2.0.0"} - "lwt" - "randomconv" - "duration" - "mirage-stack-lwt" -] - -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] - -synopsis: "Primary and secondary DNS server for MirageOS using uDNS" -description: """ -Convenience functions for registering TCP and UDP listeners acting as primary -or seconday DNS server. -""" diff --git a/dns-mirage.opam b/dns-mirage.opam index 531f31315..91681ae99 100644 --- a/dns-mirage.opam +++ b/dns-mirage.opam @@ -11,9 +11,9 @@ depends: [ "dune" {build & >= "1.2.0"} "ocaml" {>= "4.07.0"} "dns" {= version} - "ipaddr" - "lwt" - "mirage-stack-lwt" + "ipaddr" {>= "4.0.0"} + "lwt" {>= "4.2.1"} + "mirage-stack-lwt" {>= "1.4.0"} ] build: [ diff --git a/dns-resolver.opam b/dns-resolver.opam index c89b7b81c..30631c1f0 100644 --- a/dns-resolver.opam +++ b/dns-resolver.opam @@ -12,9 +12,15 @@ depends: [ "ocaml" {>= "4.07.0"} "dns" {= version} "dns-server" {= version} + "dns-mirage" {= version} "lru" {>= "0.3.0"} - "duration" - "randomconv" + "duration" {>= "0.1.2"} + "randomconv" {>= "0.1.2"} + "lwt" {>= "4.2.1"} + "mirage-time-lwt" {>= "1.3.0"} + "mirage-clock-lwt" {>= "2.0.0"} + "mirage-random" {>= "1.2.0"} + "mirage-stack-lwt" {>= "1.4.0"} "alcotest" {with-test} ] diff --git a/dns-server.opam b/dns-server.opam index 08c5ab7a2..95df6ac4b 100644 --- a/dns-server.opam +++ b/dns-server.opam @@ -11,10 +11,15 @@ depends: [ "dune" {build & >= "1.2.0"} "ocaml" {>= "4.07.0"} "dns" {= version} - "randomconv" - "duration" - "alcotest" {with-test} + "dns-mirage" {= version} + "randomconv" {>= "0.1.2"} + "duration" {>= "0.1.2"} + "lwt" {>= "4.2.1"} + "mirage-time-lwt" {>= "1.3.0"} + "mirage-clock-lwt" {>= "2.0.0"} + "mirage-stack-lwt" {>= "1.4.0"} "nocrypto" {with-test} + "alcotest" {with-test} "dns-tsig" {with-test} ] diff --git a/dns-tsig.opam b/dns-tsig.opam index 2b8957290..c570001f9 100644 --- a/dns-tsig.opam +++ b/dns-tsig.opam @@ -11,7 +11,7 @@ depends: [ "dune" {build & > "1.2.0"} "ocaml" {>= "4.07.0"} "dns" {= version} - "nocrypto" + "nocrypto" {>= "0.5.4"} "alcotest" {with-test} ] diff --git a/dns-zone.opam b/dns-zone.opam deleted file mode 100644 index 40ba39898..000000000 --- a/dns-zone.opam +++ /dev/null @@ -1,25 +0,0 @@ -opam-version: "2.0" -maintainer: "team AT robur dot io" -authors: ["Hannes Mehnert "] -homepage: "https://github.com/mirage/ocaml-dns" -doc: "https://mirage.github.io/ocaml-dns/" -dev-repo: "git+https://github.com/mirage/ocaml-dns.git" -bug-reports: "https://github.com/mirage/ocaml-dns/issues" -license: "BSD2" - -depends: [ - "dune" {build & >= "1.2.0"} - "ocaml" {>= "4.07.0"} - "dns" {= version} -] - -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] - -synopsis: "Zonefile parser for uDNS" -description: """ -An ocamllex and ocamlyacc based zonefile parser to be used with udns. -""" diff --git a/lwt/client/dune b/lwt/client/dune index 230f4924e..3d0a4b5fa 100644 --- a/lwt/client/dune +++ b/lwt/client/dune @@ -1,6 +1,6 @@ (library (name dns_client_lwt) (modules dns_client_lwt) - (public_name dns-client-lwt) + (public_name dns-client.lwt) (libraries lwt lwt.unix dns dns-client) (wrapped false)) diff --git a/mirage/certify/dns_mirage_certify.ml b/mirage/certify/dns_certify_mirage.ml similarity index 99% rename from mirage/certify/dns_mirage_certify.ml rename to mirage/certify/dns_certify_mirage.ml index f7ebe33a3..e76984cd0 100644 --- a/mirage/certify/dns_mirage_certify.ml +++ b/mirage/certify/dns_certify_mirage.ml @@ -2,7 +2,7 @@ open Lwt.Infix -let src = Logs.Src.create "dns_mirage_resolver" ~doc:"effectful DNS certify" +let src = Logs.Src.create "dns_certify_mirage" ~doc:"effectful DNS certify" module Log = (val Logs.src_log src : Logs.LOG) module Make (R : Mirage_random.C) (P : Mirage_clock_lwt.PCLOCK) (TIME : Mirage_time_lwt.S) (S : Mirage_stack_lwt.V4) = struct diff --git a/mirage/certify/dns_mirage_certify.mli b/mirage/certify/dns_certify_mirage.mli similarity index 100% rename from mirage/certify/dns_mirage_certify.mli rename to mirage/certify/dns_certify_mirage.mli diff --git a/mirage/certify/dune b/mirage/certify/dune index 573e1351a..2783976aa 100644 --- a/mirage/certify/dune +++ b/mirage/certify/dune @@ -1,6 +1,5 @@ (library - (name dns_mirage_certify) - (synopsis "A Domain Name system (DNS) library, MirageOS let's encrypt integration") - (public_name dns-mirage-certify) + (name dns_certify_mirage) + (public_name dns-certify.mirage) (wrapped false) (libraries dns dns-mirage dns-certify tls lwt duration mirage-random mirage-time-lwt mirage-clock-lwt mirage-stack-lwt)) diff --git a/mirage/client/dns_mirage_client.ml b/mirage/client/dns_client_mirage.ml similarity index 95% rename from mirage/client/dns_mirage_client.ml rename to mirage/client/dns_client_mirage.ml index 47d1ec9a6..237d28ee3 100644 --- a/mirage/client/dns_mirage_client.ml +++ b/mirage/client/dns_client_mirage.ml @@ -1,6 +1,6 @@ open Lwt.Infix -let src = Logs.Src.create "dns_mirage_client" ~doc:"effectful DNS client layer" +let src = Logs.Src.create "dns_client_mirage" ~doc:"effectful DNS client layer" module Log = (val Logs.src_log src : Logs.LOG) module Make (R : Mirage_random.C) (S : Mirage_stack_lwt.V4) = struct @@ -72,7 +72,7 @@ let config : 'a Mirage.impl = method ty : 'a typ = Type Dns_client method! packages : package list value = (Key.match_ Key.(value target) @@ begin function - | `Unix -> [package "dns-client-unix"] + | `Unix -> [package "dns-client.unix"] | _ -> [] end ) diff --git a/mirage/client/dns_mirage_client.mli b/mirage/client/dns_client_mirage.mli similarity index 100% rename from mirage/client/dns_mirage_client.mli rename to mirage/client/dns_client_mirage.mli diff --git a/mirage/client/dune b/mirage/client/dune index 62c7a6dc5..c5fa6b979 100644 --- a/mirage/client/dune +++ b/mirage/client/dune @@ -1,6 +1,5 @@ (library - (name dns_mirage_client) - (public_name dns-mirage-client) + (name dns_client_mirage) + (public_name dns-client.mirage) (libraries domain-name ipaddr mirage-random mirage-stack-lwt dns-client) - (wrapped false) -) \ No newline at end of file + (wrapped false)) diff --git a/mirage/dune b/mirage/dune index 73e2a8d05..2c132570f 100644 --- a/mirage/dune +++ b/mirage/dune @@ -1,6 +1,5 @@ (library (name dns_mirage) - (synopsis "A Domain Name system (DNS) library, MirageOS integration") (public_name dns-mirage) (wrapped false) (libraries dns mirage-stack-lwt ipaddr lwt)) diff --git a/mirage/resolver/dns_mirage_resolver.ml b/mirage/resolver/dns_resolver_mirage.ml similarity index 98% rename from mirage/resolver/dns_mirage_resolver.ml rename to mirage/resolver/dns_resolver_mirage.ml index 03119ce53..d61b4b8b9 100644 --- a/mirage/resolver/dns_mirage_resolver.ml +++ b/mirage/resolver/dns_resolver_mirage.ml @@ -2,7 +2,7 @@ open Lwt.Infix -let src = Logs.Src.create "dns_mirage_resolver" ~doc:"effectful DNS resolver" +let src = Logs.Src.create "dns_resolver_mirage" ~doc:"effectful DNS resolver" module Log = (val Logs.src_log src : Logs.LOG) module Make (R : Mirage_random.C) (P : Mirage_clock_lwt.PCLOCK) (M : Mirage_clock_lwt.MCLOCK) (TIME : Mirage_time_lwt.S) (S : Mirage_stack_lwt.V4) = struct diff --git a/mirage/resolver/dns_mirage_resolver.mli b/mirage/resolver/dns_resolver_mirage.mli similarity index 100% rename from mirage/resolver/dns_mirage_resolver.mli rename to mirage/resolver/dns_resolver_mirage.mli diff --git a/mirage/resolver/dune b/mirage/resolver/dune index 57b1cd06a..7220f22eb 100644 --- a/mirage/resolver/dune +++ b/mirage/resolver/dune @@ -1,6 +1,5 @@ (library - (name dns_mirage_resolver) - (synopsis "A Domain Name system (DNS) library, MirageOS resolver integration") - (public_name dns-mirage-resolver) + (name dns_resolver_mirage) + (public_name dns-resolver.mirage) (wrapped false) (libraries dns dns-resolver dns-server dns-mirage lwt duration mirage-time-lwt mirage-clock-lwt mirage-stack-lwt mirage-random)) diff --git a/mirage/server/dns_mirage_server.ml b/mirage/server/dns_server_mirage.ml similarity index 99% rename from mirage/server/dns_mirage_server.ml rename to mirage/server/dns_server_mirage.ml index 4b517e938..8ddc7f3c0 100644 --- a/mirage/server/dns_mirage_server.ml +++ b/mirage/server/dns_server_mirage.ml @@ -2,7 +2,7 @@ open Lwt.Infix -let src = Logs.Src.create "dns_mirage_server" ~doc:"effectful DNS server" +let src = Logs.Src.create "dns_server_mirage" ~doc:"effectful DNS server" module Log = (val Logs.src_log src : Logs.LOG) module Make (P : Mirage_clock_lwt.PCLOCK) (M : Mirage_clock_lwt.MCLOCK) (TIME : Mirage_time_lwt.S) (S : Mirage_stack_lwt.V4) = struct diff --git a/mirage/server/dns_mirage_server.mli b/mirage/server/dns_server_mirage.mli similarity index 100% rename from mirage/server/dns_mirage_server.mli rename to mirage/server/dns_server_mirage.mli diff --git a/mirage/server/dune b/mirage/server/dune index ba61dfc8b..0c0c35452 100644 --- a/mirage/server/dune +++ b/mirage/server/dune @@ -1,6 +1,5 @@ (library - (name dns_mirage_server) - (synopsis "A Domain Name system (DNS) library, MirageOS server integration") - (public_name dns-mirage-server) + (name dns_server_mirage) + (public_name dns-server.mirage) (wrapped false) (libraries dns dns-server dns-mirage lwt duration randomconv mirage-time-lwt mirage-clock-lwt mirage-stack-lwt)) diff --git a/resolver/dune b/resolver/dune index cb082595e..bc0ade303 100644 --- a/resolver/dune +++ b/resolver/dune @@ -1,6 +1,5 @@ (library (name dns_resolver) - (synopsis "A tiny Domain Name system (DNS) library, resolver part") (public_name dns-resolver) (wrapped false) (libraries dns dns-server lru duration randomconv)) diff --git a/server/dune b/server/dune index 64f55085f..6a4cbf557 100644 --- a/server/dune +++ b/server/dune @@ -1,6 +1,5 @@ (library (name dns_server) - (synopsis "A Domain Name system (DNS) server library") (public_name dns-server) (wrapped false) (libraries dns randomconv duration)) diff --git a/src/dns.mli b/src/dns.mli index 6a3e9003a..474cdcc5a 100644 --- a/src/dns.mli +++ b/src/dns.mli @@ -62,14 +62,14 @@ needs to be called from a side-effecting layer. For the client library, several side-effecting layers are implemented: - [dns-client-unix] uses the blocking [Unix] API (distributed with the OCaml - runtime), [dns-client-lwt] uses the non-blocking [Lwt] API, and - [dns-mirage-client] using MirageOS interfaces. Unix command line utilities + [dns-client.unix] uses the blocking [Unix] API (distributed with the OCaml + runtime), [dns-client.lwt] uses the non-blocking [Lwt] API, and + [dns-client.mirage] using MirageOS interfaces. Unix command line utilities are provided in the [dns-cli] package. For the server and resolver components, side-effecting implementations - using MirageOS interfaces are provided in [dns-mirage-server] and - [dns-mirage-resolver]. + using MirageOS interfaces are provided in [dns-server.mirage] and + [dns-resolver.mirage]. {{:https://github.com/roburio/unikernels}Example unikernels} are provided externally, including authoritative primary and secondary servers, recursive and stub resolvers. The certificate authority diff --git a/src/dune b/src/dune index 9c5ad0b26..8feeaa249 100644 --- a/src/dune +++ b/src/dune @@ -1,6 +1,5 @@ (library (name dns) - (synopsis "A tiny Domain Name system (DNS) library") (public_name dns) (wrapped false) (libraries rresult cstruct astring fmt ipaddr logs ptime gmap domain-name) diff --git a/tsig/dune b/tsig/dune index 3d04f37cb..91b068d98 100644 --- a/tsig/dune +++ b/tsig/dune @@ -1,6 +1,5 @@ (library (name dns_tsig) - (synopsis "A Domain Name system (DNS) library, TSIG (HMAC) part") (public_name dns-tsig) (wrapped false) (libraries dns nocrypto)) diff --git a/unix/client/dune b/unix/client/dune index 2bf7d29f9..3512ad8bb 100644 --- a/unix/client/dune +++ b/unix/client/dune @@ -1,15 +1,13 @@ (library (name dns_client_unix) (modules dns_client_unix) - (public_name dns-client-unix) + (public_name dns-client.unix) (libraries domain-name ipaddr dns-client rresult unix) - (wrapped false) -) + (wrapped false)) (executable (name ohost) (modules ohost) - (package dns-client-unix) - (public_name dns-client-unix) - (libraries fmt dns-client-unix) -) + (package dns-client) + (public_name dns-client.unix) + (libraries fmt dns-client.unix)) diff --git a/zone/dune b/zone/dune index 1e4fcfce3..3a0bfdc49 100644 --- a/zone/dune +++ b/zone/dune @@ -1,7 +1,6 @@ (library (name dns_zone) - (synopsis "A tiny Domain Name system (DNS) library, zone format parser") - (public_name dns-zone) + (public_name dns-server.zone) (private_modules dns_zone_state dns_zone_parser dns_zone_lexer) (libraries dns) (wrapped false))