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:
154:6c0e92a80c4a
Parent:
152:a3d286bf94e5
--- a/modules/pico_igmp.c	Mon Sep 28 14:02:27 2015 +0200
+++ b/modules/pico_igmp.c	Mon Sep 28 14:14:17 2015 +0200
@@ -96,7 +96,6 @@
     uint8_t rsq;
     uint8_t qqic;
     uint16_t sources;
-    uint32_t source_addr[0];
 };
 
 PACKED_STRUCT_DEF igmpv3_group_record {
@@ -104,7 +103,6 @@
     uint8_t aux;
     uint16_t sources;
     uint32_t mcast_group;
-    uint32_t source_addr[0];
 };
 
 PACKED_STRUCT_DEF igmpv3_report {
@@ -113,7 +111,6 @@
     uint16_t crc;
     uint16_t res1;
     uint16_t groups;
-    struct igmpv3_group_record record[0];
 };
 
 struct igmp_parameters {
@@ -918,16 +915,17 @@
         report->res1 = 0;
         report->groups = short_be(1);
 
-        record = &report->record[0];
+        record = (struct igmpv3_group_record *)(((uint8_t *)report) + sizeof(struct igmpv3_report));
         record->type = record_type;
         record->aux = 0;
         record->sources = short_be(sources);
         record->mcast_group = p->mcast_group.addr;
         if (IGMPFilter && !pico_tree_empty(IGMPFilter)) {
+            uint32_t *source_addr = (uint32_t *)((uint8_t *)record + sizeof(struct igmpv3_group_record));
             i = 0;
             pico_tree_foreach(index, IGMPFilter)
             {
-                record->source_addr[i] = ((struct pico_ip4 *)index->keyValue)->addr;
+                source_addr[i] = ((struct pico_ip4 *)index->keyValue)->addr;
                 i++;
             }
         }