Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ianseyler/minip
A minimalist IP stack written in ANSI C.
https://github.com/ianseyler/minip
baremetal c
Last synced: 9 days ago
JSON representation
A minimalist IP stack written in ANSI C.
- Host: GitHub
- URL: https://github.com/ianseyler/minip
- Owner: IanSeyler
- License: mit
- Created: 2014-10-07T18:38:35.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-11-11T17:11:23.000Z (12 months ago)
- Last Synced: 2024-05-01T13:49:18.836Z (6 months ago)
- Topics: baremetal, c
- Language: C
- Homepage:
- Size: 79.1 KB
- Stars: 50
- Watchers: 15
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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:
This version uses hardcoded IP addresses. Make sure to update them if needed in main().
./build.sh
Usage
--------Linux:
./minIP eth1 192.168.0.99 255.255.255.0 192.168.0.1
BareMetal:
minIP.app
Why
--------If this can be done in Python (see [teeceepee](https://github.com/jvns/teeceepee) and its [blog post](http://jvns.ca/blog/2014/08/12/what-happens-if-you-write-a-tcp-stack-in-python/)), 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 | noTodo
--------
- Resending dropped packets
- Large packet support
- Handling more than one incoming connection at once