eBPF, Sockets, Hop Distance and manually writing eBPF assembly
Mar 29, 2018Marek Majkowski

Summary
This post introduces the use of eBPF (extended Berkeley Packet Filter) and socket options (`SO_ATTACH_BPF`) for advanced network introspection. It details how eBPF can be used to extract IP TTL values from TCP connections to determine hop distance, a novel approach to verifying traffic routing outside of the datacenter. The post also delves into the technical challenges and implementation details of writing eBPF assembly, including the use of eBPF maps for data sharing between kernel and userspace.
More from the Data Infrastructure & Analytics trail
- Introducing Cloudflare Basin: an open, serverless data platform, now generally available
- Introducing the Billable Usage API: programmatic cost visibility for Cloudflare
- Announcing the Monetization Gateway: charge for any resource behind Cloudflare via x402
- How we built Cloudflare's data platform and an AI agent on top of it
- Iran's Internet is partially restored, Cloudflare Radar data shows