123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- #![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 = "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)]
- 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 = 1500;
- 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_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 = 2;
- }
- #[cfg(not(test))]
- 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;
|