Skip to content

Instantly share code, notes, and snippets.

View thombles's full-sized avatar

Thomas Karpiniec thombles

View GitHub Profile
@thombles
thombles / main.rs
Created September 1, 2017 09:06
Sample Rust ARP Server
// Thomas Karpiniec, 1 Sep 2017
// Companion code to https://karp.id.au/a/2017/09/01/layer-2-raw-sockets-on-rustlinux/
extern crate libc;
use std::io;
use std::ptr;
use std::mem;
use std::collections::HashMap;
use std::net::Ipv4Addr;