import ddn.lib.pcap;
string err;
auto handle = openOffline("traffic.pcap", err);
if (handle.isNull()) {
writeln("Error: ", err);
return;
}
const(pcap_pkthdr)* hdr;
const(ubyte)* data;
while (handle.nextEx(hdr, data) == 1) {
// process packet
}ddn.lib.pcap
Low-level D binding for libpcap.
This module provides a D-friendly interface to the libpcap library, wrapping the raw C API while maintaining high performance and flexibility.
Examples
License
BSD-3-Clause
Copyright
© 2026 DDN (D Developer Network) Members
No exported symbols.