diff options
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 39f451a26..226e75c69 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 |