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 RTOSgeneric mbed Ethernet driverhigh performance NXP LPC1768 specific Ethernet driverMulti-threading support for mbed RTOSBerkeley sockets and integration with the New Socket APIFork of the apps running on top of the New Socket APIScheduling 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.
Diff: include/pico_stack.h
- Revision:
- 149:5f4cb161cec3
- Parent:
- 137:a1c8bfa9d691
- Child:
- 152:a3d286bf94e5
--- a/include/pico_stack.h Tue Mar 11 15:34:51 2014 +0100 +++ b/include/pico_stack.h Wed Apr 09 14:31:41 2014 +0200 @@ -3,12 +3,12 @@ See LICENSE and COPYING for usage. *********************************************************************/ -#ifndef _INCLUDE_PICO_STACK -#define _INCLUDE_PICO_STACK +#ifndef INCLUDE_PICO_STACK +#define INCLUDE_PICO_STACK #include "pico_config.h" #include "pico_frame.h" -#define PICO_MAX_TIMERS 10 +#define PICO_MAX_TIMERS 20 #define PICO_ETH_MTU 1514 #define PICO_IP_MTU 1500u @@ -33,19 +33,21 @@ /* LOWEST LEVEL: interface towards devices. */ /* Device driver will call this function which returns immediately. * Incoming packet will be processed later on in the dev loop. + * The zerocopy version will associate the current buffer to the newly created frame. + * Warning: the buffer used in the zerocopy version MUST have been allocated using PICO_ZALLOC() */ int32_t pico_stack_recv(struct pico_device *dev, uint8_t *buffer, uint32_t len); +int32_t pico_stack_recv_zerocopy(struct pico_device *dev, uint8_t *buffer, uint32_t len); /* ===== SENDIING FUNCTIONS (from socket down to dev) ===== */ -int32_t pico_transport_send(struct pico_frame *f); int32_t pico_network_send(struct pico_frame *f); int32_t pico_ethernet_send(struct pico_frame *f); int32_t pico_sendto_dev(struct pico_frame *f); /* ----- Initialization ----- */ -void pico_stack_init(void); +int pico_stack_init(void); /* ----- Loop Function. ----- */ void pico_stack_tick(void); @@ -60,7 +62,6 @@ /* Various. */ struct pico_timer; int pico_source_is_local(struct pico_frame *f); -int pico_destination_is_local(struct pico_frame *f); void pico_store_network_origin(void *src, struct pico_frame *f); struct pico_timer *pico_timer_add(pico_time expire, void (*timer)(pico_time, void *), void *arg); void pico_timer_cancel(struct pico_timer *t);