123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143(*
* Copyright (c) 2023 Thomas Gazagnaire <thomas@gazagnaire.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*)openFunctoriaincludeRuntime_arg(** {2 OCaml runtime} *)letruntime_arg~posname=Runtime_arg.create~pos~packages:[package"mirage-runtime"](Fmt.str"Mirage_runtime.%s"name)letruntime_network_key~posfmt=Fmt.kstr(Runtime_arg.create~pos~packages:[package"mirage-runtime"~sublibs:["network"]])("Mirage_runtime_network."^^fmt)letdelay=runtime_arg~pos:__POS__"delay"letbacktrace=runtime_arg~pos:__POS__"backtrace"letrandomize_hashtables=runtime_arg~pos:__POS__"randomize_hashtables"letallocation_policy=runtime_arg~pos:__POS__"allocation_policy"letminor_heap_size=runtime_arg~pos:__POS__"minor_heap_size"letmajor_heap_increment=runtime_arg~pos:__POS__"major_heap_increment"letspace_overhead=runtime_arg~pos:__POS__"space_overhead"letmax_space_overhead=runtime_arg~pos:__POS__"max_space_overhead"letgc_verbosity=runtime_arg~pos:__POS__"gc_verbosity"letgc_window_size=runtime_arg~pos:__POS__"gc_window_size"letcustom_major_ratio=runtime_arg~pos:__POS__"custom_major_ratio"letcustom_minor_ratio=runtime_arg~pos:__POS__"custom_minor_ratio"letcustom_minor_max_size=runtime_arg~pos:__POS__"custom_minor_max_size"letpp_groupppf=function|None|Some""->()|Someg->Fmt.pfppf"~group:%S "gletpp_docsppf=function|None|Some""->()|Someg->Fmt.pfppf"~docs:%S "gletpp_optionppppf=function|None->Fmt.pfppf"None"|Somed->Fmt.pfppf"(Some %a)"ppdletescapeppppf=Fmt.kstr(funstr->Fmt.Dump.stringppfstr)"%a"pp(** {3 Network keys} *)letinterface?group?docsdefault=runtime_network_key~pos:__POS__"interface %a%a%S"pp_groupgrouppp_docsdocsdefaultmoduleV4=structopenIpaddr.V4letpp_prefixppfp=Fmt.pfppf"(Ipaddr.V4.Prefix.of_string_exn %a)"(escapePrefix.pp)pletppppfp=Fmt.pfppf"(Ipaddr.V4.of_string_exn %a)"(escapepp)pletnetwork?group?docsdefault=runtime_network_key~pos:__POS__"V4.network %a%a%a"pp_groupgrouppp_docsdocspp_prefixdefaultletgateway?group?docsdefault=runtime_network_key~pos:__POS__"V4.gateway %a%a%a"pp_groupgrouppp_docsdocs(pp_optionpp)defaultendmoduleV6=structopenIpaddr.V6letpp_prefixppfp=Fmt.pfppf"(Ipaddr.V6.Prefix.of_string_exn %a)"(escapePrefix.pp)pletppppfp=Fmt.pfppf"(Ipaddr.V6.of_string_exn %a)"(escapepp)pletnetwork?group?docsdefault=runtime_network_key~pos:__POS__"V6.network %a%a%a"pp_groupgrouppp_docsdocs(pp_optionpp_prefix)defaultletgateway?group?docsdefault=runtime_network_key~pos:__POS__"V6.gateway %a%a%a"pp_groupgrouppp_docsdocs(pp_optionpp)defaultletaccept_router_advertisements?group?docs()=runtime_network_key~pos:__POS__"V6.accept_router_advertisements %a%a()"pp_groupgrouppp_docsdocsendletipv4_only?group?docs()=runtime_network_key~pos:__POS__"ipv4_only %a%a()"pp_groupgrouppp_docsdocsletipv6_only?group?docs()=runtime_network_key~pos:__POS__"ipv6_only %a%a()"pp_groupgrouppp_docsdocsletresolver?group?docs?(default=[])()=letpp_defaultppf=function|[]->()|l->Fmt.pfppf"~default:%a "Fmt.Dump.(liststring)linruntime_network_key~pos:__POS__"resolver %a%a%a()"pp_groupgrouppp_docsdocspp_defaultdefaultletpp_ipaddr?group?docsppfp=Fmt.pfppf"Ipaddr.of_string %a%a%a"pp_groupgrouppp_docsdocs(escapeIpaddr.pp)pletsyslog?group?docsdefault=runtime_network_key~pos:__POS__"syslog %a%a%a"pp_groupgrouppp_docsdocs(pp_optionpp_ipaddr)defaultletmonitor?group?docsdefault=runtime_network_key~pos:__POS__"monitor %a%a%a"pp_groupgrouppp_docsdocs(pp_optionpp_ipaddr)defaultletsyslog_port?group?docsdefault=runtime_network_key~pos:__POS__"syslog_port %a%a%a"pp_groupgrouppp_docsdocs(pp_optionFmt.int)defaultletsyslog_hostname?group?docsdefault=runtime_network_key~pos:__POS__"syslog_hostname %a%a%S"pp_groupgrouppp_docsdocsdefaulttypelog_threshold=[`All|`Srcofstring]*Logs.leveloptionletlogs=runtime_arg~pos:__POS__"logs"