A TCP/IP/ICMP/ethernet stack built in minimart-2014, using a packet-socket driver I wrote for Racket.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tony Garnock-Jones 543073fd2e
README
8 years ago
.gitignore Initial commit 9 years ago
README.md README 8 years ago
TODO.md A bug 8 years ago
arp.rkt Tidy up debug output 9 years ago
checksum.rkt Tweaks to logging 9 years ago
configuration.rkt Be more explicit about gateway routes having specific interfaces, to avoid ARP reqs on the wrong interface. 9 years ago
demo-config.rkt Factor out demo stack configuration 8 years ago
dump-bytes.rkt Initial commit 9 years ago
ethernet.rkt (Less im)Proper routing. 9 years ago
fetchurl.rkt Factor out demo stack configuration 8 years ago
idle.rkt Entrypoint for simply idling the stack 8 years ago
ip.rkt Tidy up debug output 9 years ago
main.rkt Factor out demo stack configuration 8 years ago
port-allocator.rkt We have to be more careful about observing at level 3 while projecting at level 1 9 years ago
tcp.rkt Avoid gratuitous timeout 9 years ago
udp.rkt We have to be more careful about observing at level 3 while projecting at level 1 9 years ago

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