examples/nettest: Fixes for building with loopback device again after the last changes.
This commit is contained in:
parent
54d55cb307
commit
3c97bfeae6
@ -960,6 +960,13 @@ examples/nettest
|
||||
CONFIG_EXAMPLES_NETTEST=y - Enables the nettest example
|
||||
CONFIG_EXAMPLES_NETLIB=y - The networking library in needed.
|
||||
|
||||
Configurations:
|
||||
|
||||
- Server on target hardware; client on host
|
||||
- Client on target hardware; Server on host
|
||||
- Server and Client on different targets.
|
||||
- Loopback configuration with both client and server on the same target.
|
||||
|
||||
See also examples/tcpecho
|
||||
|
||||
examples/nrf24l01_term
|
||||
@ -2106,6 +2113,12 @@ examples/udp
|
||||
|
||||
CONFIG_NETUTILS_NETLIB=y
|
||||
|
||||
Possible configurations:
|
||||
|
||||
- Server on target hardware; client on host
|
||||
- Client on target hardware; Server on host
|
||||
- Server and Client on different targets.
|
||||
|
||||
examples/udpblaster
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -78,14 +78,17 @@ config EXAMPLES_NETTEST_STACKSIZE2
|
||||
default 2048
|
||||
|
||||
endif # EXAMPLES_NETTEST_TARGET2
|
||||
endif # !EXAMPLES_NETTEST_LOOPBACK
|
||||
|
||||
if EXAMPLES_NETTEST_LOOPBACK
|
||||
config EXAMPLES_NETTEST_DAEMON_STACKSIZE
|
||||
int "Server daemon stack size"
|
||||
default 2048
|
||||
|
||||
config EXAMPLES_NETTEST_DEAMON_PRIORITY
|
||||
config EXAMPLES_NETTEST_DAEMON_PRIORITY
|
||||
int "Server daemon priority"
|
||||
default 100
|
||||
#endif
|
||||
|
||||
endif # EXAMPLES_NETTEST_LOOPBACK
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* examples/nettest/nettest-client.c
|
||||
* examples/nettest/nettest_client.c
|
||||
*
|
||||
* Copyright (C) 2007, 2011-2012, 2015 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
@ -120,7 +120,7 @@ void recv_server(void)
|
||||
#endif
|
||||
addrlen = sizeof(struct sockaddr_in6);
|
||||
|
||||
printf("Binding to IPv6 Address: %04x:04x:04x:04x:04x:04x:04x:04x\n",
|
||||
printf("Binding to IPv6 Address: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
|
||||
myaddr.sin6_addr.s6_addr16[0], myaddr.sin6_addr.s6_addr16[1],
|
||||
myaddr.sin6_addr.s6_addr16[2], myaddr.sin6_addr.s6_addr16[3],
|
||||
myaddr.sin6_addr.s6_addr16[4], myaddr.sin6_addr.s6_addr16[5],
|
||||
|
@ -49,6 +49,18 @@
|
||||
|
||||
#include "nettest.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_NETTEST_LOOPBACK
|
||||
static int server_child(int argc, char *argv[])
|
||||
{
|
||||
recv_server();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
@ -117,7 +117,6 @@ static const uint16_t g_ipv6_netmask[8] =
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_NETTEST_INIT
|
||||
void nettest_initialize(void)
|
||||
{
|
||||
#ifndef CONFIG_EXAMPLES_NETTEST_IPv6
|
||||
@ -188,16 +187,6 @@ void nettest_initialize(void)
|
||||
|
||||
#endif /* CONFIG_EXAMPLES_NETTEST_IPv6 */
|
||||
}
|
||||
#endif /*CONFIG_EXAMPLES_NETTEST_INIT */
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_NETTEST_LOOPBACK
|
||||
static int server_child(int argc, char *argv[])
|
||||
{
|
||||
recv_server();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* CONFIG_EXAMPLES_NETTEST_INIT */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user