aboutsummaryrefslogtreecommitdiff
path: root/examples/std/src/bin/net.rs
diff options
context:
space:
mode:
authorRuben De Smet <[email protected]>2023-06-07 12:04:15 +0200
committerRuben De Smet <[email protected]>2023-06-07 13:18:19 +0200
commit352f0b6c3823797576c36f417d6be40189bca5d5 (patch)
tree4dc2111b5c797883756fd55329b6af1f02c1d1d5 /examples/std/src/bin/net.rs
parentca47af6978e85012ff70a98726fcb63ed985109d (diff)
net: Support dual stackĀ IP
Diffstat (limited to 'examples/std/src/bin/net.rs')
-rw-r--r--examples/std/src/bin/net.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/std/src/bin/net.rs b/examples/std/src/bin/net.rs
index 14cf3f25b..3aadb029d 100644
--- a/examples/std/src/bin/net.rs
+++ b/examples/std/src/bin/net.rs
@@ -42,13 +42,13 @@ async fn main_task(spawner: Spawner) {
42 42
43 // Choose between dhcp or static ip 43 // Choose between dhcp or static ip
44 let config = if opts.static_ip { 44 let config = if opts.static_ip {
45 Config::StaticV4(embassy_net::StaticConfigV4 { 45 Config::ipv4_static(embassy_net::StaticConfigV4 {
46 address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24), 46 address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24),
47 dns_servers: Vec::new(), 47 dns_servers: Vec::new(),
48 gateway: Some(Ipv4Address::new(192, 168, 69, 1)), 48 gateway: Some(Ipv4Address::new(192, 168, 69, 1)),
49 }) 49 })
50 } else { 50 } else {
51 Config::Dhcp(Default::default()) 51 Config::dhcpv4(Default::default())
52 }; 52 };
53 53
54 // Generate random seed 54 // Generate random seed