Ahmed Osama
All work

Network Packet Counter

A lightweight libpcap tool that captures live traffic and reports TCP/UDP/ICMP statistics, with BPF filtering.

Network Packet Counter screenshot

Overview

A small, fast C program that reads packets straight from a network interface with libpcap, classifies them by protocol, and prints timestamped statistics on a configurable interval.

Year
2025
Area
Systems & more
Role
Systems programming

Stack

  • C
  • libpcap
  • Linux
  • CMake
01

Live capture

Reads from real interfaces, with optional BPF filters such as tcp, udp or icmp.

02

Efficient

Designed for at least 1,000 packets/sec in under 10 MB of memory.

03

Least privilege

Runs without sudo by granting the binary only CAP_NET_RAW.