2021-02-03 05:09:37 +01:00
|
|
|
#![cfg_attr(not(feature = "std"), no_std)]
|
2021-10-18 00:55:43 +02:00
|
|
|
#![allow(clippy::new_without_default)]
|
2022-05-19 05:54:15 +02:00
|
|
|
#![feature(generic_associated_types, type_alias_impl_trait)]
|
2021-02-03 05:09:37 +01:00
|
|
|
|
|
|
|
// This mod MUST go first, so that the others see its macros.
|
|
|
|
pub(crate) mod fmt;
|
|
|
|
|
|
|
|
mod config;
|
|
|
|
mod device;
|
|
|
|
mod packet_pool;
|
|
|
|
mod stack;
|
|
|
|
|
2021-04-12 21:00:23 +02:00
|
|
|
#[cfg(feature = "dhcpv4")]
|
|
|
|
pub use config::DhcpConfigurator;
|
|
|
|
pub use config::{Config, Configurator, Event as ConfigEvent, StaticConfigurator};
|
|
|
|
|
2021-02-03 05:09:37 +01:00
|
|
|
pub use device::{Device, LinkState};
|
2021-06-07 07:30:38 +02:00
|
|
|
pub use packet_pool::{Packet, PacketBox, PacketBoxExt, PacketBuf, MTU};
|
2022-05-02 16:15:05 +02:00
|
|
|
pub use stack::{
|
|
|
|
config, ethernet_address, init, is_config_up, is_init, is_link_up, run, StackResources,
|
|
|
|
};
|
2021-04-07 19:06:45 +02:00
|
|
|
|
|
|
|
#[cfg(feature = "tcp")]
|
2022-05-04 20:48:37 +02:00
|
|
|
pub mod tcp;
|
2021-02-03 05:09:37 +01:00
|
|
|
|
|
|
|
// smoltcp reexports
|
|
|
|
pub use smoltcp::phy::{DeviceCapabilities, Medium};
|
|
|
|
pub use smoltcp::time::Duration as SmolDuration;
|
|
|
|
pub use smoltcp::time::Instant as SmolInstant;
|
2021-11-26 20:39:21 +01:00
|
|
|
#[cfg(feature = "medium-ethernet")]
|
|
|
|
pub use smoltcp::wire::{EthernetAddress, HardwareAddress};
|
|
|
|
pub use smoltcp::wire::{IpAddress, IpCidr, Ipv4Address, Ipv4Cidr};
|
2021-02-03 05:09:37 +01:00
|
|
|
pub type Interface = smoltcp::iface::Interface<'static, device::DeviceAdapter>;
|