Merge pull request #494 from quartiq/feature/dhcp-handle-support
Adding support for retrieving socket handle from DHCP sockets
This commit is contained in:
commit
195b500920
|
@ -6,6 +6,7 @@ use crate::wire::{EthernetAddress, IpProtocol, IpAddress,
|
||||||
use crate::wire::dhcpv4::{field as dhcpv4_field};
|
use crate::wire::dhcpv4::{field as dhcpv4_field};
|
||||||
use crate::socket::SocketMeta;
|
use crate::socket::SocketMeta;
|
||||||
use crate::time::{Instant, Duration};
|
use crate::time::{Instant, Duration};
|
||||||
|
use crate::socket::SocketHandle;
|
||||||
|
|
||||||
use super::{PollAt, Socket};
|
use super::{PollAt, Socket};
|
||||||
|
|
||||||
|
@ -420,6 +421,12 @@ impl Dhcpv4Socket {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Return the socket handle.
|
||||||
|
#[inline]
|
||||||
|
pub fn handle(&self) -> SocketHandle {
|
||||||
|
self.meta.handle
|
||||||
|
}
|
||||||
|
|
||||||
/// Reset state and restart discovery phase.
|
/// Reset state and restart discovery phase.
|
||||||
///
|
///
|
||||||
/// Use this to speed up acquisition of an address in a new
|
/// Use this to speed up acquisition of an address in a new
|
||||||
|
|
Loading…
Reference in New Issue