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: stack/pico_socket.c
- Revision:
- 137:a1c8bfa9d691
- Parent:
- 134:cc4e6d2654d9
- Child:
- 138:0a7a449980e6
--- a/stack/pico_socket.c Fri Jan 17 10:13:51 2014 +0100 +++ b/stack/pico_socket.c Fri Feb 07 11:21:12 2014 +0100 @@ -702,6 +702,7 @@ #ifdef PICO_SUPPORT_TCP if(s->parent) s->parent->number_of_pending_conn--; + #endif s->state = PICO_SOCKET_STATE_CLOSED; @@ -2230,12 +2231,16 @@ return -1; /* if no activity, force the socket into closing state */ + /* DLA: Why? This seems off-specs. */ +#ifdef TCP_OFF_SPECS if( TCP_STATE(s) == PICO_SOCKET_STATE_TCP_ESTABLISHED ) { s->wakeup(PICO_SOCK_EV_CLOSE, s); pico_socket_close(s); s->timestamp = PICO_TIME_MS(); } + +#endif } return 0; @@ -2413,22 +2418,29 @@ if (s->wakeup) { /* dbg("SOCKET ERROR FROM ICMP NOTIFICATION. (icmp code= %d)\n\n", code); */ switch(code) { + case PICO_ICMP_UNREACH_NET: + pico_err = PICO_ERR_ENETUNREACH; + break; + + case PICO_ICMP_UNREACH_HOST: + pico_err = PICO_ERR_EHOSTUNREACH; + break; + case PICO_ICMP_UNREACH_PROTOCOL: - pico_err = PICO_ERR_EPROTO; + pico_err = PICO_ERR_ENOPROTOOPT; break; case PICO_ICMP_UNREACH_PORT: pico_err = PICO_ERR_ECONNREFUSED; break; - case PICO_ICMP_UNREACH_NET: case PICO_ICMP_UNREACH_NET_PROHIB: case PICO_ICMP_UNREACH_NET_UNKNOWN: pico_err = PICO_ERR_ENETUNREACH; break; default: - pico_err = PICO_ERR_EHOSTUNREACH; + pico_err = PICO_ERR_EOPNOTSUPP; } s->state |= PICO_SOCKET_STATE_SHUT_REMOTE; s->wakeup(PICO_SOCK_EV_ERR, s);