2021-02-03 05:09:37 +01:00
|
|
|
#![cfg_attr(not(feature = "std"), no_std)]
|
|
|
|
#![feature(const_fn)]
|
|
|
|
#![feature(const_generics)]
|
|
|
|
#![feature(const_evaluatable_checked)]
|
|
|
|
#![allow(incomplete_features)]
|
|
|
|
|
|
|
|
// 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-07 19:06:45 +02:00
|
|
|
pub use config::{Config, Configurator, DhcpConfigurator, StaticConfigurator};
|
2021-02-03 05:09:37 +01:00
|
|
|
pub use device::{Device, LinkState};
|
2021-04-07 19:06:45 +02:00
|
|
|
pub use packet_pool::{Packet, PacketBox, PacketBoxExt, PacketBuf};
|
2021-02-03 05:09:37 +01:00
|
|
|
pub use stack::{init, is_init, run};
|
2021-04-07 19:06:45 +02:00
|
|
|
|
|
|
|
#[cfg(feature = "tcp")]
|
|
|
|
mod tcp_socket;
|
|
|
|
#[cfg(feature = "tcp")]
|
2021-02-03 05:09:37 +01:00
|
|
|
pub use tcp_socket::TcpSocket;
|
|
|
|
|
|
|
|
// smoltcp reexports
|
|
|
|
pub use smoltcp::phy::{DeviceCapabilities, Medium};
|
|
|
|
pub use smoltcp::time::Duration as SmolDuration;
|
|
|
|
pub use smoltcp::time::Instant as SmolInstant;
|
|
|
|
pub use smoltcp::wire::{IpAddress, IpCidr, Ipv4Address, Ipv4Cidr};
|
|
|
|
pub type Interface = smoltcp::iface::Interface<'static, device::DeviceAdapter>;
|
|
|
|
pub type SocketSet = smoltcp::socket::SocketSet<'static>;
|
2021-04-07 19:06:45 +02:00
|
|
|
pub use smoltcp::{Error, Result};
|