summaryrefslogtreecommitdiffstats
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2010-08-11 01:28:40 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2010-08-11 01:28:40 +0000
commit7546f5580529b34d0ca0e85da123b8d137d56d58 (patch)
treee8b4e5cd48f70e255bd2368485659a2b522f8641 /nuttx
parent38fa0c6df473e1ff1827b8909cef296e9928d34f (diff)
If DHCPC selected, show leased IP address
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@2840 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/examples/uip/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nuttx/examples/uip/main.c b/nuttx/examples/uip/main.c
index 39f451a26c..226e75c694 100644
--- a/nuttx/examples/uip/main.c
+++ b/nuttx/examples/uip/main.c
@@ -1,7 +1,7 @@
/****************************************************************************
* examples/uip/main.c
*
- * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Based on uIP which also has a BSD style license:
@@ -57,6 +57,9 @@
#include <net/uip/uip.h>
#include <net/uip/uip-arp.h>
#include <net/uip/uip-lib.h>
+#ifdef CONFIG_EXAMPLE_UIP_DHCPC
+#include <arpa/inet.h>
+#endif
/* Here we include the header file for the application(s) we use in
* our project as defined in the config/<board-name>/defconfig file
@@ -193,6 +196,7 @@ int user_start(int argc, char *argv[])
resolv_conf(&ds.dnsaddr);
}
dhcpc_close(handle);
+ printf("IP: %s\n", inet_ntoa(ds.ipaddr));
}
#endif