diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2010-08-11 01:28:40 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2010-08-11 01:28:40 +0000 |
commit | 7546f5580529b34d0ca0e85da123b8d137d56d58 (patch) | |
tree | e8b4e5cd48f70e255bd2368485659a2b522f8641 /nuttx | |
parent | 38fa0c6df473e1ff1827b8909cef296e9928d34f (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.c | 6 |
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 |