Skip to content

Commit

Permalink
switch to crunch versions and update
Browse files Browse the repository at this point in the history
  • Loading branch information
avsm committed Apr 18, 2012
1 parent f7a7e35 commit 9bd4ede
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Expand Up @@ -12,8 +12,7 @@ dns/minios-*
dns/data/output-*
dns/data/result-*
dns/data/input
dns/app/server*.ml
dns/app/deens*.mir
dns/app/_build
dns/dns-perf.pdf
_build/
.fuse_hidden*
Expand Down
2 changes: 2 additions & 0 deletions dns/app/crunchDNS.mir
@@ -0,0 +1,2 @@
ServerDNS.main
Datax
2 changes: 0 additions & 2 deletions dns/app/deensOpenmirage.mir

This file was deleted.

9 changes: 8 additions & 1 deletion dns/app/serverOpenmirage.ml → dns/app/serverDNS.ml
Expand Up @@ -42,10 +42,17 @@ let main () =

let main () =
Net.Manager.create (fun mgr interface id ->
let ip = Net.Nettypes.(
(ipv4_addr_of_tuple (10l,0l,0l,2l),
ipv4_addr_of_tuple (255l,255l,255l,0l),
[ipv4_addr_of_tuple (10l,0l,0l,1l)]
)) in
lwt () = Net.Manager.configure interface (`IPv4 ip) in

let src = None, port in
let zonefile = "zones.db" in
lwt zb = get_file zonefile in
match zb with
|None -> fail (Failure "no zone")
|Some zb -> Dns.Server.listen zb mgr src
|Some zonebuf -> Dns.Server.listen ~mode:`none ~zonebuf mgr src
)

0 comments on commit 9bd4ede

Please sign in to comment.