Skip to main content

Crate netforge

Crate netforge 

Source
Expand description

§netforge - High-performance raw packet I/O engine

High-performance raw packet I/O engine for internet-scale scanning.

Provides a unified PacketEngine trait with three backends, auto-selected by system capability:

BackendFeatureMechanismRequirements
AF_XDPxdp-backendZero-copy userspace ringKernel 5.10+, CAP_BPF, libbpf
sendmmsgsendmmsg-backendBatched sendmmsg() syscallsLinux, CAP_NET_RAW
pnetpnet-backendPortable single-packet raw socketsAny platform with CAP_NET_RAW

§Stateless Sequence Encoding

The seq module provides cryptographically-keyed TCP sequence number encoding, allowing fully stateless SYN scanning and banner grabbing. Zero bytes of per-connection state are stored.

§Checksum Computation

The checksum module provides TCP/IP checksum computation for batch packet construction (portable scalar implementation).

Re-exports§

pub use engine::auto_select;
pub use engine::EngineConfig;
pub use engine::EngineStats;
pub use engine::PacketEngine;
pub use packet::RawPacket;
pub use seq::SeqEncoder;
pub use seq::StatelessCookie;

Modules§

backend_pnet
pnet raw socket backend - portable, ~1M pps.
backend_sendmmsg
sendmmsg batch syscall backend - fast Linux, ~10M pps.
checksum
TCP/IP checksum computation.
engine
Packet engine trait and configuration.
packet
Raw packet representation for zero-allocation packet construction.
seq
Stateless TCP sequence number encoding.
stats_window
Rolling-window packets-per-second tracker for crate::engine::EngineStats.