net: allocate space for 2 sockets, needed for dhcp.

This commit is contained in:
Dario Nieuwenhuis 2023-01-19 14:40:58 +01:00
parent 570ffab670
commit fe15a7beee
8 changed files with 8 additions and 8 deletions

View File

@ -115,7 +115,7 @@ async fn main(spawner: Spawner) {
let seed = u64::from_le_bytes(seed); let seed = u64::from_le_bytes(seed);
// Init network stack // Init network stack
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed)); let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
unwrap!(spawner.spawn(net_task(stack))); unwrap!(spawner.spawn(net_task(stack)));

View File

@ -103,7 +103,7 @@ async fn main(spawner: Spawner) {
let seed = 1234; // guaranteed random, chosen by a fair dice roll let seed = 1234; // guaranteed random, chosen by a fair dice roll
// Init network stack // Init network stack
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed)); let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
unwrap!(spawner.spawn(net_task(stack))); unwrap!(spawner.spawn(net_task(stack)));

View File

@ -65,7 +65,7 @@ async fn main_task(spawner: Spawner) {
let seed = u64::from_le_bytes(seed); let seed = u64::from_le_bytes(seed);
// Init network stack // Init network stack
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed)); let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
// Launch network task // Launch network task
spawner.spawn(net_task(stack)).unwrap(); spawner.spawn(net_task(stack)).unwrap();

View File

@ -62,7 +62,7 @@ async fn main_task(spawner: Spawner) {
let seed = u64::from_le_bytes(seed); let seed = u64::from_le_bytes(seed);
// Init network stack // Init network stack
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed)); let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
// Launch network task // Launch network task
spawner.spawn(net_task(stack)).unwrap(); spawner.spawn(net_task(stack)).unwrap();

View File

@ -77,7 +77,7 @@ async fn main(spawner: Spawner) -> ! {
//}); //});
// Init network stack // Init network stack
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed)); let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
// Launch network task // Launch network task
unwrap!(spawner.spawn(net_task(&stack))); unwrap!(spawner.spawn(net_task(&stack)));

View File

@ -78,7 +78,7 @@ async fn main(spawner: Spawner) -> ! {
//}); //});
// Init network stack // Init network stack
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed)); let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
// Launch network task // Launch network task
unwrap!(spawner.spawn(net_task(&stack))); unwrap!(spawner.spawn(net_task(&stack)));

View File

@ -79,7 +79,7 @@ async fn main(spawner: Spawner) -> ! {
//}); //});
// Init network stack // Init network stack
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed)); let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
// Launch network task // Launch network task
unwrap!(spawner.spawn(net_task(&stack))); unwrap!(spawner.spawn(net_task(&stack)));

View File

@ -110,7 +110,7 @@ async fn main(spawner: Spawner) {
let seed = rng.next_u64(); let seed = rng.next_u64();
// Init network stack // Init network stack
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed)); let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
unwrap!(spawner.spawn(net_task(stack))); unwrap!(spawner.spawn(net_task(stack)));