Good work!

As I was reading through your tutorial I thought of two things:
1. There is probably some third party libraries to create raw/ICMP sockets
2. Threads would make this A LOT faster...