From 5bcaefddd49c824d95f97187e8877c9a2672fbef Mon Sep 17 00:00:00 2001 From: goldsimon Date: Thu, 28 Jul 2016 08:06:17 +0200 Subject: [PATCH] lwiperf: improved documentation, removed unused enum members --- src/apps/lwiperf/lwiperf.c | 8 ++++---- src/include/lwip/apps/lwiperf.h | 19 +++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/apps/lwiperf/lwiperf.c b/src/apps/lwiperf/lwiperf.c index cef0d728..06868676 100644 --- a/src/apps/lwiperf/lwiperf.c +++ b/src/apps/lwiperf/lwiperf.c @@ -1,17 +1,17 @@ /** * @file - * LWIP iperf server implementation + * lwIP iPerf server implementation */ /** * @defgroup iperf Iperf server * @ingroup apps * - * This is simple "Iperf" server to check your bandwith using Iperf on a PC as client. + * This is a simple performance measuring server to check your bandwith using + * iPerf2 on a PC as client. * It is currently a minimal implementation providing an IPv4 TCP server only. * - * @todo: - * - implement UDP mode + * @todo: implement UDP mode and IPv6 */ /* diff --git a/src/include/lwip/apps/lwiperf.h b/src/include/lwip/apps/lwiperf.h index 746c8247..7dbebb08 100644 --- a/src/include/lwip/apps/lwiperf.h +++ b/src/include/lwip/apps/lwiperf.h @@ -1,6 +1,6 @@ /** * @file - * IPERF implementation + * lwIP iPerf server implementation */ /* @@ -46,23 +46,26 @@ extern "C" { #define LWIPERF_TCP_PORT_DEFAULT 5001 +/** lwIPerf test results */ enum lwiperf_report_type { - LWIPERF_TCP_STARTED = 0, + /** The server side test is done */ LWIPERF_TCP_DONE_SERVER, + /** The client side test is done */ LWIPERF_TCP_DONE_CLIENT, + /** Local error lead to test abort */ LWIPERF_TCP_ABORTED_LOCAL, + /** Data check error lead to test abort */ LWIPERF_TCP_ABORTED_LOCAL_DATAERROR, + /** Transmit error lead to test abort */ LWIPERF_TCP_ABORTED_LOCAL_TXERROR, - LWIPERF_TCP_ABORTED_REMOTE, - LWIPERF_UDP_STARTED, - LWIPERF_UDP_DONE, - LWIPERF_UDP_ABORTED_LOCAL, - LWIPERF_UDP_ABORTED_REMOTE + /** Remote side aborted the test */ + LWIPERF_TCP_ABORTED_REMOTE }; /** Prototype of a report function that is called when a session is finished. - This report function can show the test results. */ + This report function can show the test results. + @param report_type contains the test result */ typedef void (*lwiperf_report_fn)(void *arg, enum lwiperf_report_type report_type, const ip_addr_t* local_addr, u16_t local_port, const ip_addr_t* remote_addr, u16_t remote_port, u32_t bytes_transferred, u32_t ms_duration, u32_t bandwidth_kbitpsec);