diff options
author | Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com> | 2016-02-02 15:18:01 +0200 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2016-02-05 20:25:32 -0500 |
commit | a4963cea3570053036e4d0cdda540a266fa4ae18 (patch) | |
tree | 5ead36e7786cb372f65b03f57770dc558cc981aa /samples | |
parent | 838961af9a4ac234927907b8269d551947cd1d39 (diff) |
net: apps: Update echo-server and echo-client IPv6 address
Address configurations for different Kconfig options is difficult
to test under different environments. Make it simple at the moment.
Change-Id: I689649b11b4ccb1cf1ff0e90720fa03b6dc3656b
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Diffstat (limited to 'samples')
-rw-r--r-- | samples/net/echo_client/src/echo-client.c | 28 | ||||
-rw-r--r-- | samples/net/echo_server/src/echo-server.c | 2 |
2 files changed, 4 insertions, 26 deletions
diff --git a/samples/net/echo_client/src/echo-client.c b/samples/net/echo_client/src/echo-client.c index 75999d89b..6ccf55fd0 100644 --- a/samples/net/echo_client/src/echo-client.c +++ b/samples/net/echo_client/src/echo-client.c @@ -63,39 +63,17 @@ static const char *lorem_ipsum = static int expecting; static int ipsum_len; -#ifdef CONFIG_NETWORKING_WITH_15_4_LOOPBACK_UART -/* If we are running this with echo-server running in another - * qemu, then set the mac addresses differently. - */ -static uint8_t peer_mac[] = { 0x0a, 0xbe, 0xef, 0x15, 0xf0, 0x0d }; -static uint8_t my_mac[] = { 0x15, 0x0a, 0xbe, 0xef, 0xf0, 0x0d }; -#else /* The peer is the server in our case. Just invent a mac * address for it because lower parts of the stack cannot set it * in this test as we do not have any radios. */ -static uint8_t peer_mac[] = { 0x15, 0x0a, 0xbe, 0xef, 0xf0, 0x0d }; - -/* This is my mac address - */ -static uint8_t my_mac[] = { 0x0a, 0xbe, 0xef, 0x15, 0xf0, 0x0d }; -#endif +static uint8_t peer_mac[] = { 0x0a, 0xbe, 0xef, 0x15, 0xf0, 0x0d }; +static uint8_t my_mac[] = { 0x15, 0x0a, 0xbe, 0xef, 0xf0, 0x0d }; #ifdef CONFIG_NETWORKING_WITH_IPV6 - -#ifdef CONFIG_NETWORKING_WITH_15_4_LOOPBACK_UART -/* Reverse the addresses if we are connected to echo-server that is - * running in qemu - */ -#define PEER_IPADDR { { { 0x20,0x01,0x0d,0xb8,0,0,0,0,0,0,0,0,0,0,0,0x2 } } } -#define MY_IPADDR { { { 0x20,0x01,0x0d,0xb8,0,0,0,0,0,0,0,0,0,0,0,0x1 } } } -#else /* The 2001:db8::/32 is the private address space for documentation RFC 3849 */ -#define MY_IPADDR { { { 0x20,0x01,0x0d,0xb8,0,0,0,0,0,0,0,0,0,0,0,0x2 } } } - #define PEER_IPADDR { { { 0x20,0x01,0x0d,0xb8,0,0,0,0,0,0,0,0,0,0,0,0x1 } } } -#endif /* CONFIG_NETWORKING_WITH_15_4_LOOPBACK_UART */ - +#define MY_IPADDR { { { 0x20,0x01,0x0d,0xb8,0,0,0,0,0,0,0,0,0,0,0,0x2 } } } /* admin-local, dynamically allocated multicast address */ #define MCAST_IPADDR { { { 0xff,0x84,0,0,0,0,0,0,0,0,0,0,0,0,0,0x2 } } } diff --git a/samples/net/echo_server/src/echo-server.c b/samples/net/echo_server/src/echo-server.c index 114821916..88618e5f4 100644 --- a/samples/net/echo_server/src/echo-server.c +++ b/samples/net/echo_server/src/echo-server.c @@ -50,7 +50,7 @@ static uint8_t my_mac[] = { 0x0a, 0xbe, 0xef, 0x15, 0xf0, 0x0d }; #ifdef CONFIG_NETWORKING_WITH_IPV6 /* The 2001:db8::/32 is the private address space for documentation RFC 3849 */ -#define MY_IPADDR { { { 0x20,0x01,0x0d,0xb8,0,0,0,0,0,0,0,0,0,0,0,0x2 } } } +#define MY_IPADDR { { { 0x20,0x01,0x0d,0xb8,0,0,0,0,0,0,0,0,0,0,0,0x1 } } } /* admin-local, dynamically allocated multicast address */ #define MCAST_IPADDR { { { 0xff,0x84,0,0,0,0,0,0,0,0,0,0,0,0,0,0x2 } } } |