Skip to content

heidihoward/ocaml-dns-examples

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

simple examples using ocaml-dns

This is the demo code for a step-by-step guide to setting up your own DNS resolver using MirageOS on Xen/ARM (though the code should work for Xen/x86 and Unix backends too). The tutorial is online:

Part 1

  • 1.1: setting up Xen ARM
  • 1.2: how use gethostbyname in ocaml-dns to get the IP corresponding to a hardcoded IP. (code in gethostbyname/)
  • 1.3: adding use of bootvars to part 1.2 (code in gethostbyname_bootvars/)
  • 1.4: how to use resolve in ocaml-dns to get the IP corresponding to a hardcoded IP like a simple version of dig (code in basic_dig/)

Part 2

  • 2.1: a simple DNS server, which responses to requests for zones in the zone file (code in simple_server/)

Part 3

  • 3.1: a simple DNS forwarding resolve, given a DNS query resolve recusively by asking another DNS server (code in forwarder/)
  • 3.2: combined DNS server, if zone is in zone file when use simple dns server (2.1), otherwise ask another DNS server (3.1) (code in forwarder_server/)

Part 4 - work in progress

About

introduction to ocaml-dns for MirageOS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published