Struct smoltcp::iface::EthernetInterface [] [src]

pub struct EthernetInterface<'a, 'b, 'c, DeviceT: Device + 'a> { /* fields omitted */ }

An Ethernet network interface.

The network interface logically owns a number of other data structures; to avoid a dependency on heap allocation, it instead owns a BorrowMut<[T]>, which can be a &mut [T], or Vec<T> if a heap is available.

Methods

impl<'a, 'b, 'c, DeviceT: Device + 'a> Interface<'a, 'b, 'c, DeviceT>
[src]

[src]

Create a network interface using the provided network device.

Panics

See the restrictions on set_hardware_addr and set_protocol_addrs functions.

[src]

Get the hardware address of the interface.

[src]

Set the hardware address of the interface.

Panics

This function panics if the address is not unicast.

[src]

Get the protocol addresses of the interface.

[src]

Update the protocol addresses of the interface.

Panics

This function panics if any of the addresses is not unicast.

[src]

Check whether the interface has the given protocol address assigned.

[src]

Transmit packets queued in the given sockets, and receive packets queued in the device.

The timestamp must be a number of milliseconds, monotonically increasing since an arbitrary moment in time, such as system startup.

This function returns a soft deadline for calling it the next time. That is, if iface.poll(&mut sockets, 1000) returns Ok(Some(2000)), it harmless (but wastes energy) to call it 500 ms later, and potentially harmful (impacting quality of service) to call it 1500 ms later.