Documentation
¶
Overview ¶
This program demonstrates attaching a fentry eBPF program to tcp_close and reading the RTT from the TCP socket using CO-RE helpers. It prints the IPs/ports/RTT information once the host closes a TCP connection. It supports only IPv4 for this example.
Sample output:
examples# go run -exec sudo ./tcprtt 2022/03/19 22:30:34 Src addr Port -> Dest addr Port RTT 2022/03/19 22:30:36 10.0.1.205 50578 -> 117.102.109.186 5201 195 2022/03/19 22:30:53 10.0.1.205 0 -> 89.84.1.178 9200 30 2022/03/19 22:30:53 10.0.1.205 36022 -> 89.84.1.178 9200 28
Click to show internal directories.
Click to hide internal directories.