Skip to content
Permalink
Browse files

Fix compiling lwiperf_example.c with TCP disabled

  • Loading branch information...
goldsimon committed Sep 24, 2018
1 parent 866db8b commit 35b011d4cf4c4b480f8859c456587a884ec9d287
Showing with 4 additions and 0 deletions.
  1. +4 −0 examples/lwiperf/lwiperf_example.c
@@ -30,6 +30,7 @@
#include "lwip/apps/lwiperf.h"
#include "lwiperf_example.h"

#if LWIP_TCP
static void
lwiperf_report(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,
@@ -42,9 +43,12 @@ lwiperf_report(void *arg, enum lwiperf_report_type report_type,
printf("IPERF report: type=%d, remote: %s:%d, total bytes: %"U32_F", duration in ms: %"U32_F", kbits/s: %"U32_F"\n",
(int)report_type, ipaddr_ntoa(remote_addr), (int)remote_port, bytes_transferred, ms_duration, bandwidth_kbitpsec);
}
#endif /* LWIP_TCP */

void
lwiperf_example_init(void)
{
#if LWIP_TCP
lwiperf_start_tcp_server_default(lwiperf_report, NULL);
#endif
}

0 comments on commit 35b011d

Please sign in to comment.
You can’t perform that action at this time.