package mnet-dns

  1. Overview
  2. Docs
An implementation of DNS in OCaml for Miou & Solo5

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mnet-0.0.8.tbz
sha256=07233e57f836eadd9566dbc2c7e81a0da058c52c40e8cf38eb9b2f178a9fa537
sha512=e190d793c9950a85e3fc8865f26a222c2763ad8f2c2972cfb5fe10926f2ecc39d75b4f970065cafa9526c4d1edb8b3574dd4b37893fca6de144fe7ced4a23bb0

Description

Added to opam-repository:

README

mnet, a pure OCaml TCP/IP stack for unikernels

mnet is a library that implements certain network layers to provide a TCP/IP stack for an application using utcp. The project essentially requires the reading and writing of Ethernet frames, which is provided by Solo5 and mkernel.

This library implements:

  • an IPv4 layer (with ARP)
  • an IPv6 layer
  • an ICMP layer
  • the DNS protocol using mnet-dns
  • the TLS protocol using mnet-tls
  • the SSH protocol using mnet-ssh
  • a DHCP layer using mnet-dhcp

The aim is to provide a ready-to-use TCP/IP stack implemented entirely in OCaml. Here is an example of how to initialise a TCP/IP stack that configures itself automatically based on an available DHCP server.

let ( let@ ) finally fn = Fun.protect ~finally fn
module RNG = Mirage_crypto_rng.Fortuna

let rng () = Mirage_crypto_rng_mkernel.initialize (module RNG)
let rng = Mkernel.map rng Mkernel.[]
let cfg = Mnet_dhcp.accept_all

let () =
  Mkernel.(run [ rng; Mnet_dhcp.stack ~name:"service" cfg ])
  @@ fun rng (stack, tcp, udp, lease) () ->
  let@ () = fun () -> Mnet_dhcp.kill stack in
  let@ () = fun () -> Mirage_crypto_rng_mkernel.kill rng in
  ...

mnet is a replacement for mirage-tcpip, designed to take advantage of effects and our Miou scheduler.

Dependencies (11)

  1. cmdliner
  2. ca-certs-nss >= "3.126"
  3. tls
  4. dns-client
  5. dns
  6. mnet-happy-eyeballs = version
  7. mnet-tls = version
  8. mnet = version
  9. dune >= "2.7.0"
  10. utcp
  11. ocaml >= "5.0.0"

Dev Dependencies

None

Used by

None

Conflicts

None