dhcp_client_core::deps

Trait PacketSocketProvider

Source
pub trait PacketSocketProvider {
    type Sock: Socket<Mac>;

    // Required method
    async fn get_packet_socket(&self) -> Result<Self::Sock, SocketError>;
}
Expand description

Provides access to AF_PACKET sockets.

Required Associated Types§

Source

type Sock: Socket<Mac>

The type of sockets provided by this PacketSocketProvider.

Required Methods§

Source

async fn get_packet_socket(&self) -> Result<Self::Sock, SocketError>

Gets a packet socket bound to the device on which the DHCP client protocol is being performed. The packet socket should already be bound to the appropriate device and protocol number.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§