Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding dns_server_mirage #55

Merged
merged 1 commit into from
Feb 19, 2015
Merged

Conversation

heidihoward
Copy link
Contributor

This PR adds dns_server_mirage, its interface is as consistent as possible with https://github.com/mirage/ocaml-dns/blob/master/lwt/dns_server_unix.ml.

Feedback welcome

Now writing your own DNS server for mirage is as simple as:

open Lwt
open V1_LWT
open Printf
open Dns
open Dns_server

let port = 53
let zonefile = "test.zone"

module Main (C:CONSOLE) (K:KV_RO) (S:STACKV4) = struct

  module U = S.UDPV4
  module DNS = Dns_server_mirage.Make(K)(S)

  let start c k s =
    let t = DNS.create s k in
    DNS.serve_with_zonefile t ~port ~zonefile
end

@avsm
Copy link
Member

avsm commented Feb 19, 2015

nice!

On 19 Feb 2015, at 17:27, Heidi-ann notifications@github.com wrote:

This PR adds dns_server_mirage, its interface is as consistent as possible with https://github.com/mirage/ocaml-dns/blob/master/lwt/dns_server_unix.ml https://github.com/mirage/ocaml-dns/blob/master/lwt/dns_server_unix.ml.

Feedback welcome

Now writing your own DNS server for mirage is as simple as:

open Lwt
open V1_LWT
open Printf
open Dns
open Dns_server

let port = 53
let zonefile = "test.zone"

module Main (C:CONSOLE) (K:KV_RO) (S:STACKV4) = struct

module U = S.UDPV4
module DNS = Dns_server_mirage.Make(K)(S)

let start c k s =
let t = DNS.create s k in
DNS.serve_with_zonefile t ~port ~zonefile
end
You can view, comment on, or merge this pull request online at:

#55 #55
Commit Summary

adding dns_server_mirage
File Changes

M _oasis https://github.com/mirage/ocaml-dns/pull/55/files#diff-0 (2)
M mirage/dns-lwt-mirage.mldylib https://github.com/mirage/ocaml-dns/pull/55/files#diff-1 (3)
M mirage/dns-lwt-mirage.mllib https://github.com/mirage/ocaml-dns/pull/55/files#diff-2 (3)
A mirage/dns_server_mirage.ml https://github.com/mirage/ocaml-dns/pull/55/files#diff-3 (90)
A mirage/dns_server_mirage.mli https://github.com/mirage/ocaml-dns/pull/55/files#diff-4 (42)
M setup.ml https://github.com/mirage/ocaml-dns/pull/55/files#diff-5 (9)
Patch Links:

https://github.com/mirage/ocaml-dns/pull/55.patch https://github.com/mirage/ocaml-dns/pull/55.patch
https://github.com/mirage/ocaml-dns/pull/55.diff https://github.com/mirage/ocaml-dns/pull/55.diff

Reply to this email directly or view it on GitHub #55.

dsheets added a commit that referenced this pull request Feb 19, 2015
@dsheets dsheets merged commit 7fbdc20 into mirage:master Feb 19, 2015
@heidihoward heidihoward deleted the mirage-server branch February 19, 2015 20:52
RyanGibb pushed a commit to RyanGibb/ocaml-dns that referenced this pull request Sep 26, 2022
Add git version of Ctypes.0.4.0
RyanGibb pushed a commit to RyanGibb/ocaml-dns that referenced this pull request Sep 26, 2022
refresh to latest tls releases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants