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.

Committer:
tass
Date:
Thu Jan 28 15:12:00 2016 +0100
Revision:
155:a70f34550c34
Parent:
152:a3d286bf94e5
Adding TCP flag for FIN.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tass 68:0847e35d08a6 1 /*********************************************************************
tass 152:a3d286bf94e5 2 PicoTCP. Copyright (c) 2012-2015 Altran Intelligent Systems. Some rights reserved.
TASS Belgium NV 131:4758606c9316 3 See LICENSE and COPYING for usage.
tass 68:0847e35d08a6 4
TASS Belgium NV 131:4758606c9316 5 *********************************************************************/
tass picotcp@tass.be 149:5f4cb161cec3 6 #ifndef INCLUDE_PICO_DEVICE
tass picotcp@tass.be 149:5f4cb161cec3 7 #define INCLUDE_PICO_DEVICE
tass 68:0847e35d08a6 8 #include "pico_queue.h"
tass 68:0847e35d08a6 9 #include "pico_frame.h"
tass 68:0847e35d08a6 10 #include "pico_addressing.h"
tass 68:0847e35d08a6 11 #include "pico_tree.h"
tass 152:a3d286bf94e5 12 extern struct pico_tree Device_tree;
tass picotcp@tass.be 149:5f4cb161cec3 13 #include "pico_ipv6_nd.h"
tass 68:0847e35d08a6 14 #define MAX_DEVICE_NAME 16
tass 68:0847e35d08a6 15
tass 68:0847e35d08a6 16
tass 68:0847e35d08a6 17 struct pico_ethdev {
TASS Belgium NV 131:4758606c9316 18 struct pico_eth mac;
tass 68:0847e35d08a6 19 };
tass 68:0847e35d08a6 20
tass 68:0847e35d08a6 21 struct pico_device {
TASS Belgium NV 131:4758606c9316 22 char name[MAX_DEVICE_NAME];
TASS Belgium NV 131:4758606c9316 23 uint32_t hash;
TASS Belgium NV 131:4758606c9316 24 uint32_t overhead;
tass 152:a3d286bf94e5 25 uint32_t mtu;
TASS Belgium NV 131:4758606c9316 26 struct pico_ethdev *eth; /* Null if non-ethernet */
TASS Belgium NV 131:4758606c9316 27 struct pico_queue *q_in;
TASS Belgium NV 131:4758606c9316 28 struct pico_queue *q_out;
tass 152:a3d286bf94e5 29 int (*link_state)(struct pico_device *self);
TASS Belgium NV 131:4758606c9316 30 int (*send)(struct pico_device *self, void *buf, int len); /* Send function. Return 0 if busy */
TASS Belgium NV 131:4758606c9316 31 int (*poll)(struct pico_device *self, int loop_score);
TASS Belgium NV 131:4758606c9316 32 void (*destroy)(struct pico_device *self);
TASS Belgium NV 131:4758606c9316 33 int (*dsr)(struct pico_device *self, int loop_score);
TASS Belgium NV 131:4758606c9316 34 int __serving_interrupt;
TASS Belgium NV 131:4758606c9316 35 /* used to signal the upper layer the number of events arrived since the last processing */
TASS Belgium NV 131:4758606c9316 36 volatile int eventCnt;
tass picotcp@tass.be 149:5f4cb161cec3 37 #ifdef PICO_SUPPORT_IPV6
tass picotcp@tass.be 149:5f4cb161cec3 38 struct pico_nd_hostvars hostvars;
tass picotcp@tass.be 149:5f4cb161cec3 39 #endif
tass 68:0847e35d08a6 40 };
tass 68:0847e35d08a6 41
tass 152:a3d286bf94e5 42
tass 68:0847e35d08a6 43 int pico_device_init(struct pico_device *dev, const char *name, uint8_t *mac);
tass 68:0847e35d08a6 44 void pico_device_destroy(struct pico_device *dev);
tass 68:0847e35d08a6 45 int pico_devices_loop(int loop_score, int direction);
TASS Belgium NV 131:4758606c9316 46 struct pico_device*pico_get_device(const char*name);
TASS Belgium NV 131:4758606c9316 47 int32_t pico_device_broadcast(struct pico_frame *f);
tass 152:a3d286bf94e5 48 int pico_device_link_state(struct pico_device *dev);
tass 152:a3d286bf94e5 49 int pico_device_ipv6_random_ll(struct pico_device *dev);
tass 152:a3d286bf94e5 50 #ifdef PICO_SUPPORT_IPV6
tass 152:a3d286bf94e5 51 struct pico_ipv6_link *pico_ipv6_link_add_local(struct pico_device *dev, const struct pico_ip6 *prefix);
tass 152:a3d286bf94e5 52 #endif
tass 68:0847e35d08a6 53
tass 68:0847e35d08a6 54 #endif