Genode Packages collection https://git.sr.ht/~ehmry/genodepkgs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

net.dhall 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. let Genode = env:DHALL_GENODE
  2. let Init = Genode.Init
  3. let Child = Init.Child
  4. let Res = Init.Resources
  5. let ServiceRoute = Init.ServiceRoute
  6. let init =
  7. Init::{
  8. , routes =
  9. [ Genode.Init.ServiceRoute.parent "Timer"
  10. , Genode.Init.ServiceRoute.child "Nic" "bridge"
  11. ]
  12. , children = toMap
  13. { nic =
  14. Child.flat
  15. Child.Attributes::{
  16. , binary = "nic_loopback"
  17. , provides = [ "Nic" ]
  18. }
  19. , bridge =
  20. Child.flat
  21. Child.Attributes::{
  22. , binary = "nic_bridge"
  23. , resources = Res::{ caps = 200, ram = Genode.units.MiB 6 }
  24. , provides = [ "Nic" ]
  25. , routes = [ ServiceRoute.child "Nic" "nic" ]
  26. , config = Init.Config::{
  27. , attributes = toMap { mac = "02:02:02:02:03:00" }
  28. , policies =
  29. [ Init.Config.Policy::{
  30. , attributes = toMap { ip_addr = "10.0.0.2" }
  31. , label =
  32. Init.LabelSelector.Type.Partial
  33. { prefix = Some "solo5", suffix = None Text }
  34. }
  35. ]
  36. , defaultPolicy = Some Init.Config.DefaultPolicy::{=}
  37. }
  38. }
  39. , solo5 =
  40. Child.flat
  41. Child.Attributes::{
  42. , binary = "solo5-test_net"
  43. , resources = Res::{ caps = 256, ram = Genode.units.MiB 3 }
  44. , config = Init.Config::{
  45. , content =
  46. [ Genode.Prelude.XML.text "<cmdline>limit</cmdline>" ]
  47. }
  48. }
  49. , ping =
  50. Child.flat
  51. Child.Attributes::{
  52. , binary = "ping"
  53. , exitPropagate = True
  54. , resources = Res::{ caps = 128, ram = Genode.units.MiB 6 }
  55. , config = Init.Config::{
  56. , attributes = toMap
  57. { interface = "10.0.0.72/24"
  58. , dst_ip = "10.0.0.2"
  59. , period_sec = "1"
  60. , verbose = "no"
  61. }
  62. }
  63. }
  64. }
  65. }
  66. in Init.toChild init Init.Attributes.default