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:
131:4758606c9316
Parent:
128:ae39e6e81531
Child:
149:5f4cb161cec3
--- a/include/pico_frame.h	Wed Dec 11 07:20:17 2013 +0000
+++ b/include/pico_frame.h	Mon Dec 16 11:25:54 2013 +0100
@@ -1,8 +1,8 @@
 /*********************************************************************
-PicoTCP. Copyright (c) 2012 TASS Belgium NV. Some rights reserved.
-See LICENSE and COPYING for usage.
+   PicoTCP. Copyright (c) 2012 TASS Belgium NV. Some rights reserved.
+   See LICENSE and COPYING for usage.
 
-*********************************************************************/
+ *********************************************************************/
 #ifndef _INCLUDE_PICO_FRAME
 #define _INCLUDE_PICO_FRAME
 #include "pico_config.h"
@@ -18,63 +18,64 @@
 
 struct pico_frame {
 
-  /* Connector for queues */
-  struct pico_frame *next;
+    /* Connector for queues */
+    struct pico_frame *next;
 
-  /* Start of the whole buffer, total frame length. */
-  unsigned char *buffer;
-  uint32_t      buffer_len;
+    /* Start of the whole buffer, total frame length. */
+    unsigned char *buffer;
+    uint32_t buffer_len;
 
-  /* For outgoing packets: this is the meaningful buffer. */
-  unsigned char *start;
-  uint32_t      len;
+    /* For outgoing packets: this is the meaningful buffer. */
+    unsigned char *start;
+    uint32_t len;
 
-  /* Pointer to usage counter */
-  uint32_t *usage_count;
+    /* Pointer to usage counter */
+    uint32_t *usage_count;
 
-  /* Pointer to protocol headers */
-  uint8_t *datalink_hdr;
+    /* Pointer to protocol headers */
+    uint8_t *datalink_hdr;
 
-  uint8_t *net_hdr;
-  uint16_t net_len;
-  uint8_t *transport_hdr;
-  uint16_t transport_len;
-  uint8_t *app_hdr;
-  uint16_t app_len;
+    uint8_t *net_hdr;
+    uint16_t net_len;
+    uint8_t *transport_hdr;
+    uint16_t transport_len;
+    uint8_t *app_hdr;
+    uint16_t app_len;
 
-  /* Pointer to the phisical device this packet belongs to.
-   * Should be valid in both routing directions
-   */
-  struct pico_device *dev;
+    /* Pointer to the phisical device this packet belongs to.
+     * Should be valid in both routing directions
+     */
+    struct pico_device *dev;
 
-  pico_time timestamp;
+    pico_time timestamp;
 
-  /* Failures due to bad datalink addressing. */
-  uint16_t failure_count;
+    /* Failures due to bad datalink addressing. */
+    uint16_t failure_count;
 
-  /* Protocol over IP */
-  uint8_t  proto;
+    /* Protocol over IP */
+    uint8_t proto;
 
-  /* PICO_FRAME_FLAG_* */
-  uint8_t flags;
+    /* PICO_FRAME_FLAG_* */
+    uint8_t flags;
 
-  /* Pointer to payload */
-  unsigned char *payload;
-  uint16_t payload_len;
+    /* Pointer to payload */
+    unsigned char *payload;
+    uint16_t payload_len;
 
 #ifdef PICO_SUPPORT_IPFRAG
-  /* Payload fragmentation info (big endian)*/
-  uint16_t frag;
+    /* Payload fragmentation info (big endian)*/
+    uint16_t frag;
 #endif
 
-  /* Pointer to socket */
-  struct pico_socket *sock;
+    /* Pointer to socket */
+    struct pico_socket *sock;
 
-  /* Pointer to transport info, used to store remote UDP duple (IP + port) */
-  void *info;
+    /* Pointer to transport info, used to store remote UDP duple (IP + port) */
+    void *info;
 
-  /*Priority. "best-effort" priority, the default value is 0. Priority can be in between -10 and +10*/
-  int8_t priority;
+    /*Priority. "best-effort" priority, the default value is 0. Priority can be in between -10 and +10*/
+    int8_t priority;
+    uint8_t transport_flags_saved;
 };
 
 /** frame alloc/dealloc/copy **/
@@ -87,9 +88,10 @@
 
 static inline int pico_is_digit(char c)
 {
-  if (c < '0' || c > '9')
-    return 0;
-  return 1;
+    if (c < '0' || c > '9')
+        return 0;
+
+    return 1;
 }
 
 #endif