A new object oriented network api that can be used to replace the one provided by the EthernetInterface library.
Dependents: NetRelais TCP_Client_Example TCP_Server_Example UDP_Server_Example ... more
address example
#include "mbed.h" #include "EthernetInterface.h" #include "NetworkAPI/ip/address.hpp" int main() { EthernetInterface interface; interface.init(); interface.connect(); printf("IP Address is %s\n\r", interface.getIPAddress()); network::ip::Address localhost(network::ip::Address::Loopback); printf(" - localhost: %s\n\r", localhost.toString().c_str()); network::ip::Address broadcast(network::ip::Address::Broadcast); printf(" - broadcast: %s\n\r", broadcast.toString().c_str()); network::ip::Address linklocal("10.0.0.1"); printf(" - linklocal: %s\n\r", linklocal.toString().c_str()); network::ip::Address google; google.fromHostname("www.google.com"); printf(" - www.google.com: %s\n\r", google.toString().c_str()); }