Skip to content

Instantly share code, notes, and snippets.

@msantos
msantos / bpf.c
Last active April 2, 2024 18:54
Example of using bpf to capture packets
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <err.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>