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 Sep 19 13:26:14 2013 +0000
Revision:
68:0847e35d08a6
Child:
70:cd218dd180e5
Imported from masterbranch, again

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tass 68:0847e35d08a6 1 /*********************************************************************
tass 68:0847e35d08a6 2 PicoTCP. Copyright (c) 2012 TASS Belgium NV. Some rights reserved.
tass 68:0847e35d08a6 3 See LICENSE and COPYING for usage.
tass 68:0847e35d08a6 4
tass 68:0847e35d08a6 5 *********************************************************************/
tass 68:0847e35d08a6 6 #ifndef _INCLUDE_PICO_STACK
tass 68:0847e35d08a6 7 #define _INCLUDE_PICO_STACK
tass 68:0847e35d08a6 8 #include "pico_config.h"
tass 68:0847e35d08a6 9 #include "pico_frame.h"
tass 68:0847e35d08a6 10
tass 68:0847e35d08a6 11 #define PICO_MAX_TIMERS 20
tass 68:0847e35d08a6 12
tass 68:0847e35d08a6 13 #define PICO_ETH_MTU 1514
tass 68:0847e35d08a6 14 #define PICO_IP_MTU 1500
tass 68:0847e35d08a6 15
tass 68:0847e35d08a6 16 /* ===== RECEIVING FUNCTIONS (from dev up to socket) ===== */
tass 68:0847e35d08a6 17
tass 68:0847e35d08a6 18 /* TRANSPORT LEVEL */
tass 68:0847e35d08a6 19 /* interface towards network */
tass 68:0847e35d08a6 20 int pico_transport_receive(struct pico_frame *f, uint8_t proto);
tass 68:0847e35d08a6 21
tass 68:0847e35d08a6 22 /* NETWORK LEVEL */
tass 68:0847e35d08a6 23 /* interface towards ethernet */
tass 68:0847e35d08a6 24 int pico_network_receive(struct pico_frame *f);
tass 68:0847e35d08a6 25
tass 68:0847e35d08a6 26 /* The pico_ethernet_receive() function is used by
tass 68:0847e35d08a6 27 * those devices supporting ETH in order to push packets up
tass 68:0847e35d08a6 28 * into the stack.
tass 68:0847e35d08a6 29 */
tass 68:0847e35d08a6 30 /* DATALINK LEVEL */
tass 68:0847e35d08a6 31 int pico_ethernet_receive(struct pico_frame *f);
tass 68:0847e35d08a6 32
tass 68:0847e35d08a6 33 /* LOWEST LEVEL: interface towards devices. */
tass 68:0847e35d08a6 34 /* Device driver will call this function which returns immediately.
tass 68:0847e35d08a6 35 * Incoming packet will be processed later on in the dev loop.
tass 68:0847e35d08a6 36 */
tass 68:0847e35d08a6 37 int pico_stack_recv(struct pico_device *dev, uint8_t *buffer, int len);
tass 68:0847e35d08a6 38
tass 68:0847e35d08a6 39
tass 68:0847e35d08a6 40 /* ===== SENDIING FUNCTIONS (from socket down to dev) ===== */
tass 68:0847e35d08a6 41
tass 68:0847e35d08a6 42 int pico_transport_send(struct pico_frame *f);
tass 68:0847e35d08a6 43 int pico_network_send(struct pico_frame *f);
tass 68:0847e35d08a6 44 int pico_ethernet_send(struct pico_frame *f);
tass 68:0847e35d08a6 45 int pico_sendto_dev(struct pico_frame *f);
tass 68:0847e35d08a6 46
tass 68:0847e35d08a6 47 /* ----- Initialization ----- */
tass 68:0847e35d08a6 48 void pico_stack_init(void);
tass 68:0847e35d08a6 49
tass 68:0847e35d08a6 50 /* ----- Loop Function. ----- */
tass 68:0847e35d08a6 51 void pico_stack_tick(void);
tass 68:0847e35d08a6 52 void pico_stack_loop(void);
tass 68:0847e35d08a6 53
tass 68:0847e35d08a6 54 /* ---- Notifications for stack errors */
tass 68:0847e35d08a6 55 int pico_notify_socket_unreachable(struct pico_frame *f);
tass 68:0847e35d08a6 56 int pico_notify_proto_unreachable(struct pico_frame *f);
tass 68:0847e35d08a6 57 int pico_notify_dest_unreachable(struct pico_frame *f);
tass 68:0847e35d08a6 58 int pico_notify_ttl_expired(struct pico_frame *f);
tass 68:0847e35d08a6 59
tass 68:0847e35d08a6 60 /* Various. */
tass 68:0847e35d08a6 61 int pico_source_is_local(struct pico_frame *f);
tass 68:0847e35d08a6 62 int pico_destination_is_local(struct pico_frame *f);
tass 68:0847e35d08a6 63 void pico_store_network_origin(void *src, struct pico_frame *f);
tass 68:0847e35d08a6 64 void pico_timer_add(unsigned long expire, void (*timer)(unsigned long, void *), void *arg);
tass 68:0847e35d08a6 65 uint32_t pico_rand(void);
tass 68:0847e35d08a6 66 void pico_rand_feed(uint32_t feed);
tass 68:0847e35d08a6 67
tass 68:0847e35d08a6 68 #endif