We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d522b7 commit cf40c85Copy full SHA for cf40c85
src/netif.rs
@@ -391,6 +391,20 @@ impl EspNetif {
391
})
392
}
393
394
+ pub fn set_ip_info(&mut self, ip_info: ipv4::IpInfo) -> Result<(), EspError> {
395
+ let mut raw_ip_info: Newtype<esp_netif_ip_info_t> = ip_info.clone().into();
396
+
397
+ unsafe { esp!(esp_netif_set_ip_info(self.0, &mut raw_ip_info.0)) }?;
398
+ if let Some(dns) = ip_info.dns {
399
+ self.set_dns(dns);
400
+ }
401
+ if let Some(dns) = ip_info.secondary_dns {
402
+ self.set_secondary_dns(dns);
403
404
405
+ Ok(())
406
407
408
pub fn get_key(&self) -> heapless::String<32> {
409
unsafe { from_cstr_ptr(esp_netif_get_ifkey(self.0)) }
410
.try_into()
0 commit comments