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/include/pico_constants.h	Wed Sep 25 12:20:39 2013 +0000
+++ b/include/pico_constants.h	Thu Sep 26 07:05:22 2013 +0000
@@ -8,7 +8,7 @@
 /* Included from pico_config.h */
 /** Endian-dependant constants **/
 
-extern volatile unsigned long long pico_tick;
+extern volatile uint64_t pico_tick;
 
 #ifdef PICO_BIGENDIAN
 
@@ -22,6 +22,7 @@
 
 #define short_be(x) (x)
 #define long_be(x) (x)
+#define long_long_be(x) (x)
 
 static inline uint16_t short_from(void *_p)
 {
@@ -53,7 +54,7 @@
   uint16_t r, p0, p1;
   p0 = p[0];
   p1 = p[1];
-  r = (p1 << 8u) + p0;
+  r = (uint16_t)((p1 << 8u) + p0);
   return r;
 }
 
@@ -80,7 +81,7 @@
 
 static inline uint16_t short_be(uint16_t le)
 {
-  return ((le & 0xFFu) << 8) | ((le >> 8u) & 0xFFu);
+  return (uint16_t)(((le & 0xFFu) << 8) | ((le >> 8u) & 0xFFu));
 }
 
 static inline uint32_t long_be(uint32_t le)
@@ -94,6 +95,21 @@
   be = b[3] + (b2 << 8) + (b1 << 16) + (b0 << 24);
   return be;
 }
+static inline uint64_t long_long_be(uint64_t le)
+{
+  uint8_t *b = (uint8_t *)&le;
+  uint64_t be = 0;
+  uint64_t b0, b1, b2, b3, b4, b5, b6;
+  b0 = b[0];
+  b1 = b[1];
+  b2 = b[2];
+  b3 = b[3];
+  b4 = b[4];
+  b5 = b[5];
+  b6 = b[6];
+  be = b[7] + (b6 << 8) + (b5 << 16) + (b4 << 24) + (b3 << 32) + (b2 << 40) + (b1 << 48) + (b0 << 56);
+  return be;
+}
 #endif
 
 
@@ -109,9 +125,9 @@
 static inline uint32_t pico_hash(const char *name)
 {
   unsigned long hash = 5381;
-  int c;
+  int8_t c;
   while ((c = *name++))
-    hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
+    hash = ((hash << 5) + hash) + (unsigned long)c; /* hash * 33 + c */
   return hash;
 }