Most cosmetic changes to apps/examples/netloop
This commit is contained in:
parent
9191e22624
commit
84dbf4ee7c
@ -797,19 +797,22 @@ examples/netpkt
|
|||||||
examples/netloop
|
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
|
CONFIG_EXAMPLES_NETLOOP=y - Enables the nettest example
|
||||||
|
|
||||||
Dependencies:
|
Dependencies:
|
||||||
|
|
||||||
CONFIG_NSH_BUILTIN_APPS=n
|
CONFIG_NSH_BUILTIN_APPS=n - Does NOT work as an NSH built-in command
|
||||||
CONFIG_NET_LOOPBACK
|
CONFIG_NET_LOOPBACK - Requires local loopback supprt
|
||||||
CONFIG_NET_TCP
|
CONFIG_NET_TCP - Requires TCP support with the following:
|
||||||
CONFIG_NET_TCPBACKLOG
|
CONFIG_NET_TCPBACKLOG
|
||||||
CONFIG_NET_TCP_READAHEAD
|
CONFIG_NET_TCP_READAHEAD
|
||||||
CONFIG_NET_TCP_WRITE_BUFFERS
|
CONFIG_NET_TCP_WRITE_BUFFERS
|
||||||
CONFIG_NET_IPv4
|
CONFIG_NET_IPv4 - Currently supports only IPv4
|
||||||
|
|
||||||
examples/nettest
|
examples/nettest
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
|
@ -149,7 +149,7 @@ static inline bool net_incomingdata(struct net_listener_s *nls, int sd)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
nls->buffer[ret]='\0';
|
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 */
|
/* Echo the data back to the client */
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ static int lo_client(void)
|
|||||||
|
|
||||||
for (i = 0; ; i++)
|
for (i = 0; ; i++)
|
||||||
{
|
{
|
||||||
sprintf(outbuf, "Remote message %d", i);
|
sprintf(outbuf, "Loopback message %d", i);
|
||||||
len = strlen(outbuf);
|
len = strlen(outbuf);
|
||||||
|
|
||||||
printf("lo_client: Sending '%s' (%d bytes)\n", outbuf, len);
|
printf("lo_client: Sending '%s' (%d bytes)\n", outbuf, len);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user