Skip to content
Snippets Groups Projects
Commit 1f54dbb8 authored by patacongo's avatar patacongo
Browse files

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
parent f71c623c
No related branches found
No related tags found
No related merge requests found
/****************************************************************************
* 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment