Expand description
TCP packet builder.
Provides a fluent API for constructing TCP packets with automatic field calculation (checksum, data offset).
§Example
use stackforge_core::layer::tcp::{TcpBuilder, TcpFlags};
use std::net::Ipv4Addr;
// Build a SYN packet
let packet = TcpBuilder::new()
.src_port(12345)
.dst_port(80)
.seq(1000)
.syn()
.window(65535)
.mss(1460)
.wscale(7)
.sack_ok()
.build();Structs§
- TcpBuilder
- Builder for TCP packets.
Enums§
- IpAddr
- IP address enum for checksum calculation.