summaryrefslogtreecommitdiff
path: root/samples/net/dtls_client/src/dtls-client.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2016-02-16 16:37:09 +0200
committerGerrit Code Review <gerrit@zephyrproject.org>2016-02-19 12:35:12 +0000
commit3571e1f20a7403bc50c5194b874dcb26fc3a6bae (patch)
tree8d3924fea30dff899768b672ada474dc4b26277a /samples/net/dtls_client/src/dtls-client.c
parent050ec1355604014125f740546777f86990d3d272 (diff)
net: apps: Use IPv6 link local addresses in network apps
Use link local addresses instead of public IPv6 addresses in the demo applications. This way the application do not need to do any special setup. Change-Id: I9aa817c388e3f673a6597801813dd1d0a8feb6b5 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Diffstat (limited to 'samples/net/dtls_client/src/dtls-client.c')
-rw-r--r--samples/net/dtls_client/src/dtls-client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/samples/net/dtls_client/src/dtls-client.c b/samples/net/dtls_client/src/dtls-client.c
index 00ad12724..837a77369 100644
--- a/samples/net/dtls_client/src/dtls-client.c
+++ b/samples/net/dtls_client/src/dtls-client.c
@@ -90,10 +90,15 @@ static uint8_t peer_mac[] = { 0x15, 0x0a, 0xbe, 0xef, 0xf0, 0x0d };
static uint8_t my_mac[] = { 0x0a, 0xbe, 0xef, 0x15, 0xf0, 0x0d };
#ifdef CONFIG_NETWORKING_WITH_IPV6
+#if 0
/* 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 } } }
#else
+#define MY_IPADDR { { { 0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0, 0x17, 0x0a, 0xbe, 0xef, 0xf0, 0x0d, 0 } } }
+#define PEER_IPADDR { { { 0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0, 0x08, 0xbe, 0xef, 0x15, 0xf0, 0x0d, 0 } } }
+#endif
+#else /* ipv6 */
/* The 192.0.2.0/24 is the private address space for documentation RFC 5737 */
#define MY_IPADDR { { { 192, 0, 2, 2 } } }
#define PEER_IPADDR { { { 192, 0, 2, 1 } } }