aboutsummaryrefslogtreecommitdiff
path: root/examples/std/src/bin/net_udp.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_udp.rs
parentca47af6978e85012ff70a98726fcb63ed985109d (diff)
net: Support dual stackĀ IP
Diffstat (limited to 'examples/std/src/bin/net_udp.rs')
-rw-r--r--examples/std/src/bin/net_udp.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/std/src/bin/net_udp.rs b/examples/std/src/bin/net_udp.rs
index 0ede5d998..3fc46156c 100644
--- a/examples/std/src/bin/net_udp.rs
+++ b/examples/std/src/bin/net_udp.rs
@@ -38,13 +38,13 @@ async fn main_task(spawner: Spawner) {
38 38
39 // Choose between dhcp or static ip 39 // Choose between dhcp or static ip
40 let config = if opts.static_ip { 40 let config = if opts.static_ip {
41 Config::StaticV4(embassy_net::StaticConfigV4 { 41 Config::ipv4_static(embassy_net::StaticConfigV4 {
42 address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24), 42 address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24),
43 dns_servers: Vec::new(), 43 dns_servers: Vec::new(),
44 gateway: Some(Ipv4Address::new(192, 168, 69, 1)), 44 gateway: Some(Ipv4Address::new(192, 168, 69, 1)),
45 }) 45 })
46 } else { 46 } else {
47 Config::Dhcp(Default::default()) 47 Config::dhcpv4(Default::default())
48 }; 48 };
49 49
50 // Generate random seed 50 // Generate random seed