Skip to content

Instantly share code, notes, and snippets.

@malviyaritesh
malviyaritesh / bpf.c
Created May 23, 2023 13:06 — forked from 2opremio/bpf.c
Example of using bpf to capture packets in OSX
#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>