Skip to content

This Go program utilizes eBPF (extended Berkeley Packet Filter) technology to parse network packets and count the number of packets received from each unique source IP address and port combination. Packet metadata is parsed using custom data structures, and counts are displayed or processed as needed.

Notifications You must be signed in to change notification settings

ShebinSp/packet_count

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Packet_count

This Go program utilizes eBPF (extended Berkeley Packet Filter) technology to parse network packets and count the number of packets received from each unique source IP address and port combination. It attaches an XDP (eXpress Data Path) program to a specified network interface and periodically reads packet counts from the eBPF map. Packet metadata is parsed using custom data structures, and counts are displayed or processed as needed.

  • To run, provide an iface flag value (eth0, enp2so, wlp3s0 ...)
    sudo ./packet_count --iface enp2s0

  • To find the network interface on your system,run on terminal:$
    ip link show

About

This Go program utilizes eBPF (extended Berkeley Packet Filter) technology to parse network packets and count the number of packets received from each unique source IP address and port combination. Packet metadata is parsed using custom data structures, and counts are displayed or processed as needed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published