Skip to content

Instantly share code, notes, and snippets.

View yugeshk's full-sized avatar
🏠
Working from home

Yugesh Ajit Kothari yugeshk

🏠
Working from home
View GitHub Profile
@yugeshk
yugeshk / tcp_monitor.c
Created November 18, 2021 20:19 — forked from sunhay/tcp_monitor.c
eBPF socket filter based tcptop
#include <uapi/linux/ptrace.h>
#include <uapi/linux/if_packet.h>
#include <net/sock.h>
#include <bcc/proto.h>
#define IP_TCP 6
#define ETH_HLEN 14
struct Key {
u32 src_ip; // source ip