A TCP/IP/ICMP/ethernet stack built in minimart-2014, using a packet-socket driver I wrote for Racket.
Go to file
Tony Garnock-Jones 543073fd2e README 2015-10-17 21:11:55 -04:00
.gitignore Initial commit 2014-06-15 21:16:14 -04:00
README.md README 2015-10-17 21:11:55 -04:00
TODO.md A bug 2015-07-09 14:04:40 -04:00
arp.rkt Tidy up debug output 2014-06-19 23:20:31 -04:00
checksum.rkt Tweaks to logging 2014-06-16 17:51:37 -04:00
configuration.rkt Be more explicit about gateway routes having specific interfaces, to avoid ARP reqs on the wrong interface. 2014-06-19 23:10:50 -04:00
demo-config.rkt Factor out demo stack configuration 2015-10-17 20:33:10 -04:00
dump-bytes.rkt Initial commit 2014-06-15 21:16:14 -04:00
ethernet.rkt (Less im)Proper routing. 2014-06-18 21:24:47 -04:00
fetchurl.rkt Factor out demo stack configuration 2015-10-17 20:33:10 -04:00
idle.rkt Entrypoint for simply idling the stack 2015-10-17 20:33:51 -04:00
ip.rkt Tidy up debug output 2014-06-19 23:20:31 -04:00
main.rkt Factor out demo stack configuration 2015-10-17 20:33:10 -04:00
port-allocator.rkt We have to be more careful about observing at level 3 while projecting at level 1 2014-06-19 22:35:56 -04:00
tcp.rkt Avoid gratuitous timeout 2014-06-30 08:20:09 -04:00
udp.rkt We have to be more careful about observing at level 3 while projecting at level 1 2014-06-19 22:35:56 -04:00

README.md

TCP/IP Stack

Linux Firewall Configuration

Imagine a setup where the machine you are running this code has IP 192.168.1.10. This code claims 192.168.1.222 for itself. Now, pinging 192.168.1.222 from some other machine, say 192.168.1.99, will cause the local kernel to receive the pings and then forward them on to 192.168.1.222, which because of the gratuitous ARP announcement, it knows to be on its own Ethernet MAC address. This causes the ping requests to repeat endlessly, each time with one lower TTL.

One approach to solving the problem is to prevent the kernel from forwarding packets addressed to 192.168.1.222. To do this,

sudo iptables -I FORWARD -d 192.168.1.222 -j DROP