summaryrefslogtreecommitdiff
path: root/nuttx/examples
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/examples')
-rw-r--r--nuttx/examples/nettest/Makefile11
-rw-r--r--nuttx/examples/nettest/host.c2
-rw-r--r--nuttx/examples/nettest/nettest-client.c6
-rw-r--r--nuttx/examples/nettest/nettest-server.c6
-rw-r--r--nuttx/examples/nettest/nettest.c2
-rw-r--r--nuttx/examples/nettest/nettest.h4
6 files changed, 16 insertions, 15 deletions
diff --git a/nuttx/examples/nettest/Makefile b/nuttx/examples/nettest/Makefile
index 185b5b669..55cb4d30f 100644
--- a/nuttx/examples/nettest/Makefile
+++ b/nuttx/examples/nettest/Makefile
@@ -42,7 +42,7 @@ TARG_ASRCS =
TARG_AOBJS = $(TARG_ASRCS:.S=$(OBJEXT))
TARG_CSRCS = nettest.c
-ifeq ($(CONFIG_NETTEST_SERVER),y)
+ifeq ($(CONFIG_EXAMPLE_NETTEST_SERVER),y)
TARG_CSRCS += nettest-server.c
else
TARG_CSRCS += nettest-client.c
@@ -55,13 +55,14 @@ TARG_OBJS = $(TARG_AOBJS) $(TARG_COBJS)
TARG_BIN = lib$(CONFIG_EXAMPLE)$(LIBEXT)
-HOSTCFLAGS += -DCONFIG_NETTEST_HOST=1
-ifeq ($(CONFIG_NETTEST_SERVER),y)
-HOSTCFLAGS += -DCONFIG_NETTEST_SERVER=1
+HOSTCFLAGS += -DCONFIG_EXAMPLE_NETTEST_HOST=1
+ifeq ($(CONFIG_EXAMPLE_NETTEST_SERVER),y)
+HOSTCFLAGS += -DCONFIG_EXAMPLE_NETTEST_SERVER=1 \
+ -DCONFIG_EXAMPLE_NETTEST_CLIENTIP="$(CONFIG_EXAMPLE_NETTEST_CLIENTIP)"
endif
HOST_SRCS = host.c
-ifeq ($(CONFIG_NETTEST_SERVER),y)
+ifeq ($(CONFIG_EXAMPLE_NETTEST_SERVER),y)
HOST_SRCS += nettest-client.c
else
HOST_SRCS += nettest-server.c
diff --git a/nuttx/examples/nettest/host.c b/nuttx/examples/nettest/host.c
index 0d59b1abf..8b0bffd7d 100644
--- a/nuttx/examples/nettest/host.c
+++ b/nuttx/examples/nettest/host.c
@@ -53,7 +53,7 @@
int main(int argc, char **argv, char **envp)
{
-#ifdef CONFIG_NETTEST_SERVER
+#ifdef CONFIG_EXAMPLE_NETTEST_SERVER
send_client();
#else
recv_server();
diff --git a/nuttx/examples/nettest/nettest-client.c b/nuttx/examples/nettest/nettest-client.c
index a38ff0049..cb086059c 100644
--- a/nuttx/examples/nettest/nettest-client.c
+++ b/nuttx/examples/nettest/nettest-client.c
@@ -57,12 +57,12 @@ void send_client(void)
{
struct sockaddr_in myaddr;
char outbuf[SENDSIZE];
-#ifndef CONFIG_NETTEST_PERFORMANCE
+#ifndef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
char inbuf[SENDSIZE];
#endif
int sockfd;
int nbytessent;
-#ifndef CONFIG_NETTEST_PERFORMANCE
+#ifndef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
int nbytesrecvd;
#endif
int ch;
@@ -107,7 +107,7 @@ void send_client(void)
}
}
-#ifdef CONFIG_NETTEST_PERFORMANCE
+#ifdef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
/* Then receive messages forever */
for (;;)
diff --git a/nuttx/examples/nettest/nettest-server.c b/nuttx/examples/nettest/nettest-server.c
index 98b1cc98f..d00498f4e 100644
--- a/nuttx/examples/nettest/nettest-server.c
+++ b/nuttx/examples/nettest/nettest-server.c
@@ -63,7 +63,7 @@ void recv_server(void)
int acceptsd;
socklen_t addrlen;
int nbytesread;
-#ifndef CONFIG_NETTEST_PERFORMANCE
+#ifndef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
int totalbytesread;
int nbytessent;
int ch;
@@ -133,7 +133,7 @@ void recv_server(void)
}
#endif
-#ifdef CONFIG_NETTEST_PERFORMANCE
+#ifdef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
/* Then receive data forever */
for (;;)
@@ -194,7 +194,7 @@ void recv_server(void)
}
}
-#ifdef CONFIG_NETTEST_HOST
+#ifdef CONFIG_EXAMPLE_NETTEST_HOST
/* At present, data received by the target before it is completed the
* the write opertion and started the read operation results in a failure
* (the data is not received, but it is ACKed). This will have to be
diff --git a/nuttx/examples/nettest/nettest.c b/nuttx/examples/nettest/nettest.c
index c015696f1..1a6a59047 100644
--- a/nuttx/examples/nettest/nettest.c
+++ b/nuttx/examples/nettest/nettest.c
@@ -94,7 +94,7 @@ int user_start(int argc, char *argv[])
addr.s_addr = HTONL(CONFIG_EXAMPLE_NETTEST_NETMASK);
uip_setnetmask("eth0", &addr);
-#ifdef CONFIG_NETTEST_SERVER
+#ifdef CONFIG_EXAMPLE_NETTEST_SERVER
recv_server();
#else
send_client();
diff --git a/nuttx/examples/nettest/nettest.h b/nuttx/examples/nettest/nettest.h
index 9fe735911..eb7c83c84 100644
--- a/nuttx/examples/nettest/nettest.h
+++ b/nuttx/examples/nettest/nettest.h
@@ -40,7 +40,7 @@
* Included Files
****************************************************************************/
-#ifdef CONFIG_NETTEST_HOST
+#ifdef CONFIG_EXAMPLE_NETTEST_HOST
#else
# include <debug.h>
#endif
@@ -49,7 +49,7 @@
* Definitions
****************************************************************************/
-#ifdef CONFIG_NETTEST_HOST
+#ifdef CONFIG_EXAMPLE_NETTEST_HOST
/* HTONS/L macros are unique to uIP */
# define HTONS(a) htons(a)