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_icmp4.h
- Revision:
- 152:a3d286bf94e5
- Parent:
- 149:5f4cb161cec3
--- a/modules/pico_icmp4.h Wed Apr 09 17:32:25 2014 +0200 +++ b/modules/pico_icmp4.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. . @@ -7,9 +7,11 @@ *********************************************************************/ #ifndef INCLUDE_PICO_ICMP4 #define INCLUDE_PICO_ICMP4 +#include "pico_defines.h" #include "pico_addressing.h" #include "pico_protocol.h" + extern struct pico_protocol pico_proto_icmp4; PACKED_STRUCT_DEF pico_icmp4_hdr { @@ -18,19 +20,19 @@ uint16_t crc; /* hun */ - union hun_u { + PACKED_UNION_DEF hun_u { uint8_t ih_pptr; struct pico_ip4 ih_gwaddr; - struct { + PEDANTIC_STRUCT_DEF ih_idseq_s { uint16_t idseq_id; uint16_t idseq_seq; } ih_idseq; uint32_t ih_void; - struct { + PEDANTIC_STRUCT_DEF ih_pmtu_s { uint16_t ipm_void; uint16_t ipm_nmtu; } ih_pmtu; - struct { + PEDANTIC_STRUCT_DEF ih_rta_s { uint8_t rta_numgw; uint8_t rta_wpa; uint16_t rta_lifetime; @@ -38,18 +40,18 @@ } hun; /* dun */ - union dun_u { - struct { + PACKED_UNION_DEF dun_u { + PEDANTIC_STRUCT_DEF id_ts_s { uint32_t ts_otime; uint32_t ts_rtime; uint32_t ts_ttime; } id_ts; - struct { + PEDANTIC_STRUCT_DEF id_ip_s { uint32_t ip_options; uint32_t ip_data_hi; uint32_t ip_data_lo; } id_ip; - struct { + PEDANTIC_STRUCT_DEF id_ra_s { uint32_t ira_addr; uint32_t ira_pref; } id_ra; @@ -137,13 +139,24 @@ int pico_icmp4_port_unreachable(struct pico_frame *f); int pico_icmp4_proto_unreachable(struct pico_frame *f); int pico_icmp4_dest_unreachable(struct pico_frame *f); +int pico_icmp4_mtu_exceeded(struct pico_frame *f); int pico_icmp4_ttl_expired(struct pico_frame *f); +int pico_icmp4_frag_expired(struct pico_frame *f); +int pico_icmp4_ping(char *dst, int count, int interval, int timeout, int size, void (*cb)(struct pico_icmp4_stats *)); +int pico_icmp4_ping_abort(int id); + +#ifdef PICO_SUPPORT_ICMP4 int pico_icmp4_packet_filtered(struct pico_frame *f); +int pico_icmp4_param_problem(struct pico_frame *f, uint8_t code); +#else +# define pico_icmp4_packet_filtered(f) (-1) +# define pico_icmp4_param_problem(f, c) (-1) +#endif /* PICO_SUPPORT_ICMP4 */ -int pico_icmp4_ping(char *dst, int count, int interval, int timeout, int size, void (*cb)(struct pico_icmp4_stats *)); #define PICO_PING_ERR_REPLIED 0 #define PICO_PING_ERR_TIMEOUT 1 #define PICO_PING_ERR_UNREACH 2 +#define PICO_PING_ERR_ABORTED 3 #define PICO_PING_ERR_PENDING 0xFFFF #endif