Skip to content

Instantly share code, notes, and snippets.

@albertjin
albertjin / bpf.c
Created March 1, 2019 19:20 — 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>