From 84dbf4ee7c334e670e7055a6f9dd8efdcf6142bb Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 2 Sep 2015 18:30:12 -0600 Subject: [PATCH] Most cosmetic changes to apps/examples/netloop --- examples/README.txt | 13 ++++++++----- examples/netloop/lo_listener.c | 2 +- examples/netloop/lo_main.c | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/examples/README.txt b/examples/README.txt index 1185ccbda..4d2c2f1e1 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -797,19 +797,22 @@ examples/netpkt examples/netloop ^^^^^^^^^^^^^^^^ - This is a simple test of the netwok loopback device + This is a simple test of the netwok loopback device. examples/nettest can + also be configured to provide (better) test of local loopback transfers. + This version derives from examples/poll and is focused on testing poll() + with loopback devices. CONFIG_EXAMPLES_NETLOOP=y - Enables the nettest example Dependencies: - CONFIG_NSH_BUILTIN_APPS=n - CONFIG_NET_LOOPBACK - CONFIG_NET_TCP + CONFIG_NSH_BUILTIN_APPS=n - Does NOT work as an NSH built-in command + CONFIG_NET_LOOPBACK - Requires local loopback supprt + CONFIG_NET_TCP - Requires TCP support with the following: CONFIG_NET_TCPBACKLOG CONFIG_NET_TCP_READAHEAD CONFIG_NET_TCP_WRITE_BUFFERS - CONFIG_NET_IPv4 + CONFIG_NET_IPv4 - Currently supports only IPv4 examples/nettest ^^^^^^^^^^^^^^^^ diff --git a/examples/netloop/lo_listener.c b/examples/netloop/lo_listener.c index 32c280ce0..3397ad364 100644 --- a/examples/netloop/lo_listener.c +++ b/examples/netloop/lo_listener.c @@ -149,7 +149,7 @@ static inline bool net_incomingdata(struct net_listener_s *nls, int sd) else { nls->buffer[ret]='\0'; - printf("poll_listener: Read '%s' (%d bytes)\n", nls->buffer, ret); + printf("lo_listener: Read '%s' (%d bytes)\n", nls->buffer, ret); /* Echo the data back to the client */ diff --git a/examples/netloop/lo_main.c b/examples/netloop/lo_main.c index 1dc9b2731..1c7b5e866 100644 --- a/examples/netloop/lo_main.c +++ b/examples/netloop/lo_main.c @@ -111,7 +111,7 @@ static int lo_client(void) for (i = 0; ; i++) { - sprintf(outbuf, "Remote message %d", i); + sprintf(outbuf, "Loopback message %d", i); len = strlen(outbuf); printf("lo_client: Sending '%s' (%d bytes)\n", outbuf, len);