Genode Packages collection https://git.sr.ht/~ehmry/genodepkgs/
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

73 行
2.3 KiB

let Genode = env:DHALL_GENODE
let Init = Genode.Init
let Child = Init.Child
let Res = Init.Resources
let ServiceRoute = Init.ServiceRoute
let init =
Init::{
, routes =
[ Genode.Init.ServiceRoute.parent "Timer"
, Genode.Init.ServiceRoute.child "Nic" "bridge"
]
, children = toMap
{ nic =
Child.flat
Child.Attributes::{
, binary = "nic_loopback"
, provides = [ "Nic" ]
}
, bridge =
Child.flat
Child.Attributes::{
, binary = "nic_bridge"
, resources = Res::{ caps = 200, ram = Genode.units.MiB 6 }
, provides = [ "Nic" ]
, routes = [ ServiceRoute.child "Nic" "nic" ]
, config = Init.Config::{
, attributes = toMap { mac = "02:02:02:02:03:00" }
, policies =
[ Init.Config.Policy::{
, attributes = toMap { ip_addr = "10.0.0.2" }
, label =
Init.LabelSelector.Type.Partial
{ prefix = Some "solo5", suffix = None Text }
}
]
, defaultPolicy = Some Init.Config.DefaultPolicy::{=}
}
}
, solo5 =
Child.flat
Child.Attributes::{
, binary = "solo5-test_net"
, resources = Res::{ caps = 256, ram = Genode.units.MiB 3 }
, config = Init.Config::{
, content =
[ Genode.Prelude.XML.text "<cmdline>limit</cmdline>" ]
}
}
, ping =
Child.flat
Child.Attributes::{
, binary = "ping"
, exitPropagate = True
, resources = Res::{ caps = 128, ram = Genode.units.MiB 6 }
, config = Init.Config::{
, attributes = toMap
{ interface = "10.0.0.72/24"
, dst_ip = "10.0.0.2"
, period_sec = "1"
, verbose = "no"
}
}
}
}
}
in Init.toChild init Init.Attributes.default