Giter VIP home page Giter VIP logo

minip's Introduction

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 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

minip's People

Contributors

ianseyler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minip's Issues

Valid return?

I was checking the page that minIP returns, and I noticed a few things I thought I'd bring up.
I'm not sure if these things are needed, but it seems like they should be.

  • Shouldn't there be a Content-length header?
  • Shouldn't headers end with a CR LF, instead of just a newline?

Compile issue?

I seem to have some issues compiling minIP.

In particular, the struct ifreq does not seem to be recognized, nor does IFNAMSIZ and IFF_UP.

Am I missing a header?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.