Skip to main content

prey/
lib.rs

1//! # Prey
2//! _Packet Routing Engine Yield_
3//!
4//! This is the core of the whole framework
5//! By now, contains buffer management and recycling.
6//! > **Its still under development**
7//!
8//! ## Buffer Management
9//! The way PREY deals with buffers is simple but smart:
10//! It allocates space once, and all the remaining management is done by
11//! itself. This makes PREY really efficient in terms of speed while dealing
12//! with memory, since it does not need to depend on kernel and OS services during
13//! its runtime, only at its start.
14//!
15//! It uses an efficient memory layout to prevent unnecessary space allocation,
16//! using cache lines fixed on 64 bits per line.
17//!
18//! Buffers have a fixed size of 2048 bytes, and PREY uses the headroom strategy to allow
19//! further headers adding without the need of creating another buffer. That way, the network
20//! packets fit in the buffer and proxies and firewalls can easily add headers in the response.
21
22pub mod buffer;