Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ int main() {
}

// Show the network address
const char *ip = net->get_ip_address();
const char *netmask = net->get_netmask();
const char *gateway = net->get_gateway();
printf("IP address: %s\n", ip ? ip : "None");
printf("Netmask: %s\n", netmask ? netmask : "None");
printf("Gateway: %s\n", gateway ? gateway : "None");
SocketAddress a;
net->get_ip_address(&a);
printf("IP address: %s\n", a.get_ip_address() ? a.get_ip_address() : "None");
net->get_netmask(&a);
printf("Netmask: %s\n", a.get_ip_address() ? a.get_ip_address() : "None");
net->get_gateway(&a);
printf("Gateway: %s\n", a.get_ip_address() ? a.get_ip_address() : "None");

// Open a socket on the network interface, and create a TCP connection to ifconfig.io
TCPSocket socket;
Expand Down
2 changes: 1 addition & 1 deletion mbed-os.lib
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/ARMmbed/mbed-os/#51d55508e8400b60af467005646c4e2164738d48
https://github.com/ARMmbed/mbed-os/#64853b354fa188bfe8dbd51e78771213c7ed37f7