Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of WIZnetInterface by
Revision 27:1169973d836c, committed 2015-10-05
- Comitter:
- hjjeon
- Date:
- Mon Oct 05 05:44:39 2015 +0000
- Parent:
- 26:d07c80e18b27
- Parent:
- 23:0c6cbce7c860
- Child:
- 28:200e63e513a8
- Commit message:
- Merged from branch.
Changed in this revision
--- a/EthernetInterface.cpp Mon Oct 05 05:41:00 2015 +0000
+++ b/EthernetInterface.cpp Mon Oct 05 05:44:39 2015 +0000
@@ -33,6 +33,14 @@
}
#endif
+int EthernetInterface::init()
+{
+ dhcp = true;
+ reset();
+
+ return 0;
+}
+
int EthernetInterface::init(uint8_t * mac)
{
dhcp = true;
--- a/EthernetInterface.h Mon Oct 05 05:41:00 2015 +0000 +++ b/EthernetInterface.h Mon Oct 05 05:44:39 2015 +0000 @@ -43,6 +43,7 @@ * Initialize the interface and configure it to use DHCP (no connection at this point). * \return 0 on success, a negative number on failure */ + int init(); //With DHCP int init(uint8_t * mac); //With DHCP /** Initialize the interface with a static IP address.
--- a/Socket/Endpoint.cpp Mon Oct 05 05:41:00 2015 +0000
+++ b/Socket/Endpoint.cpp Mon Oct 05 05:44:39 2015 +0000
@@ -41,6 +41,7 @@
}
uint32_t addr;
if (!eth->gethostbyname(host, &addr)) {
+ error("DNS error : Cannot get url from DNS server\r\n");
return -1;
}
snprintf(_ipAddress, sizeof(_ipAddress), "%d.%d.%d.%d", (addr>>24)&0xff, (addr>>16)&0xff, (addr>>8)&0xff, addr&0xff);
