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:
51:ab4529a384a6
Parent:
3:b4047e8a0123
Child:
63:97f481e33cb2
--- a/stack/pico_arp.c	Tue Aug 06 08:04:03 2013 +0000
+++ b/stack/pico_arp.c	Mon Sep 02 08:02:21 2013 +0000
@@ -20,9 +20,9 @@
 #define PICO_ARP_RETRY 300
 
 #ifdef DEBUG_ARP
-    #define arp_dbg dbg
+	#define arp_dbg dbg
 #else
-    #define arp_dbg(...) do{}while(0)
+	#define arp_dbg(...) do{}while(0)
 #endif
 
 static struct pico_queue pending;
@@ -31,6 +31,8 @@
 void check_pending(unsigned long now, void *_unused)
 {
   struct pico_frame *f = pico_dequeue(&pending);
+  IGNORE_PARAMETER(now);
+  IGNORE_PARAMETER(_unused);
   if (!f) {
     pending_timer_on = 0;
     return;
@@ -80,7 +82,7 @@
 
 static int arp_compare(void * ka, void * kb)
 {
-    struct pico_arp *a = ka, *b = kb;
+	struct pico_arp *a = ka, *b = kb;
   if (a->ipv4.addr < b->ipv4.addr)
     return -1;
   else if (a->ipv4.addr > b->ipv4.addr)
@@ -109,7 +111,7 @@
   struct pico_arp* search;
   struct pico_tree_node * index;
   pico_tree_foreach(index,&arp_tree){
-      search = index->keyValue;
+  	search = index->keyValue;
     if(memcmp(&(search->eth.addr), &dst->addr, 6) == 0)
       return &search->ipv4;
   }
@@ -164,7 +166,7 @@
   struct pico_tree_node * index;
 
   pico_tree_foreach(index,&arp_tree) {
-      a = index->keyValue;
+  	a = index->keyValue;
     arp_dbg("ARP to  %08x, mac: %02x:%02x:%02x:%02x:%02x:%02x\n", a->ipv4.addr,a->eth.addr[0],a->eth.addr[1],a->eth.addr[2],a->eth.addr[3],a->eth.addr[4],a->eth.addr[5] );
   }
 }
@@ -173,6 +175,7 @@
 void arp_expire(unsigned long now, void *_stale)
 {
   struct pico_arp *stale = (struct pico_arp *) _stale;
+  IGNORE_PARAMETER(now);
   stale->arp_status = PICO_ARP_STATUS_STALE;
   arp_dbg("ARP: Setting arp_status to STALE\n");
   pico_arp_query(stale->dev, &stale->ipv4);
@@ -191,18 +194,18 @@
 
 int pico_arp_create_entry(uint8_t* hwaddr, struct pico_ip4 ipv4, struct pico_device* dev)
 {
-    struct pico_arp* arp = pico_zalloc(sizeof(struct pico_arp));
-    if(!arp){
-        pico_err = PICO_ERR_ENOMEM;
-        return -1;
-    }
-    memcpy(arp->eth.addr, hwaddr, 6);
-    arp->ipv4.addr = ipv4.addr;
-    arp->dev = dev;
+	struct pico_arp* arp = pico_zalloc(sizeof(struct pico_arp));
+	if(!arp){
+		pico_err = PICO_ERR_ENOMEM;
+		return -1;
+	}
+	memcpy(arp->eth.addr, hwaddr, 6);
+	arp->ipv4.addr = ipv4.addr;
+	arp->dev = dev;
 
-    pico_arp_add_entry(arp);
+	pico_arp_add_entry(arp);
 
-    return 0;
+	return 0;
 }
 
 int pico_arp_receive(struct pico_frame *f)