This project has been archived and marked as read-only. minIP is now hosted on GitLab.
minIP
A minimalist IP stack written in ANSI C.
This needs to be run on a Linux machine with root access - ideally on a network interface that does not have an IP address already associated with it.
This also runs on top of the BareMetal exokernel.
Goals
Provide enough of a stack to serve a simple static webpage.
Building
Linux:
make
BareMetal (with newlib):
gcc -I PATH_TO_NEWLIB_HEADERS -c minIP.c -o minIP.o -DBAREMETAL
gcc -c -m64 -Wall -W -pedantic -fno-builtin -nostdlib -nostartfiles -nodefaultlibs -fomit-frame-pointer -mno-red-zone -o libBareMetal.o libBareMetal.c
ld -T app.ld -o minIP.app crt0.o minIP.o libc.a libBareMetal.o
BareMetal (standalone - it uses hardcoded IP addresses)
./build.sh
Usage
Linux:
./minIP eth1 192.168.0.99 255.255.255.0 192.168.0.1
BareMetal (with newlib):
minIP.app en0 192.168.0.99 255.255.255.0 192.168.0.1
BareMetal (standalone - it uses hardcoded addresses, no arguments):
minIP.app
Why
If this can be done in Python (see teeceepee and its blog post), then it can be done in C!
Also, its a great proof of concept to learn the fundamentals in preparation for an x86-64 assembly re-write I plan on doing in the future.
What works
| Protocol | Functional |
|---|---|
| ARP | yes |
| IP | partially |
| ICMP | yes |
| TCP | partially |
| UDP | no |
| TCPv6 | no |
| UDPv6 | no |
Todo
- Resending dropped packets
- Large packet support
- Handling more than one incoming connection at once

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
