#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![deny(unsafe_code)]
#![allow(clippy::match_like_matches_macro)]
#![allow(clippy::redundant_field_names)]
#![allow(clippy::identity_op)]
#![allow(clippy::option_map_unit_fn)]
#![allow(clippy::unit_arg)]
#![allow(clippy::new_without_default)]
#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(not(any(
feature = "proto-ipv4",
feature = "proto-ipv6",
feature = "proto-sixlowpan"
)))]
compile_error!(
"You must enable at least one of the following features: proto-ipv4, proto-ipv6, proto-sixlowpan"
);
#[cfg(all(
feature = "socket",
not(any(
feature = "socket-raw",
feature = "socket-udp",
feature = "socket-tcp",
feature = "socket-icmp",
feature = "socket-dhcpv4",
feature = "socket-dns",
))
))]
compile_error!(
"If you enable the socket feature, you must enable at least one of the following features: socket-raw, socket-udp, socket-tcp, socket-icmp, socket-dhcpv4, socket-dns"
);
#[cfg(all(
feature = "socket",
not(any(
feature = "medium-ethernet",
feature = "medium-ip",
feature = "medium-ieee802154",
))
))]
compile_error!(
"If you enable the socket feature, you must enable at least one of the following features: medium-ip, medium-ethernet, medium-ieee802154"
);
#[cfg(all(
feature = "proto-ipv6-slaac",
not(any(feature = "medium-ethernet", feature = "medium-ieee802154",))
))]
compile_error!(
"If you enable the `proto-ipv6-slaac` feature, you must enable at least one of the following features: medium-ethernet, medium-ieee802154"
);
#[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You must enable at most one of the following features: defmt, log");
#[macro_use]
mod macros;
mod parsers;
mod rand;
#[cfg(test)]
pub mod config {
#![allow(unused)]
pub const ASSEMBLER_MAX_SEGMENT_COUNT: usize = 4;
pub const DNS_MAX_NAME_SIZE: usize = 255;
pub const DNS_MAX_RESULT_COUNT: usize = 1;
pub const DNS_MAX_SERVER_COUNT: usize = 1;
pub const FRAGMENTATION_BUFFER_SIZE: usize = 4096;
pub const IFACE_MAX_ADDR_COUNT: usize = 8;
pub const IFACE_MAX_MULTICAST_GROUP_COUNT: usize = 4;
pub const IFACE_MAX_ROUTE_COUNT: usize = 4;
pub const IFACE_MAX_PREFIX_COUNT: usize = 1;
pub const IFACE_MAX_SIXLOWPAN_ADDRESS_CONTEXT_COUNT: usize = 4;
pub const IFACE_NEIGHBOR_CACHE_COUNT: usize = 3;
pub const REASSEMBLY_BUFFER_COUNT: usize = 4;
pub const REASSEMBLY_BUFFER_SIZE: usize = 1500;
pub const RPL_RELATIONS_BUFFER_COUNT: usize = 16;
pub const RPL_PARENTS_BUFFER_COUNT: usize = 8;
pub const IPV6_HBH_MAX_OPTIONS: usize = 4;
}
#[cfg(not(test))]
pub mod config {
#![allow(unused)]
include!(concat!(env!("OUT_DIR"), "/config.rs"));
}
#[cfg(any(
feature = "medium-ethernet",
feature = "medium-ip",
feature = "medium-ieee802154"
))]
pub mod iface;
pub mod phy;
#[cfg(feature = "socket")]
pub mod socket;
pub mod storage;
pub mod time;
pub mod wire;
#[cfg(all(
test,
any(
feature = "medium-ethernet",
feature = "medium-ip",
feature = "medium-ieee802154"
)
))]
mod tests;