All Projects → weaveworks → Tcptracer Bpf

weaveworks / Tcptracer Bpf

Licence: apache-2.0
eBPF program using kprobes to trace TCP events without run-time compilation dependencies

Programming Languages

shell
77523 projects
golang
3204 projects

Projects that are alternatives of or similar to Tcptracer Bpf

Tcpdog
eBPF based TCP observability.
Stars: ✭ 119 (-50.42%)
Mutual labels:  tcp, ebpf
Tacopie
C++ TCP Library - NO LONGER MAINTAINED
Stars: ✭ 359 (+49.58%)
Mutual labels:  tcp, no-dependencies
Tcpprobe
Modern TCP tool and service for network performance observability.
Stars: ✭ 207 (-13.75%)
Mutual labels:  tcp
Zingchart
A declarative, efficient, and simple JavaScript library for building responsive charts
Stars: ✭ 235 (-2.08%)
Mutual labels:  no-dependencies
Gnb
GNB is open source de-centralized VPN to achieve layer3 network via p2p with the ultimate capability of NAT Traversal.GNB是一个开源的去中心化的具有极致内网穿透能力的通过P2P进行三层网络交换的VPN。
Stars: ✭ 225 (-6.25%)
Mutual labels:  tcp
Aleph
Asynchronous communication for Clojure
Stars: ✭ 2,389 (+895.42%)
Mutual labels:  tcp
Tosdatabridge
A collection of resources for pulling real-time streaming data off of TDAmeritrade's ThinkOrSwim(TOS) platform; providing C, C++, Java and Python interfaces.
Stars: ✭ 229 (-4.58%)
Mutual labels:  tcp
Frpc Android
Android,安卓版frpc,一个快速反向代理,可帮助您将NAT或防火墙后面的本地服务器暴露给Internet。
Stars: ✭ 205 (-14.58%)
Mutual labels:  tcp
Hprose Html5
Hprose is a cross-language RPC. This project is Hprose 2.0 Client for HTML5
Stars: ✭ 237 (-1.25%)
Mutual labels:  tcp
Simplenetwork
simple TCP server / client C++ linux socket
Stars: ✭ 225 (-6.25%)
Mutual labels:  tcp
Ssokit Qmake
A Simple & Strong Tool for TCP&UDP Debug
Stars: ✭ 231 (-3.75%)
Mutual labels:  tcp
Polycube
eBPF/XDP-based software framework for fast network services running in the Linux kernel.
Stars: ✭ 217 (-9.58%)
Mutual labels:  ebpf
Pypacker
📦 The fastest and simplest packet manipulation lib for Python
Stars: ✭ 216 (-10%)
Mutual labels:  tcp
Medium Zoom
🔎🖼 A JavaScript library for zooming images like Medium
Stars: ✭ 2,799 (+1066.25%)
Mutual labels:  no-dependencies
Watsontcp
WatsonTcp is the easiest way to build TCP-based clients and servers in C#.
Stars: ✭ 209 (-12.92%)
Mutual labels:  tcp
Network
C# Network Library
Stars: ✭ 237 (-1.25%)
Mutual labels:  tcp
Ohsce
PHP HI-REL SOCKET TCP/UDP/ICMP/Serial .高可靠性PHP通信&控制框架SOCKET-TCP/UDP/ICMP/硬件Serial-RS232/RS422/RS485 AND MORE!
Stars: ✭ 206 (-14.17%)
Mutual labels:  tcp
Pss
This is a based plug-in framework that provides cross-platform IO and logically separated plug-in services.
Stars: ✭ 219 (-8.75%)
Mutual labels:  tcp
Validate
A lightweight form validation script.
Stars: ✭ 227 (-5.42%)
Mutual labels:  no-dependencies
Go Http Tunnel
Fast and secure tunnels over HTTP/2
Stars: ✭ 2,786 (+1060.83%)
Mutual labels:  tcp

tcptracer-bpf

tcptracer-bpf is an eBPF program using kprobes to trace TCP events (connect, accept, close). The eBPF program is compiled to an ELF object file.

tcptracer-bpf also provides a Go library that provides a simple API for loading the ELF object file. Internally, it is using the gobpf elf package.

tcptracer-bpf does not have any run-time dependencies on kernel headers and is not tied to a specific kernel version or kernel configuration. This is quite unusual for eBPF programs using kprobes: for example, eBPF programs using kprobes with bcc are compiled on the fly and depend on kernel headers. And perf tools compiled for one kernel version cannot be used on another kernel version.

To adapt to the currently running kernel at run-time, tcptracer-bpf creates a series of TCP connections with known parameters (such as known IP addresses and ports) and discovers where those parameters are stored in the kernel struct sock. The offsets of the struct sock fields vary depending on the kernel version and kernel configuration. Since an eBPF programs cannot loop, tcptracer-bpf does not directly iterate over the possible offsets. It is instead controlled from userspace by the Go library using a state machine.

See tests/tracer.go for an example how to use tcptracer-bpf.

Build the elf object

make

The object file can be found in ebpf/tcptracer-ebpf.o.

Test

cd tests
make
sudo ./run

Vendoring

We use gvt.

Getting Help

If you have any questions about, feedback for or problems with tcptracer-bpf:

Weaveworks follows the CNCF Code of Conduct. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a Weaveworks project maintainer, or Alexis Richardson ([email protected]).

Your feedback is always welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].