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.
Dependents: HelloWizFi250Interface
Fork of NetworkSocketAPI by
Diff: NetworkInterface.cpp
- Revision:
- 95:b3c679f20d13
- Parent:
- 89:b1d417383c0d
- Child:
- 99:f51358e506c1
diff -r 644df37bb05b -r b3c679f20d13 NetworkInterface.cpp
--- a/NetworkInterface.cpp Tue Apr 19 18:23:58 2016 -0500
+++ b/NetworkInterface.cpp Tue Apr 19 18:24:24 2016 -0500
@@ -17,7 +17,14 @@
#include "DnsQuery.h"
#include "mbed.h"
-int NetworkInterface::gethostbyname(const char *name, char *dest)
+int NetworkInterface::gethostbyname(SocketAddress *address, const char *name)
{
- return dnsQuery(this, name, dest);
+ char buffer[NSAPI_IP_SIZE];
+ int err = dnsQuery(this, name, buffer);
+ if (err) {
+ return err;
+ }
+
+ address->set_ip_address(buffer);
+ return 0;
}
