package mnet-dhcp

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Mnet_dhcp.Or_staticSource

Sourcetype _ kind =
  1. | Dhcp : {
    1. timeout : int option;
    2. config : config;
    } -> (t * Mnet.TCP.state * Mnet.UDP.state * lease) kind
    (*

    Dhcp { timeout; config } is a witness for a stack.

    *)
  2. | Static : {
    1. ipv4addr : Ipaddr.V4.Prefix.t;
    2. gateway : Ipaddr.V4.t option;
    } -> (Mnet.stack * Mnet.TCP.state * Mnet.UDP.state) kind
    (*

    Static { ipv4addr; gateway } is a witness for a Mnet.stack with ipv4 configuration

    *)

'dhcp_or_static w is a type witness for either a static Mnet.stack or a DHCP stack.

Sourcetype stack =
  1. | Stack : _ kind -> stack
    (*

    Any witness is an existential holding a witness

    *)
Sourceval dhcp : ?timeout:int -> config -> (t * Mnet.TCP.state * Mnet.UDP.state * lease) kind
Sourceval stack : ?ipv6:IPv6.mode -> ?max:int option -> name:string -> 'dyn kind -> 'dyn Mkernel.arg

stack ?ipv6 ?max ~name witness is either a static Mnet.stack or a DHCP stack.

Sourceval kill : 'dyn kind -> 'dyn -> unit

kill witness dev calls either Mnet.kill or kill.

Sourceval tcp : 'dyn kind -> 'dyn -> Mnet.TCP.state
Sourceval udp : 'dyn kind -> 'dyn -> Mnet.UDP.state
Sourceval lease : 'dyn kind -> 'dyn -> lease option