

Or write the pcap to stdout, and decode the packets with tcpdump: $ xdpcap /path/to/hook - "ip and udp port 53" | sudo tcpdump -r. XDPAborted: 0/0 XDPDrop: 0/0 XDPPass: 995/1 XDPTx: 0/0 (received/matched packets) XDPAborted: 0/0 XDPDrop: 0/0 XDPPass: 254/0 XDPTx: 0/0 (received/matched packets)

Xdpcap reuses the same syntax! xdpcap can write packets to a pcap file: $ xdpcap /path/to/hook capture.pcap "ip and udp port 53" For example, to capture all IPv4 DNS packets, one could: $ tcpdump ip and udp port 53 Tcpdump provides an easy way to dump specific packets of interest. Xdpcap uses our classic BPF (cBPF) to eBPF or C compiler, cbpfc, which we are also open sourcing: the code and documentation are available on GitHub. We are open sourcing this tool: the code and documentation are available on GitHub. To address this, we built a tcpdump replacement for XDP, xdpcap.

But there’s a downside to XDP: because it processes packets before the normal Linux network stack sees them, packets redirected or dropped are invisible to regular debugging tools such as tcpdump. We’re using it to drop DoS attack packets with L4Drop, and also in our new layer 4 load balancer. To do so efficiently, we’ve embraced eXpress Data Path (XDP), a Linux kernel technology that provides a high performance mechanism for low level packet processing. Our servers process a lot of network packets, be it legitimate traffic or large denial of service attacks.
