Free (GPLv2) TCP/IP stack developed by TASS Belgium

Dependents:   lpc1768-picotcp-demo ZeroMQ_PicoTCP_Publisher_demo TCPSocket_HelloWorld_PicoTCP Pico_TCP_UDP_Test ... more

PicoTCP. Copyright (c) 2013 TASS Belgium NV.

Released under the GNU General Public License, version 2.

Different licensing models may exist, at the sole discretion of the Copyright holders.

Official homepage: http://www.picotcp.com

Bug tracker: https://github.com/tass-belgium/picotcp/issues

Development steps:

  • initial integration with mbed RTOS
  • generic mbed Ethernet driver
  • high performance NXP LPC1768 specific Ethernet driver
  • Multi-threading support for mbed RTOS
  • Berkeley sockets and integration with the New Socket API
  • Fork of the apps running on top of the New Socket API
  • Scheduling optimizations
  • Debugging/benchmarking/testing

Demo application (measuring TCP sender performance):

Import programlpc1768-picotcp-demo

A PicoTCP demo app testing the ethernet throughput on the lpc1768 mbed board.

Revision:
70:cd218dd180e5
Parent:
68:0847e35d08a6
Child:
73:dfb737147f6e
--- a/stack/pico_frame.c	Wed Sep 25 12:20:39 2013 +0000
+++ b/stack/pico_frame.c	Thu Sep 26 07:05:22 2013 +0000
@@ -52,7 +52,7 @@
 }
 
 
-struct pico_frame *pico_frame_alloc(int size)
+struct pico_frame *pico_frame_alloc(uint32_t size)
 {
   struct pico_frame *p = pico_zalloc(sizeof(struct pico_frame));
   if (!p)
@@ -120,12 +120,12 @@
 /**
  * Calculate checksum of a given string
  */
-uint16_t pico_checksum(void *inbuf, int len)
+uint16_t pico_checksum(void *inbuf, uint32_t len)
 {
   uint8_t *buf = (uint8_t *) inbuf;
-  uint16_t tmp = 0;
+  uint32_t tmp = 0;
   uint32_t sum = 0;
-  int i = 0;
+  uint32_t i = 0;
 
   for(i=0; i < len; i++) {
     if (i%2) {
@@ -142,13 +142,13 @@
   return (uint16_t) (~sum);
 }
 
-uint16_t pico_dualbuffer_checksum(void *inbuf1, int len1, void *inbuf2, int len2)
+uint16_t pico_dualbuffer_checksum(void *inbuf1, uint32_t len1, void *inbuf2, uint32_t len2)
 {
   uint8_t *b1 = (uint8_t *) inbuf1;
   uint8_t *b2 = (uint8_t *) inbuf2;
   uint16_t tmp = 0;
   uint32_t sum = 0;
-  int i = 0, j = 0;
+  uint32_t i = 0, j = 0;
 
   for(i=0; i < len1; i++) {
     if (j%2) {
@@ -176,7 +176,7 @@
   return (uint16_t) (~sum);
 }
 
-uint16_t pico_dualbuffer_checksum_broken(void *inbuf1, int len1, void *inbuf2, int len2)
+uint16_t pico_dualbuffer_checksum_broken(void *inbuf1, uint16_t len1, void *inbuf2, uint16_t len2)
 {
   uint16_t *b1 = (uint16_t *) inbuf1;
   uint16_t *b2 = (uint16_t *) inbuf2;