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

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
}

Authors

Dejan Lekić

License

BSD-3-Clause
No exported symbols.