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_frame.h
- Revision:
- 152:a3d286bf94e5
- Parent:
- 149:5f4cb161cec3
--- a/include/pico_frame.h Wed Apr 09 17:32:25 2014 +0200 +++ b/include/pico_frame.h Mon Sep 28 13:16:18 2015 +0200 @@ -1,5 +1,5 @@ /********************************************************************* - PicoTCP. Copyright (c) 2012 TASS Belgium NV. Some rights reserved. + PicoTCP. Copyright (c) 2012-2015 Altran Intelligent Systems. Some rights reserved. See LICENSE and COPYING for usage. *********************************************************************/ @@ -8,8 +8,10 @@ #include "pico_config.h" -#define PICO_FRAME_FLAG_BCAST (0x01) -#define PICO_FRAME_FLAG_SACKED (0x80) +#define PICO_FRAME_FLAG_BCAST (0x01) +#define PICO_FRAME_FLAG_EXT_BUFFER (0x02) +#define PICO_FRAME_FLAG_EXT_USAGE_COUNTER (0x04) +#define PICO_FRAME_FLAG_SACKED (0x80) #define IS_BCAST(f) ((f->flags & PICO_FRAME_FLAG_BCAST) == PICO_FRAME_FLAG_BCAST) @@ -62,8 +64,8 @@ unsigned char *payload; uint16_t payload_len; -#ifdef PICO_SUPPORT_IPFRAG - /* Payload fragmentation info (big endian)*/ +#if defined(PICO_SUPPORT_IPV4FRAG) || defined(PICO_SUPPORT_IPV6FRAG) + /* Payload fragmentation info */ uint16_t frag; #endif @@ -76,6 +78,12 @@ /*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; + + /* Callback to notify listener when the buffer has been discarded */ + void (*notify_free)(uint8_t *); + + uint8_t send_ttl; /* Special TTL/HOPS value, 0 = auto assign */ + uint8_t send_tos; /* Type of service */ }; /** frame alloc/dealloc/copy **/ @@ -83,7 +91,8 @@ struct pico_frame *pico_frame_copy(struct pico_frame *f); struct pico_frame *pico_frame_deepcopy(struct pico_frame *f); struct pico_frame *pico_frame_alloc(uint32_t size); -struct pico_frame *pico_frame_alloc_skeleton(uint32_t size); +int pico_frame_grow(struct pico_frame *f, uint32_t size); +struct pico_frame *pico_frame_alloc_skeleton(uint32_t size, int ext_buffer); int pico_frame_skeleton_set_buffer(struct pico_frame *f, void *buf); uint16_t pico_checksum(void *inbuf, uint32_t len); uint16_t pico_dualbuffer_checksum(void *b1, uint32_t len1, void *b2, uint32_t len2);