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:
131:4758606c9316
--- a/modules/pico_dhcp_server.c	Wed Sep 25 12:20:39 2013 +0000
+++ b/modules/pico_dhcp_server.c	Thu Sep 26 07:05:22 2013 +0000
@@ -184,7 +184,7 @@
 
   optlen = PICO_DHCP_OPTLEN_MSGTYPE + PICO_DHCP_OPTLEN_SERVERID + PICO_DHCP_OPTLEN_LEASETIME + PICO_DHCP_OPTLEN_NETMASK + PICO_DHCP_OPTLEN_ROUTER 
           + PICO_DHCP_OPTLEN_BROADCAST + PICO_DHCP_OPTLEN_DNS + PICO_DHCP_OPTLEN_END;
-  hdr = pico_zalloc(sizeof(struct pico_dhcp_hdr) + optlen);
+  hdr = pico_zalloc(sizeof(struct pico_dhcp_hdr) + (uint32_t)optlen);
 
   hdr->op = PICO_DHCP_OP_REPLY;
   hdr->htype = PICO_DHCP_HTYPE_ETH;
@@ -206,17 +206,17 @@
   offset += pico_dhcp_opt_end(&hdr->options[offset]);
 
   destination.addr = hdr->yiaddr;
-  r = pico_socket_sendto(dhcpn->dhcps->s, hdr, sizeof(struct pico_dhcp_hdr) + optlen, &destination, PICO_DHCP_CLIENT_PORT);
+  r = pico_socket_sendto(dhcpn->dhcps->s, hdr, (int)(sizeof(struct pico_dhcp_hdr) + (uint32_t)optlen), &destination, PICO_DHCP_CLIENT_PORT);
   if (r < 0)
     dhcps_dbg("DHCP server WARNING: failure sending: %s!\n", strerror(pico_err));
 
   return;
 }
 
-static void pico_dhcp_server_recv(struct pico_socket *s, uint8_t *buf, int len)
+static void pico_dhcp_server_recv(struct pico_socket *s, uint8_t *buf, uint32_t len)
 {
   uint8_t msgtype = 0;
-  int optlen = len - sizeof(struct pico_dhcp_hdr);
+  int32_t optlen = (int32_t)(len - sizeof(struct pico_dhcp_hdr));
   struct pico_dhcp_hdr *hdr = (struct pico_dhcp_hdr *)buf;
   struct pico_dhcp_opt *opt = (struct pico_dhcp_opt *)hdr->options;
   struct pico_dhcp_server_negotiation *dhcpn = NULL;
@@ -298,7 +298,7 @@
   if (r < 0)
     return;
 
-  pico_dhcp_server_recv(s, buf, r);
+  pico_dhcp_server_recv(s, buf, (uint32_t)r);
   return;
 }