Project rev tcpip

From wiki.akkit.org

Revolution project : TCP/IP Stack - This is a complex project, requiring moderately skilled coders with a good knowledge of c++ and the differences between platforms.

This is a first pass at documenting the project. Probably some stuff is missing.

Contents

General info

  • Develoment Name: sgIP (subject to change)
  • Development Target: All platforms. Primary targets are PowerPC (Wii/Gamecube), PC (x86), DS (ARM)


Design

This project consists of building a flawless TCP/IP protocol stack from scratch. To ensure the quality of the stack, numerous unit tests will be built along the side of the protocols, to ensure they work as expected. The stack will provide configurable routing through multiple network interfaces, Will implement each protocol independently, and provide a way to add additional protocols dynamicly. It will implement it's own API for using the internet protocols, and provide a berkley-sockets compatible layer for applications to use as an alternative. It will work correctly in threaded environments and interrupt-driven environments, as well as when neither is present, implementing each case slightly differently to achieve maximum performace. It will support IP completely, and intelligently defragment packets, forwarding as much data to the upper layers as possible, as early as possible.


Required protocol implementations (in rough order of implementation)

  • ARP
  • DHCP
  • IPv4
  • IPv6
  • ICMP
  • TCP
  • UDP
  • DNS
  • Possibly SCTP

Technical Design

The majority of the data structures will be implemented as templates with policies. Such as Socket< ProtocolType, AddressType, ProtectionType, DebugType > - this is in order to produce the fastest code possible with very little duplication of effort. Typedefs to expose the interface to the user with platform-specific protection/debug classes are useful. Polymorphism is essential for packet routing (Socket<> should implement pure virtual Endpoint, or something similar) but should be avoided in most/all other scenarios. A berkley compatible layer, accessable from C will be written (yes we can expose this functionality to C without any problem)

Before development begins, we need to ascertain the following:

  • Exactly which protocols, address types, etc to be included in the first revision
  • Ascertain exactly the extents of the berlkey socket interface and concretely define what parts will be emulated (hopefully all of it)
  • Decide on a reasonable timing model for dealing with time-delayed events and recurring things, that will work across the widest range of platforms possible.
  • Pick which memory allocation models to support in the first revision (at least: static block pool, dynamic block pool, and pure dynamic)
  • Select the best ideas for how to protect the code from concurrency issues, at least for threaded and interrupt models.
  • maybe some other things?

Timeline

No timeline exists for development at this point in time.


Development Team

Still looking for people interested in helping. (people won't be added here until they've expressed interest and are ok with me adding their names here)