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: modules/pico_slaacv4.c
- Revision:
- 149:5f4cb161cec3
- Parent:
- 133:5b075f5e141a
- Child:
- 152:a3d286bf94e5
--- a/modules/pico_slaacv4.c Tue Mar 11 15:34:51 2014 +0100 +++ b/modules/pico_slaacv4.c Wed Apr 09 14:31:41 2014 +0200 @@ -38,7 +38,7 @@ }; struct slaacv4_cookie { - uint8_t state; + enum slaacv4_state state; uint8_t probe_try_nb; uint8_t conflict_nb; uint8_t announce_nb; @@ -85,12 +85,13 @@ tmp->timer = NULL; } -static void pico_slaacv4_send_announce_timer(pico_time __attribute__((unused)) now, void *arg) +static void pico_slaacv4_send_announce_timer(pico_time now, void *arg) { struct slaacv4_cookie *tmp = (struct slaacv4_cookie *)arg; struct pico_ip4 netmask = { - .addr = 0x0000FFFF + .addr = long_be(0xFFFF0000) }; + (void)now; if (tmp->announce_nb < ANNOUNCE_NB) { @@ -107,10 +108,10 @@ } } -static void pico_slaacv4_send_probe_timer(pico_time __attribute__((unused)) now, void *arg) +static void pico_slaacv4_send_probe_timer(pico_time now, void *arg) { - struct slaacv4_cookie *tmp = (struct slaacv4_cookie *)arg; + (void)now; if (tmp->probe_try_nb < PROBE_NB) { @@ -162,10 +163,15 @@ } -uint8_t pico_slaacv4_claimip(struct pico_device *dev, void (*cb)(struct pico_ip4 *ip, uint8_t code)) +int pico_slaacv4_claimip(struct pico_device *dev, void (*cb)(struct pico_ip4 *ip, uint8_t code)) { struct pico_ip4 ip; + if (!dev->eth) { + pico_err = PICO_ERR_EPROTONOSUPPORT; + return -1; + } + ip.addr = long_be(pico_slaacv4_getip(dev, 0)); pico_slaacv4_init_cookie(&ip, dev, &slaacv4_local, cb);