From 1f54dbb87f1924513d2708b621a1abcfcd1eb19b Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 11 Aug 2010 01:28:40 +0000 Subject: [PATCH] If DHCPC selected, show leased IP address git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2840 42af7a65-404d-4744-a932-0658087f49c3 --- examples/uip/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/uip/main.c b/examples/uip/main.c index 39f451a26cf..226e75c6949 100644 --- a/examples/uip/main.c +++ b/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 * * Based on uIP which also has a BSD style license: @@ -57,6 +57,9 @@ #include #include #include +#ifdef CONFIG_EXAMPLE_UIP_DHCPC +#include +#endif /* Here we include the header file for the application(s) we use in * our project as defined in the config//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