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:
133:5b075f5e141a
Parent:
131:4758606c9316
Child:
137:a1c8bfa9d691
--- a/include/pico_constants.h	Tue Jan 07 13:55:29 2014 +0100
+++ b/include/pico_constants.h	Thu Jan 16 10:13:37 2014 +0100
@@ -112,6 +112,13 @@
 }
 #endif
 
+/*** *** *** *** *** *** ***
+ ***     ARP CONFIG      ***
+ *** *** *** *** *** *** ***/
+/* Maximum amount of accepted ARP requests per burst interval */
+#define PICO_ARP_MAX_RATE 1
+/* Duration of the burst interval in milliseconds */
+#define PICO_ARP_INTERVAL 1000
 
 /* Add well-known host numbers here. (bigendian constants only beyond this point) */
 #define PICO_IP4_ANY (0x00000000U)
@@ -122,12 +129,13 @@
 extern const uint8_t PICO_IPV6_ANY[PICO_SIZE_IP6];
 #endif
 
-static inline uint32_t pico_hash(const char *name)
+static inline uint32_t pico_hash(const void *buf, uint32_t size)
 {
     uint32_t hash = 5381;
-    uint8_t c;
-    while ((c = (uint8_t)*name++))
-        hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
+    uint32_t i;
+    const uint8_t *ptr= (const uint8_t *)buf;
+    for(i = 0; i < size; i++)
+        hash = ((hash << 5) + hash) + ptr[i]; /* hash * 33 + char */
     return hash;
 }