mIP (short for Managed Internet Protocol) is a 100% managed TCP/IP stack for .NET MicroFramework

The purpose of mIP is to empower the C# developer to debug and add advanced networking features without having to change the firmware or learn C++.  Since this is targeted to embedded devices, this library strives to use a minimal memory footprint.  Also, the classes and methods MUST be simple and obvious to use and the critical public methods will be commented properly to allow for proper intellisense.  Also, initially, the focus is to enable web server functionality.  See the Documentation Page for code examples.  

Now you can make any .NET MicroFramework device do this:

Primary Goals:

  • Durability -- keep running despite exceptions
  • Never block without timeout -- No method should ever block (without a default timeout and optional timeout setting) and the code should be written to make indefinite blocking impossible
  • Features that make usage and discovery simple for the end-user
    • Sensible default values such as DHCP on by default
    • Support for Local Naming such as mDNS and even NetBIOS over TCP
  • Small -- embedded devices have very little memory
  • Simple code -- code should be easy and simple to foster contributions
  • Minimize validation -- Validation is great if we have lots of memory, but beyond validating checksums and packet sizes, there won't be much.  For instance, since there are no generics, ArrayList and Hashtable are used and type checking everything is not necessary when only private methods populate these collections... 

Current Features:

  • Simplified handlers for HTTP
    • Request and Response objects modeled after desktop .NET Framework
  • ARP
  • DHCP (Dynamic IP, DNS, gateway address discovery, & propagates name to router)
    • Tested with 2-Wire 3800HGV
    • Tested with D-Link EBR-2310
    • Tested with Netgear WGR-614
  • ICMP (Responds to Ping requests)
  • TCP (Receives 1 packet, sends many)
  • UDP
  • Multicast DNS (mDNS) for local Naming
  • Link-Local Multicast Name Resolution for Local Naming
  • NetBIOS over TCP (to support WinXP)
  • Driver for ENC28J60 Ethernet Controller (License compatible for commercial use)
  • Supports Cable connect/disconnect events and renegotiates IP automatically (if DHCP is enabled)
  • Withstands flood of packets without crash (such as that caused by holding the F5 key on browser)

Future Features: 

  • Support uPNP to allow for firewall configuration
  • Support reception of more than just one packet
  • Drivers for a wireless device
  • Support for other enc28j60 devices by adding more configurations to the enum
  • Support for use on any NetduinoGo socket
  • Add Internet access test method

Methodology:

I know very little about TCP/IP (confidence inspiring, eh?) and am really not interested in implementing every single RFC under the sun.  I am primarily interested in making a small and functional stack to run a rudimentary web server in a home or small business.  So, I basically use WireShark to look at the packets and try to recreate what I see.  I encourage everyone to download wireshark to understand how networking works. 

Acknowledgements:

Special thanks to Hanzibal for porting the enc28j60 driver. 

And thanks to Matt Isenhower for the mDNS guidance. 

And thanks to Chris Walker at Secret Labs for all the support and getting me started on .NET Micro Framework. 

Last edited Aug 27, 2012 at 3:14 AM by ValkyrieMT, version 23