#![warn(missing_docs)]
#![warn(clippy::pedantic)]
#![allow(
clippy::module_name_repetitions,
clippy::must_use_candidate,
clippy::missing_errors_doc,
// doc_markdown fires on protocol-name acronyms (AF_XDP, IP, TCP,
// UDP, RFC, etc.) that are universally readable without backticks.
// Backticking them everywhere makes the rendered docs noisy.
clippy::doc_markdown,
// Network packet code casts u16/u32 sizes to u8 / usize / i32
// intentionally - the values come from MTU- and ring-bounded
// counters that cannot exceed the target type's range.
clippy::cast_possible_truncation,
clippy::cast_sign_loss,
clippy::cast_precision_loss,
clippy::cast_lossless,
// Hot-loop range iteration is faster than the iterator equivalent
// in the engine's TX/RX paths and reads more clearly to readers
// accustomed to C-style packet processing.
clippy::needless_range_loop,
clippy::similar_names,
clippy::too_many_lines,
// Unsafe blocks in the backends are documented inline and checked
// by integration tests; the `undocumented_unsafe_blocks` lint
// double-counts the SAFETY: comments we already have.
clippy::missing_safety_doc,
// libc bridging code naturally uses `&mut x as *mut _ as *mut T`
// to bind into C structs; clippy's preferred `addr_of_mut!` form
// would require restructuring how mmsghdr is built each call.
clippy::ptr_as_ptr,
clippy::borrow_as_ptr,
clippy::ref_as_ptr,
clippy::ptr_cast_constness,
)]
pub mod checksum;
pub mod engine;
pub mod packet;
pub mod seq;
pub mod stats_window;
#[cfg(feature = "pnet-backend")]
pub mod backend_pnet;
#[cfg(feature = "sendmmsg-backend")]
pub mod backend_sendmmsg;
#[cfg(feature = "xdp-backend")]
pub mod backend_xdp;
pub use engine::{auto_select, EngineConfig, EngineStats, PacketEngine};
pub use packet::RawPacket;
pub use seq::{SeqEncoder, StatelessCookie};