2
0
Fork 0
genodepkgs/tests/solo5/net_2if.dhall

86 lines
2.9 KiB
Plaintext

-- SPDX-License-Identifier: CC0-1.0
let Genode = env:DHALL_GENODE
let Init = Genode.Init
let Child = Init.Child
let Res = Init.Resources
let init =
Init::{
, 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 8 }
, provides = [ "Nic" ]
, routes = [ Genode.Init.ServiceRoute.child "Nic" "nic" ]
, config = Init.Config::{
, content =
[ Genode.Prelude.XML.text
''
<policy label="solo5 -> service0" ip_addr="10.0.0.2"/>
<policy label="solo5 -> service1" ip_addr="10.1.0.2"/>
<default-policy/>
''
]
}
}
, solo5 =
Child.flat
Child.Attributes::{
, binary = "solo5-test_net_2if"
, resources = Res::{ caps = 256, ram = Genode.units.MiB 5 }
, routes =
[ Genode.Init.ServiceRoute.parent "Timer"
, Genode.Init.ServiceRoute.child "Nic" "bridge"
]
, config = Init.Config::{
, content =
[ Genode.Prelude.XML.text
''
"<cmdline>limit</cmdline>"
''
]
}
}
, clients =
Child.flat
Child.Attributes::{
, binary = "sequence"
, exitPropagate = True
, resources = Res::{ caps = 256, ram = Genode.units.MiB 8 }
, routes =
[ Genode.Init.ServiceRoute.parent "Timer"
, Genode.Init.ServiceRoute.child "Nic" "bridge"
]
, config = Init.Config::{
, content =
[ Genode.Prelude.XML.text
''
<start name="ping0">
<binary name="ping"/>
<config interface="10.0.0.72/24" dst_ip="10.0.0.2" period_sec="1" count="4"/>
</start>
<start name="ping1">
<binary name="ping"/>
<config interface="10.1.0.72/24" dst_ip="10.1.0.2" period_sec="1" count="4"/>
</start>
''
]
}
}
}
}
in Init.toChild init Init.Attributes.default